diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-29 15:57:53 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-29 15:57:53 +0300 |
| commit | c3b117cb5612295c80e1ed3da1cc10a582d5cb9f (patch) | |
| tree | 0b14d3c844e87795cc8dbde8896164266d6562ef /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | |
| parent | bfd64387ce0d2584bfcf2f5b31980395625634fe (diff) | |
| download | Tango-c3b117cb5612295c80e1ed3da1cc10a582d5cb9f.tar.gz Tango-c3b117cb5612295c80e1ed3da1cc10a582d5cb9f.zip | |
PPC. Bug error GoTOJob when job is null.
Related Work Items: #8486
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 8 |
1 files changed, 7 insertions, 1 deletions
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() { |
