aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-03-12 18:36:19 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-03-12 18:36:19 +0200
commitae18d2f719a92d55d0427273128975d34a4939e7 (patch)
tree96aea7bfbf8ada0417b601b4507f2a2c4fd9563b /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
parentdfc268012d5c72e9a545b0d9f4ecfaf21758eb1c (diff)
parent81d88a18ac614604befb041a81781ab33eb08067 (diff)
downloadTango-ae18d2f719a92d55d0427273128975d34a4939e7.tar.gz
Tango-ae18d2f719a92d55d0427273128975d34a4939e7.zip
merge
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.cs33
1 files changed, 30 insertions, 3 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 52f0fb403..1c1eeca5e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
@@ -38,7 +38,15 @@ namespace Tango.PPC.UI.ViewModels
public bool IsMenuOpened
{
get { return _isMenuOpened; }
- set { _isMenuOpened = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _isMenuOpened = value; RaisePropertyChangedAuto();
+
+ if (!_isMenuOpened)
+ {
+ IsPowerOpened = false;
+ }
+ }
}
private bool _isNotificationsOpened;
@@ -48,7 +56,20 @@ namespace Tango.PPC.UI.ViewModels
public bool IsNotificationsOpened
{
get { return _isNotificationsOpened; }
- set { _isNotificationsOpened = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _isNotificationsOpened = value; RaisePropertyChangedAuto();
+ }
+ }
+
+ private bool _isPowerOpened;
+ /// <summary>
+ /// Gets or sets a value indicating whether the power area is opened.
+ /// </summary>
+ public bool IsPowerOpened
+ {
+ get { return _isPowerOpened; }
+ set { _isPowerOpened = value; RaisePropertyChangedAuto(); }
}
#endregion
@@ -90,6 +111,10 @@ namespace Tango.PPC.UI.ViewModels
/// </summary>
public RelayCommand UpdateCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the power command.
+ /// </summary>
+ public RelayCommand PowerCommand { get; set; }
#endregion
#region Constructors
@@ -106,12 +131,14 @@ namespace Tango.PPC.UI.ViewModels
StopPrintingCommand = new RelayCommand(StopPrinting);
SignOutCommand = new RelayCommand(SignOut);
- UpdateCommand = new RelayCommand(() =>
+ UpdateCommand = new RelayCommand(() =>
{
NavigationManager.NavigateTo(NavigationView.MachineUpdateView);
TangoIOC.Default.GetInstance<MachineUpdateViewVM>().CheckForUpdates();
IsMenuOpened = false;
});
+
+ PowerCommand = new RelayCommand(() => IsPowerOpened = true);
}
#endregion