diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-12 16:40:03 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-12 16:40:03 +0300 |
| commit | 9d5cbb678c593f2150ea28d23cdc505cab21f004 (patch) | |
| tree | a2e38eba662b84e2adf2191c51ec3c5b9a0c2d73 /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | |
| parent | e278b58a84234d66e49f1d261fe5ae68e6907b77 (diff) | |
| download | Tango-9d5cbb678c593f2150ea28d23cdc505cab21f004.tar.gz Tango-9d5cbb678c593f2150ea28d23cdc505cab21f004.zip | |
Machine Studio v1.0.0.13
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 18a5cf268..3a02006fd 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -690,39 +690,39 @@ namespace Tango.Integration.Operation LogRequestSent(request); bool responseLogged = false; - SendContinuousRequest<JobRequest, JobResponse>(request,null,TimeSpan.FromSeconds(2)).Subscribe((response) => - { - handler.RaiseStatusReceived(response.Message.Status); + SendContinuousRequest<JobRequest, JobResponse>(request, null, TimeSpan.FromSeconds(2)).Subscribe((response) => + { + handler.RaiseStatusReceived(response.Message.Status); - if (!responseLogged) - { - Status = MachineStatuses.Printing; - PrintingStarted?.Invoke(this, handler); - responseLogged = true; - LogResponseReceived(response.Message); - } - }, (ex) => - { - if (!(ex is ContinuousResponseAbortedException)) - { - if (!handler.IsCanceled) - { - Status = MachineStatuses.Error; - PrintingFailed?.Invoke(this, ex); - handler.RaiseFailed(ex); - LogRequestFailed(request, ex); - } - } - else - { - Status = MachineStatuses.ReadyToDye; - } - }, () => - { - Status = MachineStatuses.ReadyToDye; - PrintingCompleted?.Invoke(this, new EventArgs()); - handler.RaiseCompleted(); - }); + if (!responseLogged) + { + Status = MachineStatuses.Printing; + PrintingStarted?.Invoke(this, handler); + responseLogged = true; + LogResponseReceived(response.Message); + } + }, (ex) => + { + if (!(ex is ContinuousResponseAbortedException)) + { + if (!handler.IsCanceled) + { + Status = MachineStatuses.Error; + PrintingFailed?.Invoke(this, ex); + handler.RaiseFailed(ex); + LogRequestFailed(request, ex); + } + } + else + { + Status = MachineStatuses.ReadyToDye; + } + }, () => + { + Status = MachineStatuses.ReadyToDye; + PrintingCompleted?.Invoke(this, new EventArgs()); + handler.RaiseCompleted(); + }); return handler; } |
