diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2')
3 files changed, 49 insertions, 8 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs index a597a4c50..b24611796 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs @@ -809,10 +809,38 @@ namespace Tango.PPC.Jobs.Dialogs TargetB = BrushStopModel.ColorCatalogsItem.B; BrushStopModel.PreventPropertyUpdate = true; BrushStopModel.LiquidVolumes.ResetVolume(); - BrushStopModel.LiquidVolumes.GetLiquidVolume(LiquidTypes.Cyan).Volume = brushstop.ColorCatalogsItem.Cyan; - BrushStopModel.LiquidVolumes.GetLiquidVolume(LiquidTypes.Magenta).Volume = brushstop.ColorCatalogsItem.Magenta; - BrushStopModel.LiquidVolumes.GetLiquidVolume(LiquidTypes.Yellow).Volume = brushstop.ColorCatalogsItem.Yellow; - BrushStopModel.LiquidVolumes.GetLiquidVolume(LiquidTypes.Black).Volume = brushstop.ColorCatalogsItem.Black; + + var cyanVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("cyan"); + if (cyanVolume != null) cyanVolume.Volume = brushstop.ColorCatalogsItem.Cyan; + + var magentaVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("magenta"); + if (magentaVolume != null) magentaVolume.Volume = brushstop.ColorCatalogsItem.Magenta; + + var yellowVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("yellow"); + if (yellowVolume != null) yellowVolume.Volume = brushstop.ColorCatalogsItem.Yellow; + + var blackVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("black"); + if (blackVolume != null) blackVolume.Volume = brushstop.ColorCatalogsItem.Black; + + var blueVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("blue"); + if (blueVolume != null) blueVolume.Volume = brushstop.ColorCatalogsItem.Blue; + + var navyVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("navy"); + if (navyVolume != null) navyVolume.Volume = brushstop.ColorCatalogsItem.NavyExtra; + + var orangeVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("orange"); + if (orangeVolume != null) orangeVolume.Volume = brushstop.ColorCatalogsItem.OrangeExtra; + + var redVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("red"); + if (redVolume != null) redVolume.Volume = brushstop.ColorCatalogsItem.RedExtra; + + var rubineVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("rubine"); + if (rubineVolume != null) rubineVolume.Volume = brushstop.ColorCatalogsItem.RubineExtra; + + var violetVolume = BrushStopModel.LiquidVolumes.FindLiquidVolumeForCatalog("violet"); + if (violetVolume != null) violetVolume.Volume = brushstop.ColorCatalogsItem.VioletExtra; + + BrushStopModel.PreventPropertyUpdate = false; IsOnlyManual = false; } 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 5634f783e..dd82d8d1a 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 @@ -1351,10 +1351,17 @@ namespace Tango.PPC.Jobs.Models if (ColorCatalogsItem != null) { LiquidVolumes.ResetVolumeSilent(); - LiquidVolumes.GetLiquidVolume(LiquidTypes.Cyan).SetVolumeSilent(ColorCatalogsItem.Cyan); - LiquidVolumes.GetLiquidVolume(LiquidTypes.Magenta).SetVolumeSilent(ColorCatalogsItem.Magenta); - LiquidVolumes.GetLiquidVolume(LiquidTypes.Yellow).SetVolumeSilent(ColorCatalogsItem.Yellow); - LiquidVolumes.GetLiquidVolume(LiquidTypes.Black).SetVolumeSilent(ColorCatalogsItem.Black); + + LiquidVolumes.FindLiquidVolumeForCatalog("cyan")?.SetVolumeSilent(ColorCatalogsItem.Cyan); + LiquidVolumes.FindLiquidVolumeForCatalog("magenta")?.SetVolumeSilent(ColorCatalogsItem.Magenta); + LiquidVolumes.FindLiquidVolumeForCatalog("yellow")?.SetVolumeSilent(ColorCatalogsItem.Yellow); + LiquidVolumes.FindLiquidVolumeForCatalog("black")?.SetVolumeSilent(ColorCatalogsItem.Black); + LiquidVolumes.FindLiquidVolumeForCatalog("blue")?.SetVolumeSilent(ColorCatalogsItem.BlueExtra); + LiquidVolumes.FindLiquidVolumeForCatalog("navy")?.SetVolumeSilent(ColorCatalogsItem.NavyExtra); + LiquidVolumes.FindLiquidVolumeForCatalog("orange")?.SetVolumeSilent(ColorCatalogsItem.OrangeExtra); + LiquidVolumes.FindLiquidVolumeForCatalog("red")?.SetVolumeSilent(ColorCatalogsItem.RedExtra); + LiquidVolumes.FindLiquidVolumeForCatalog("rubine")?.SetVolumeSilent(ColorCatalogsItem.RubineExtra); + LiquidVolumes.FindLiquidVolumeForCatalog("violet")?.SetVolumeSilent(ColorCatalogsItem.VioletExtra); LiquidVolumes.RaiseVolume(); IsOutOfGamut = false; // RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange)); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/LiquidVolumesCollection.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/LiquidVolumesCollection.cs index 704fc36b0..8eaae4452 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/LiquidVolumesCollection.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/LiquidVolumesCollection.cs @@ -43,6 +43,12 @@ namespace Tango.PPC.Jobs.Models return this.FirstOrDefault(x => x.IdsPack.LiquidType.Type == (LiquidTypes)type); } + public LiquidVolumeModel FindLiquidVolumeForCatalog(String name) + { + var volume = this.Where(x => x.IdsPack.LiquidType.HasPigment && !x.IdsPack.LiquidType.IsLightInk).FirstOrDefault(x => x.IdsPack.LiquidType.Type.ToString().ToLower().Contains(name.ToLower())); + return volume; + } + public void Undo() { this.ToList().ForEach(x => x.Undo()); |
