aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-15 23:03:00 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-15 23:03:00 +0300
commit049a79893eac8335ad37defd042533e0fbb8f054 (patch)
treed9ce0063c56e41b9342c77539d9d01c2479fff90 /Software
parent9375b71348f9235e642eee147e803e702c8adee8 (diff)
downloadTango-049a79893eac8335ad37defd042533e0fbb8f054.tar.gz
Tango-049a79893eac8335ad37defd042533e0fbb8f054.zip
Disable job execution when liquid volumes out of range.
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs1
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs4
3 files changed, 10 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
index d6eb3bc63..67389c759 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
@@ -60,7 +60,6 @@ namespace Tango.PPC.Jobs.ViewModels
set { _estimatedDuration = value; RaisePropertyChangedAuto(); }
}
-
/// <summary>
/// Gets or sets the dye command.
/// </summary>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
index 80fd4b0fd..5e90d3b5b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
@@ -677,8 +677,7 @@ namespace Tango.PPC.Jobs.ViewModels
private bool CanStartJob()
{
return
- Job != null && Job.Validate(_db) &&
- !Job.Segments.SelectMany(x => x.BrushStops).Where(x => !x.IsTransparent && !x.IsWhite).ToList().Exists(x => x.IsOutOfGamut);
+ Job != null && Job.Validate(_db) && !Job.Segments.SelectMany(x => x.BrushStops).Where(x => !x.IsTransparent && !x.IsWhite).ToList().Exists(x => x.IsOutOfGamut || x.IsLiquidVolumesOutOfRange);
}
#endregion
@@ -1004,6 +1003,11 @@ namespace Tango.PPC.Jobs.ViewModels
stop.Blue = output.SingleCoordinates.Blue;
stop.Corrected = true;
stop.IsOutOfGamut = false;
+
+ InvokeUI(() =>
+ {
+ DyeCommand.RaiseCanExecuteChanged();
+ });
}
catch (Exception ex)
{
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 34624947f..1f2895f26 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -259,6 +259,10 @@ namespace Tango.PPC.UI.Printing
{
throw new InvalidOperationException("Error starting job. Color is out of range.");
}
+ if (job.Segments.SelectMany(x => x.BrushStops).Any(x => x.IsLiquidVolumesOutOfRange))
+ {
+ throw new InvalidOperationException("Error starting job. Total ink volume is out of range.");
+ }
if (job.Segments.SelectMany(x => x.BrushStops).Any(x => x.BrushColorSpace == ColorSpaces.Catalog && x.ColorCatalogsItem == null && !x.IsTransparent && !x.IsWhite))
{
throw new InvalidOperationException("Error starting job. Please select a catalog color.");