diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/HeadCleaningHandler.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/HeadCleaningHandler.cs | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/HeadCleaningHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/HeadCleaningHandler.cs deleted file mode 100644 index d82666a60..000000000 --- a/Software/Visual_Studio/Tango.Integration/Operation/HeadCleaningHandler.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core; -using Tango.PMR.Printing; - -namespace Tango.Integration.Operation -{ - public class HeadCleaningHandler : ExtendedObject - { - private Action _abortAction; - - public event EventHandler<HeadCleaningStatusChangedEventArgs> StatusChanged; - public event EventHandler<Exception> Failed; - public event EventHandler Completed; - - private StartHeadCleaningResponse _status; - public StartHeadCleaningResponse Status - { - get { return _status; } - set { _status = value; RaisePropertyChangedAuto(); } - } - - public HeadCleaningHandler(Action abortAction) - { - _abortAction = abortAction; - - Status = new StartHeadCleaningResponse() - { - Total = 100, - Progress = 0, - Status = "Initializing..." - }; - } - - internal void RaiseStatusChanged(StartHeadCleaningResponse status) - { - OnStatusChanged(status); - } - - internal void RaiseFailed(Exception ex) - { - OnFailed(ex); - } - - internal void RaiseCompleted() - { - OnCompleted(); - } - - private void OnStatusChanged(StartHeadCleaningResponse status) - { - Status = status; - StatusChanged?.Invoke(this, new HeadCleaningStatusChangedEventArgs() - { - Status = status - }); - } - - private void OnCompleted() - { - Completed?.Invoke(this, new EventArgs()); - } - - private void OnFailed(Exception ex) - { - Failed?.Invoke(this, ex); - } - - public Task Abort() - { - return Task.Factory.StartNew(() => - { - _abortAction.Invoke(); - }); - } - } -} |
