aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
diff options
context:
space:
mode:
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.cs20
1 files changed, 14 insertions, 6 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 fe28dfb20..562a3b659 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
@@ -256,12 +256,7 @@ namespace Tango.PPC.UI.ViewModels
StopPrintingCommand = new RelayCommand(StopPrinting);
SignOutCommand = new RelayCommand(SignOut);
- UpdateCommand = new RelayCommand(() =>
- {
- NavigationManager.NavigateTo(NavigationView.MachineUpdateView);
- TangoIOC.Default.GetInstance<MachineUpdateViewVM>().CheckForUpdates();
- IsMenuOpened = false;
- });
+ UpdateCommand = new RelayCommand(UpdateMachine);
PowerCommand = new RelayCommand(() => IsPowerOpened = true);
RestartApplicationCommand = new RelayCommand(RestartApplication);
@@ -425,6 +420,19 @@ namespace Tango.PPC.UI.ViewModels
}
}
+ private void UpdateMachine()
+ {
+ if (MachineProvider.MachineOperator.IsPrinting)
+ {
+ NotificationProvider.ShowInfo("Cannot perform a machine update while the machine is dyeing.");
+ return;
+ }
+
+ NavigationManager.NavigateTo(NavigationView.MachineUpdateView);
+ TangoIOC.Default.GetInstance<MachineUpdateViewVM>().CheckForUpdates();
+ IsMenuOpened = false;
+ }
+
#endregion
#region Override Methods