diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-07-02 15:26:42 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-07-02 15:26:42 +0300 |
| commit | 167252d9517377a4169cd389ca7187509b5a0c1d (patch) | |
| tree | 61511ee2e70fea2dfb182dde8bb21f0ef37b8376 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | |
| parent | e63a5e3c82324c0a1afc4d27370a99230243ac11 (diff) | |
| download | Tango-167252d9517377a4169cd389ca7187509b5a0c1d.tar.gz Tango-167252d9517377a4169cd389ca7187509b5a0c1d.zip | |
UI Power options: Close application and minimize.
Related Work Items: #8675
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index f40a89f42..17b676499 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -361,6 +361,9 @@ namespace Tango.PPC.UI.ViewModels if (MachineProvider.MachineOperator.Status != MachineStatuses.Disconnected) ResetMachine(); return; + case PowerEurekaViewVM.PowerActionEnum.CloseApp: + CloseApplication(); + return; default: return; } @@ -455,6 +458,14 @@ namespace Tango.PPC.UI.ViewModels } } + private async void CloseApplication() + { + if (await NotificationProvider.ShowQuestion("Are you sure you want to close the application?")) + { + ApplicationManager.ShutDown(); + } + } + /// <summary> /// Powers off the machine. /// </summary> |
