diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-20 16:23:17 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-20 16:23:17 +0200 |
| commit | db9308c46379fb324678ba04771dbee4edae4b17 (patch) | |
| tree | a443967e7baeff8924e1aeb85ff4de3b5050510a /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | 88ac356fd2d30e016bb884697e7b67f8ede51d2b (diff) | |
| download | Tango-db9308c46379fb324678ba04771dbee4edae4b17.tar.gz Tango-db9308c46379fb324678ba04771dbee4edae4b17.zip | |
working on PPC Technician module .
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 18 |
1 files changed, 18 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 3cb790e65..9e8a9fe34 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -115,6 +115,12 @@ namespace Tango.PPC.UI.ViewModels /// Gets or sets the power command. /// </summary> public RelayCommand PowerCommand { get; set; } + + /// <summary> + /// Gets or sets the restart application command. + /// </summary> + public RelayCommand RestartApplicationCommand { get; set; } + #endregion #region Constructors @@ -139,6 +145,7 @@ namespace Tango.PPC.UI.ViewModels }); PowerCommand = new RelayCommand(() => IsPowerOpened = true); + RestartApplicationCommand = new RelayCommand(RestartApplication); } #endregion @@ -221,6 +228,17 @@ namespace Tango.PPC.UI.ViewModels } } + /// <summary> + /// Restarts the application. + /// </summary> + private async void RestartApplication() + { + if (await NotificationProvider.ShowQuestion("Are you sure you want to restart the application?")) + { + ApplicationManager.Restart(); + } + } + #endregion #region Override Methods |
