From db9308c46379fb324678ba04771dbee4edae4b17 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 20 Mar 2019 16:23:17 +0200 Subject: working on PPC Technician module . --- .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels') 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. /// public RelayCommand PowerCommand { get; set; } + + /// + /// Gets or sets the restart application command. + /// + 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 } } + /// + /// Restarts the application. + /// + private async void RestartApplication() + { + if (await NotificationProvider.ShowQuestion("Are you sure you want to restart the application?")) + { + ApplicationManager.Restart(); + } + } + #endregion #region Override Methods -- cgit v1.3.1