aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-08-02 15:44:56 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-08-02 15:44:56 +0300
commitda1c997c138633c46daa8dc3c099b7164a536eb9 (patch)
treeb04bf3110ae27ebbea1b7aafe9d2efeec45fccff /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
parent027f92e62bf5c3d018b6d789b54c5ce78af2b03b (diff)
downloadTango-da1c997c138633c46daa8dc3c099b7164a536eb9.tar.gz
Tango-da1c997c138633c46daa8dc3c099b7164a536eb9.zip
Job Running Progress - added inter segments to logic.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs39
1 files changed, 30 insertions, 9 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 684b9bd8c..f8c139cf6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
@@ -184,7 +184,7 @@ namespace Tango.PPC.UI.ViewModels
{
get { return GetVolumeLiquidType(LiquidTypes.LightYellow); }
}
-
+
//public double TransparentInkOutput
//{
// get { return GetVolumeLiquidType(LiquidTypes.TransparentInk); }
@@ -584,17 +584,38 @@ namespace Tango.PPC.UI.ViewModels
IsDyeingProcess = (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null);
if (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null)
{
- 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(_runningJobStatus.CurrentSegment.IsInterSegment)
{
- if (_handler.JobTicket.Segments.Count > 0)
+ CurrentBrushStop = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault();
+ JobBrushStop = null;
+ }
+ else
+ {
+ var realsegmIndex = 1;
+ if (Job.EnableInterSegment && Job.InterSegmentLength > 0)
{
- JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First();
- }
+ int segmentIndex = _runningJobStatus.CurrentSegment.SegmentIndex - (Job.EffectiveSegments.Count * RunningJobStatus.CurrentUnit);
+ if(RunningJobStatus.CurrentUnit > 0)
+ {
+ segmentIndex -= RunningJobStatus.CurrentUnit;// inter segment between units
+ }
+ realsegmIndex = (int)(segmentIndex/2) + 1;
+ }
+ else
+ {
+ realsegmIndex = Math.Max(_runningJobStatus.CurrentSegment.SegmentIndex - (Job.Segments.Count * RunningJobStatus.CurrentUnit), 0);
+ }
+
+ var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == realsegmIndex);
+ if (segment != null)
+ {
+ if (_handler.JobTicket.Segments.Count > 0)
+ {
+ JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First();
+ }
+ }
+ CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop;
}
- CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop;
}
}