From 9ba62023311d5a32f0b3202406e61163914b189e Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 28 Apr 2025 07:22:24 +0300 Subject: Safe check for extra inks none volume gradients. --- .../PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Software/Visual_Studio/PPC') 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) { -- cgit v1.3.1