diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-07-02 13:37:17 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-07-02 13:37:17 +0300 |
| commit | 38ed93f95bb5af92bc84599ebb9c0c6895b0b989 (patch) | |
| tree | 2cdffd5247aa51bfbfb5d896e4ce1d8e7e400c20 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | |
| parent | a5de87ea9863c6e7053e09ed1c2eabf58285af48 (diff) | |
| download | Tango-38ed93f95bb5af92bc84599ebb9c0c6895b0b989.tar.gz Tango-38ed93f95bb5af92bc84599ebb9c0c6895b0b989.zip | |
Job running progress bar. Set running background in progress bar by unit from right to left as auto reverse ( not animation).
Bug in current segment in JobHandler.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 10 |
1 files changed, 5 insertions, 5 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 103084e11..653c2368f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -571,17 +571,17 @@ namespace Tango.PPC.UI.ViewModels IsDyeingProcess = (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null); if (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null) { - var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == _runningJobStatus.CurrentSegment.SegmentIndex); + var currentSegmentIndex = Math.Max(_runningJobStatus.CurrentSegment.SegmentIndex - (Job.Segments.Count * RunningJobStatus.CurrentUnit), 0); + var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == currentSegmentIndex); + // var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == _runningJobStatus.CurrentSegment.SegmentIndex); if (segment != null) { - if (_handler.JobTicket.Segments.Count > 0) { JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First(); - } - - CurrentBrushStop = segment.FirstBrushStop; + } } + CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop; } } |
