diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs | 101 |
1 files changed, 4 insertions, 97 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs index 4ad21d4cd..d23e9b1f2 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs @@ -28,7 +28,7 @@ namespace Tango.BL.Entities private bool _ignorePropChanged; private ActionTimer _syncTimer; private static List<String> _colorPropertyNames; - public const double MAX_INK_UPTAKE = 400; + public const double MAX_TOTAL_LIQUID_VOLUME = 200; #region Enums @@ -79,7 +79,6 @@ namespace Tango.BL.Entities _colorPropertyNames.Add(nameof(Color)); _colorPropertyNames.Add(nameof(ColorCatalogsItem)); - _colorPropertyNames.Add(nameof(IsTransparent)); } /// <summary> @@ -104,7 +103,7 @@ namespace Tango.BL.Entities #region Properties /// <summary> - /// Gets or sets a value indicating whether the total value of liquid volumes has exceeded the maximum range of <see cref="MAX_INK_UPTAKE"/>. + /// Gets or sets a value indicating whether the total value of liquid volumes has exceeded the maximum range of <see cref="MAX_TOTAL_LIQUID_VOLUME"/>. /// </summary> [NotMapped] [JsonIgnore] @@ -112,7 +111,7 @@ namespace Tango.BL.Entities { get { - return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.NanoliterPerCentimeter) > GetTotalMaximumLiquidNlPerCMLimit() : false; + return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.Volume) > MAX_TOTAL_LIQUID_VOLUME : false; } } @@ -284,7 +283,7 @@ namespace Tango.BL.Entities [JsonIgnore] public bool IsOutOfGamut { - get { return _isOutOfGamut && !IsTransparent; } + get { return _isOutOfGamut; } set { if (_isOutOfGamut != value) @@ -348,62 +347,6 @@ namespace Tango.BL.Entities get { return (ColorSpaces)ColorSpace.Code; } } - [NotMapped] - [JsonIgnore] - public bool IsWhite - { - get - { - try - { - if (ColorSpace != null) - { - if (BrushColorSpace == ColorSpaces.RGB) - { - if (Red == 255 && Green == 255 && Blue == 255) - { - return true; - } - } - else if (BrushColorSpace == ColorSpaces.LAB) - { - if (L == 100 && A == 0 && B == 0) - { - return true; - } - } - } - } - catch { } - - return false; - } - } - - [NotMapped] - [JsonIgnore] - public String LiquidVolumesOrderedPigmentedString - { - get - { - if (LiquidVolumes != null) - { - try - { - return String.Join(", ", LiquidVolumesOrderedPigmented.Select(x => x.Volume.ToString("0.0"))); - } - catch - { - return String.Empty; - } - } - else - { - return String.Empty; - } - } - } - #endregion #region Public Methods @@ -678,17 +621,6 @@ namespace Tango.BL.Entities PerformColorSynchronization(propName); } - protected override void OnIsTransparentChanged(bool istransparent) - { - base.OnIsTransparentChanged(istransparent); - RaisePropertyChanged(nameof(IsOutOfGamut)); - OutOfGamutChecked = false; - if (Segment != null) - { - Segment.RaiseHasOutOfGamutBrushStop(); - } - } - #endregion #region Properties Changed @@ -777,30 +709,5 @@ namespace Tango.BL.Entities } #endregion - - #region Private Methods - - private double GetTotalMaximumLiquidNlPerCMLimit() - { - try - { - var tables = Segment.Job.Rml.GetActiveProcessGroup().ProcessParametersTables.OrderBy(x => x.TableIndex).ToList(); - - if (tables.Count > 0) - { - return tables.Max(x => x.MaxInkUptake); - } - else - { - return MAX_INK_UPTAKE; - } - } - catch - { - return MAX_INK_UPTAKE; - } - } - - #endregion } } |
