diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-01 11:39:19 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-01 11:39:19 +0200 |
| commit | 06ad24ef8a414fc89c0cf42b9f5264d584292afe (patch) | |
| tree | 7bbe6eadb54d21996aba8d50855137ce20750578 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI | |
| parent | f573292928d08acbf04acb8ea74f55f7561390a0 (diff) | |
| download | Tango-06ad24ef8a414fc89c0cf42b9f5264d584292afe.tar.gz Tango-06ad24ef8a414fc89c0cf42b9f5264d584292afe.zip | |
Improved RequestShutDown Mechanism on machine studio UI implementation.
Fixed issue with job brush markers visibility.
Implemented Job Progress Indicator.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index a59ecf8e0..7ea18014c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -118,6 +118,24 @@ namespace Tango.MachineStudio.UI.StudioApplication await Task.Factory.StartNew(async () => { + //Do Shutdown Procedures... + foreach (var vm in ServiceLocator.Current.GetAllInstancesByBase<IShutdownRequestBlocker>()) + { + try + { + var result = await vm.OnShutdownRequest(); + if (!result) + { + IsShuttingDown = false; + return; + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error on shutdown request with " + vm.GetType().Name); + } + } + try { if (ConnectedMachine != null) @@ -130,17 +148,6 @@ namespace Tango.MachineStudio.UI.StudioApplication LogManager.Log(ex, "Error disconnecting from machine."); } - //Do Shutdown Procedures... - foreach (var vm in ServiceLocator.Current.GetAllInstancesByBase<IShutdownRequestBlocker>()) - { - var result = await vm.OnShutdownRequest(); - if (!result) - { - IsShuttingDown = false; - return; - } - } - _navigationManager.NavigateTo(NavigationView.ShutdownView); Thread.Sleep(3000); Environment.Exit(0); |
