aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs
index b105b8254..b8031fdaf 100644
--- a/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs
@@ -78,6 +78,44 @@ namespace Tango.JobRunsGenerator
if (run.ActualStartDate == null) run.ActualStartDate = run.StartDate;
run.IsGradient = job.Segments.Any(x => x.BrushStops.Count > 1);
+ //Set new liquid quantities.
+ if (run.CyanQuantity == 0 &&
+ run.MagentaQuantity == 0 &&
+ run.YellowQuantity == 0 &&
+ run.BlackQuantity == 0 &&
+ run.TransparentQuantity == 0 &&
+ run.LubricantQuantity == 0 &&
+ run.CleanerQuantity == 0)
+ {
+ //Cyan
+ var cyan = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Cyan);
+ run.CyanQuantity = cyan != null ? cyan.Quantity : 0;
+
+ //Magenta
+ var magenta = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Magenta);
+ run.MagentaQuantity = magenta != null ? magenta.Quantity : 0;
+
+ //Yellow
+ var yellow = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Yellow);
+ run.YellowQuantity = yellow != null ? yellow.Quantity : 0;
+
+ //Black
+ var black = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Black);
+ run.BlackQuantity = black != null ? black.Quantity : 0;
+
+ //TI
+ var ti = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.TransparentInk);
+ run.TransparentQuantity = ti != null ? ti.Quantity : 0;
+
+ //Lubricant
+ var lubricant = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Lubricant);
+ run.LubricantQuantity = lubricant != null ? lubricant.Quantity : 0;
+
+ //Lubricant
+ var cleaner = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Cleaner);
+ run.CleanerQuantity = cleaner != null ? cleaner.Quantity : 0;
+ }
+
saveIndex++;
if (saveIndex > 100)