From 499f4facfe296d984a44e9ce0b6e1eb23ba8d644 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 5 Mar 2019 14:53:49 +0200 Subject: Improvements and bug fixes on PPC. --- .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 33 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs') 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; + /// + /// Gets or sets a value indicating whether the power area is opened. + /// + public bool IsPowerOpened + { + get { return _isPowerOpened; } + set { _isPowerOpened = value; RaisePropertyChangedAuto(); } } #endregion @@ -90,6 +111,10 @@ namespace Tango.PPC.UI.ViewModels /// public RelayCommand UpdateCommand { get; set; } + /// + /// Gets or sets the power command. + /// + 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().CheckForUpdates(); IsMenuOpened = false; }); + + PowerCommand = new RelayCommand(() => IsPowerOpened = true); } #endregion -- cgit v1.3.1