diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-04-22 19:50:30 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-04-22 19:50:30 +0300 |
| commit | ffbda2b8be71d4942e0d4af2f53b5bde357c72e2 (patch) | |
| tree | 6656196be6ecaccaed9b39aaf1a75619aeec194b /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | |
| parent | c2945492e7c4d168c36b632d1f28dd8ca569b5ac (diff) | |
| parent | 0a63ef17afb9afe60e4ea98cff86dda7fbdad1f6 (diff) | |
| download | Tango-ffbda2b8be71d4942e0d4af2f53b5bde357c72e2.tar.gz Tango-ffbda2b8be71d4942e0d4af2f53b5bde357c72e2.zip | |
MERGE!
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index b25afd67d..dd0872898 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -226,7 +226,7 @@ namespace Tango.Integration.Operation { get { - return Status == MachineStatuses.Printing; + return Status == MachineStatuses.Printing || Status == MachineStatuses.GettingReady; } } @@ -862,12 +862,27 @@ namespace Tango.Integration.Operation if (!responseLogged) { + Status = MachineStatuses.GettingReady; responseLogged = true; - Status = MachineStatuses.Printing; RunningJob = originalJob; PrintingStarted?.Invoke(this, new PrintingEventArgs(handler, originalJob)); LogResponseReceived(response.Message); } + + if (JobHandlingMode == JobHandlerModes.SettingUp) + { + if (response.Message.Status.Progress > jobTicket.ProcessParameters.DryerBufferLength) + { + Status = MachineStatuses.Printing; + } + } + else + { + if (response.Message.Status.Progress > 0) + { + Status = MachineStatuses.Printing; + } + } }, (ex) => { if (!(ex is ContinuousResponseAbortedException)) @@ -1356,7 +1371,7 @@ namespace Tango.Integration.Operation ThreadFactory.StartNew(async () => { - Status = MachineStatuses.Printing; + Status = MachineStatuses.GettingReady; RunningJob = originalJob; PrintingStarted?.Invoke(this, new PrintingEventArgs(handler, originalJob)); @@ -1411,6 +1426,22 @@ namespace Tango.Integration.Operation responseLogged = true; LogResponseReceived(response.Message); } + + if (JobHandlingMode == JobHandlerModes.SettingUp) + { + if (response.Message.Status.Progress > request.JobTicket.ProcessParameters.DryerBufferLength) + { + Status = MachineStatuses.Printing; + } + } + else + { + if (response.Message.Status.Progress > 0) + { + Status = MachineStatuses.Printing; + } + } + }, (ex) => { if (!(ex is ContinuousResponseAbortedException)) |
