diff options
| author | Avi Levkovich <avi@twine-s.com> | 2019-03-25 11:21:26 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2019-03-25 11:21:26 +0200 |
| commit | 43e2630744b4ae038d956229723b2bd5ccc6d3f7 (patch) | |
| tree | 4d8d24294957809d8c79d6e4b258178f23d8e9f2 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | |
| parent | ad7e11910e34b683035feb89776b4ac6686df3c5 (diff) | |
| parent | 0aaf60dbc0322abc6707b5cf057d797fc26a1734 (diff) | |
| download | Tango-43e2630744b4ae038d956229723b2bd5ccc6d3f7.tar.gz Tango-43e2630744b4ae038d956229723b2bd5ccc6d3f7.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
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 | 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 |
