diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-01-27 10:51:00 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-01-27 10:51:00 +0200 |
| commit | de03215322eb545bebdccba65b6f8f6b307b9f85 (patch) | |
| tree | 173f030ca20e89b5dd6894de1ca78963c8045dfb /Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs | |
| parent | 97904f88f3949339c713286b592ad156baa8d41f (diff) | |
| download | Tango-de03215322eb545bebdccba65b6f8f6b307b9f85.tar.gz Tango-de03215322eb545bebdccba65b6f8f6b307b9f85.zip | |
Added latest thread loading...
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs index aea423c12..7cb0163af 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs @@ -65,20 +65,24 @@ namespace Tango.PPC.UI.ThreadLoading _dialogShown = true; var vm = await _notificationsProvider.ShowDialog<ThreadLoadingViewVM>(new ThreadLoadingViewVM(true)); _dialogShown = false; - if (!vm.DialogResult && vm.Stage != ThreadLoadingViewVM.ThreadLoadingStage.Completed) + if (!vm.DialogResult && vm.Stage != ThreadLoadingViewVM.ThreadLoadingStage.Completed && vm.Stage != ThreadLoadingViewVM.ThreadLoadingStage.Welcome) { if (_machineProvider.IsConnected) { try { + _notificationsProvider.SetGlobalBusyMessage("Aborting thread loading..."); + await Task.Delay(1000); await _machineProvider.MachineOperator.AbortThreadLoading(); + _notificationsProvider.ReleaseGlobalBusyMessage(); + await _notificationsProvider.ShowInfo("Thread loading aborted."); } catch (Exception ex) { + _notificationsProvider.ReleaseGlobalBusyMessage(); LogManager.Default.Log(ex, "Error aborting thread loading."); + await _notificationsProvider.ShowError("Could not properly abort the thread loading process."); } - - await _notificationsProvider.ShowInfo("Thread loading aborted."); } } } |
