aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-03-25 14:35:30 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-03-25 14:35:30 +0200
commitcbb5066b1997bb430e33a89e742fd0b5c440a388 (patch)
tree3b45ad87006780a11f0323a5716cdd0a85d30d30 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
parent0a3f882fe4d388d7387a165349595208cf96a3ae (diff)
parentdf1a05d5586fbce72e9aa2cb05cd64f74d1b98e9 (diff)
downloadTango-cbb5066b1997bb430e33a89e742fd0b5c440a388.tar.gz
Tango-cbb5066b1997bb430e33a89e742fd0b5c440a388.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs37
1 files changed, 37 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 1c1eeca5e..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
@@ -244,6 +262,25 @@ namespace Tango.PPC.UI.ViewModels
#endregion
+ #region Public Methods
+
+ /// <summary>
+ /// Toggles the application technician mode.
+ /// </summary>
+ public void ToggleTechnicianMode()
+ {
+ if (!ApplicationManager.IsInTechnicianMode)
+ {
+ ApplicationManager.EnterTechnicianMode();
+ }
+ else
+ {
+ ApplicationManager.ExitTechnicianMode();
+ }
+ }
+
+ #endregion
+
#region Event Handlers
/// <summary>