aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-02-22 14:41:25 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-02-22 14:41:25 +0200
commit28fa1ab91b3fb7970d9968c5cb1d018c2b44fd69 (patch)
tree040ebb961e0e991436571f11d8a189c92326e4b3 /Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
parent3681ab681f02bbb7cda89de4044fd69bc9d61ab8 (diff)
downloadTango-28fa1ab91b3fb7970d9968c5cb1d018c2b44fd69.tar.gz
Tango-28fa1ab91b3fb7970d9968c5cb1d018c2b44fd69.zip
Implement grouping of segments. Changes in GUI and database. Not in Dying process.
Related Work Items: #4558
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs31
1 files changed, 22 insertions, 9 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
index 8a071f126..12add3d2f 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
@@ -585,6 +585,8 @@ namespace Tango.PPC.Jobs.Models
}
}
}
+
+ protected bool RequiredMaxLiquidTest { get; set; }
#endregion
public BrushStopModel(SegmentModel segmentModel)
@@ -611,6 +613,7 @@ namespace Tango.PPC.Jobs.Models
ColorCatalogsItem = null;
PreventPropertyUpdate = false;
LiquidVolumesOutOfRange = false;
+ RequiredMaxLiquidTest = false;
}
public BrushStopModel(BrushStop brushStop, SegmentModel segmentModel, int version)
@@ -777,6 +780,7 @@ namespace Tango.PPC.Jobs.Models
cloned.LiquidVolumesOutOfRange = LiquidVolumesOutOfRange;
//this.MapPropertiesTo(cloned, MappingFlags.NoReferenceTypes);
cloned.PreventPropertyUpdate = false;
+ cloned.RequiredMaxLiquidTest = false;
return cloned;
}
@@ -830,6 +834,7 @@ namespace Tango.PPC.Jobs.Models
if (PreventPropertyUpdate)
return;
ColorSpace = ColorSpaces.Volume;
+ RequiredMaxLiquidTest = true;
RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
OnBrushStopFieldValueChanged();
@@ -972,6 +977,8 @@ namespace Tango.PPC.Jobs.Models
RaisePropertyChanged(nameof(Saturation));
RaisePropertyChanged(nameof(Brightness));
}
+ RequiredMaxLiquidTest = false;
+ RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
}
}
@@ -1011,6 +1018,8 @@ namespace Tango.PPC.Jobs.Models
RaisePropertyChanged(nameof(Red));
RaisePropertyChanged(nameof(Green));
RaisePropertyChanged(nameof(Blue));
+ RequiredMaxLiquidTest = false;
+ RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
}
}
@@ -1064,11 +1073,14 @@ namespace Tango.PPC.Jobs.Models
RaisePropertyChanged(nameof(L));
RaisePropertyChanged(nameof(A));
RaisePropertyChanged(nameof(B));
+ RequiredMaxLiquidTest = false;
+ RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
}
}
public void ConvertColorToVolume()
{
+ RequiredMaxLiquidTest = true;
if (ColorSpace != ColorSpaces.Volume)
{
if (ColorSpace == ColorSpaces.Catalog)
@@ -1209,19 +1221,20 @@ namespace Tango.PPC.Jobs.Models
return 0.0;
}
+
public bool IsLiquidVolumesOutOfRange
{
get
{
- //if (ColorSpace == BL.Enumerations.ColorSpaces.Volume)
- // {
- var sum = GetColorNLPerCm(Cyan, LiquidTypes.Cyan) + GetColorNLPerCm(Magenta, LiquidTypes.Magenta) + GetColorNLPerCm(Yellow, LiquidTypes.Yellow) + GetColorNLPerCm(Black, LiquidTypes.Black);
- var maxLiq = GetTotalMaximumLiquidNlPerCMLimit();
- LiquidVolumesOutOfRange = sum > GetTotalMaximumLiquidNlPerCMLimit();
-
- return LiquidVolumesOutOfRange;
- // }
- // else return false;
+ if (RequiredMaxLiquidTest )
+ {
+ var sum = GetColorNLPerCm(Cyan, LiquidTypes.Cyan) + GetColorNLPerCm(Magenta, LiquidTypes.Magenta) + GetColorNLPerCm(Yellow, LiquidTypes.Yellow) + GetColorNLPerCm(Black, LiquidTypes.Black);
+ var maxLiq = GetTotalMaximumLiquidNlPerCMLimit();
+ LiquidVolumesOutOfRange = sum > GetTotalMaximumLiquidNlPerCMLimit();
+
+ return LiquidVolumesOutOfRange;
+ }
+ else return false;
}
}