aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2025-04-28 07:22:24 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2025-04-28 07:22:24 +0300
commit9ba62023311d5a32f0b3202406e61163914b189e (patch)
treeb9c8dac213c83015729f101060c6c24031e78afb /Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
parent40b28f82bd178b9151937ba6920d427ff0df53d8 (diff)
downloadTango-9ba62023311d5a32f0b3202406e61163914b189e.tar.gz
Tango-9ba62023311d5a32f0b3202406e61163914b189e.zip
Safe check for extra inks none volume gradients.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
index bcf0715fa..065653df2 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -75,6 +75,20 @@ namespace Tango.PPC.UI.Printing
throw new OperationCanceledException();
}
+ //Check for none volume gradients which has extra inks
+ foreach (var segment in job.Segments)
+ {
+ var hasExtraInks = _machineProvider.Machine.Configuration.IdsPacks.Any(x => x.LiquidType.IsExtraInk);
+ var hasNoneVolumeStops = segment.BrushStops.Any(x => x.BrushColorSpace != ColorSpaces.Volume);
+ var isGradient = segment.BrushStops.OrderBy(x => x.StopIndex).First().Color != segment.BrushStops.OrderBy(x => x.StopIndex).Last().Color;
+
+ if (hasExtraInks && hasNoneVolumeStops && isGradient)
+ {
+ await _notificationProvider.ShowError($"When dyeing a gradient and extra inks are installed, all colors must be defined in Volume color space.");
+ throw new OperationCanceledException();
+ }
+ }
+
//Spool Replace For TS 1800
if (!_buildProvider.IsEureka && job.Designation == JobDesignations.Default && _settings.EnableSpoolReplacementDialog && !_machineProvider.MachineOperator.IsSpoolReplaced)
{