From c3b117cb5612295c80e1ed3da1cc10a582d5cb9f Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 29 May 2023 15:57:53 +0300 Subject: PPC. Bug error GoTOJob when job is null. Related Work Items: #8486 --- .../PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index 1182ba50e..68c0f1867 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -45,6 +45,7 @@ namespace Tango.PPC.UI.ViewModels if (_job == null) IsDyeingProcess = false; RaisePropertyChangedAuto(); + InvalidateRelayCommands(); } } @@ -243,7 +244,7 @@ namespace Tango.PPC.UI.ViewModels StopCommand = new RelayCommand(StopJob, () => CanStopped()); AbortCommand = new RelayCommand(AbortJob, () => CanStopped()); - GoToJobCommand = new RelayCommand(GoToJob); + GoToJobCommand = new RelayCommand(GoToJob, () => IsEnableGoToJob()); JobStatusViewCommand = new RelayCommand(JobStatusView); OverviewViewCommand = new RelayCommand(OverviewView); ClearAllNotificationsCommand = new RelayCommand(ClearAllNotifications); @@ -467,6 +468,11 @@ namespace Tango.PPC.UI.ViewModels #region Methods + private bool IsEnableGoToJob() + { + return Job != null && _handler != null; + } + private void GoToJob() { -- cgit v1.3.1