diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:42:52 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:42:52 +0200 |
| commit | 92de61904c6ae3f8455827944b4aa62c5582bbb5 (patch) | |
| tree | d02f1ce1294b93400d7732356d54edf24766af17 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | 84708ec080fb94ccf637ac623967fd0e538c1fb5 (diff) | |
| parent | b77fbb01ed5b63b65f6e755fef9ca49c3e58ea50 (diff) | |
| download | Tango-92de61904c6ae3f8455827944b4aa62c5582bbb5.tar.gz Tango-92de61904c6ae3f8455827944b4aa62c5582bbb5.zip | |
Merged Extra Inks to Software.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 83 |
1 files changed, 39 insertions, 44 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index c7ba2e24d..afb536c58 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -180,6 +180,8 @@ namespace Tango.PPC.UI.ViewModels // if (_currentBrushStop != value) { _currentBrushStop = value; + + OnUpdateCurrentBrush(); RaisePropertyChangedAuto(); } @@ -188,41 +190,6 @@ namespace Tango.PPC.UI.ViewModels public JobBrushStop JobBrushStop { get; set; } - public double CyanOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Cyan); } - } - - public double MagentaOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Magenta); } - } - - public double YellowOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Yellow); } - } - - public double BlackOutput - { - get { return GetVolumeLiquidType(LiquidTypes.Black); } - } - - public double LightCyanOutput - { - get { return GetVolumeLiquidType(LiquidTypes.LightCyan); } - } - - public double LightMagentaOutput - { - get { return GetVolumeLiquidType(LiquidTypes.LightMagenta); } - } - - public double LightYellowOutput - { - get { return GetVolumeLiquidType(LiquidTypes.LightYellow); } - } - //public double TransparentInkOutput //{ // get { return GetVolumeLiquidType(LiquidTypes.TransparentInk); } @@ -372,6 +339,12 @@ namespace Tango.PPC.UI.ViewModels } } + private List<LiquidOutputModel> _liquidOutputs; + public List<LiquidOutputModel> LiquidOutputs + { + get { return _liquidOutputs; } + set { _liquidOutputs = value; RaisePropertyChangedAuto(); } + } #endregion @@ -635,6 +608,22 @@ namespace Tango.PPC.UI.ViewModels { _handler = e.JobHandler; Job = e.Job; + + List<LiquidOutputModel> outputs = new List<LiquidOutputModel>(); + + var idsPacks = MachineProvider.Machine.Configuration.GetSupportedIdsPacks(Job.Rml); + + foreach (var idsPack in idsPacks.Where(x => x.LiquidType.HasPigment)) + { + outputs.Add(new LiquidOutputModel() + { + LiquidType = idsPack.LiquidType, + Volume = 0, + }); + } + + LiquidOutputs = outputs; + try { ResumeModel = JobResumeManager.GetJobResumeModel(Job.Guid); @@ -703,7 +692,14 @@ namespace Tango.PPC.UI.ViewModels { if (_runningJobStatus.CurrentSegment.IsInterSegment) { - CurrentBrushStop = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); + var brush = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); + if (brush != null) + { + brush = brush.CloneBrush(); + } + + CurrentBrushStop = brush; + JobBrushStop = null; } else @@ -731,7 +727,7 @@ namespace Tango.PPC.UI.ViewModels JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First(); } } - CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop; + CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop.CloneBrush(); } } } @@ -920,13 +916,12 @@ namespace Tango.PPC.UI.ViewModels protected void OnUpdateCurrentBrush() { - RaisePropertyChanged(nameof(CyanOutput)); - RaisePropertyChanged(nameof(LightCyanOutput)); - RaisePropertyChanged(nameof(MagentaOutput)); - RaisePropertyChanged(nameof(LightMagentaOutput)); - RaisePropertyChanged(nameof(YellowOutput)); - RaisePropertyChanged(nameof(LightYellowOutput)); - RaisePropertyChanged(nameof(BlackOutput)); + CurrentBrushStop.SetLiquidVolumes(MachineProvider.Machine.Configuration, Job.Rml, MachineProvider.MachineOperator.CurrentProcessParameters); + + foreach (var output in LiquidOutputs) + { + output.Volume = GetVolumeLiquidType(output.LiquidType.Type); + } } private void HideJobOutline() |
