diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs index ee3cece33..a9ee25238 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs @@ -101,11 +101,12 @@ namespace Tango.PPC.Jobs.ViewModels public bool CanEdit { - get { - return Job != null && - (!MachineProvider.MachineOperator.IsPrinting - || MachineProvider.MachineOperator.RunningJob == null - || MachineProvider.MachineOperator.RunningJob.Guid != Job.Guid) + get + { + return Job != null && + (!MachineProvider.MachineOperator.IsPrinting + || MachineProvider.MachineOperator.RunningJob == null + || MachineProvider.MachineOperator.RunningJob.Guid != Job.Guid) && !HasResumeModel; } } @@ -116,7 +117,7 @@ namespace Tango.PPC.Jobs.ViewModels { return Job != null && HasResumeModel && (!MachineProvider.MachineOperator.IsPrinting - || (MachineProvider.MachineOperator.RunningJob != null + || (MachineProvider.MachineOperator.RunningJob != null && MachineProvider.MachineOperator.RunningJob.Guid != Job.Guid)); } } @@ -292,7 +293,7 @@ namespace Tango.PPC.Jobs.ViewModels } } } - + private JobResumeModel _resumeModel; public JobResumeModel ResumeModel { @@ -435,7 +436,7 @@ namespace Tango.PPC.Jobs.ViewModels CopyCommand = new RelayCommand(Copy); UndoCommand = new RelayCommand(Undo);//(x) => { return UndoRedoManager.Instance.IsEnableUndoOperation(); } RedoCommand = new RelayCommand(Redo);//(x) => { return UndoRedoManager.Instance.IsEnableRedoOperation();} - DropResumeCommand = new RelayCommand(DropResume, (x)=> CanDropResume); + DropResumeCommand = new RelayCommand(DropResume, (x) => CanDropResume); NavigateBackToJobs = new RelayCommand(NavigateBack); @@ -522,7 +523,7 @@ namespace Tango.PPC.Jobs.ViewModels } RaisePropertyChanged(nameof(CanEdit)); - DropResumeCommand.RaiseCanExecuteChanged(); + DropResumeCommand.RaiseCanExecuteChanged(); Job.NameChanged -= Job_NameChanged; Job.NameChanged += Job_NameChanged; @@ -1169,7 +1170,7 @@ namespace Tango.PPC.Jobs.ViewModels DialogEditObject = new ColorSelectionViewVM.DialogObject() { SelectedSegment = segment, - BrushStopForEdit = new BrushStopModel(segment), + BrushStopForEdit = new BrushStopModel(segment, null), IsEditingMode = false, Catalogs = _catalogs } @@ -1776,10 +1777,10 @@ namespace Tango.PPC.Jobs.ViewModels private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e) { RaisePropertyChanged(nameof(CanEdit)); - InvokeUI( () => - { - DropResumeCommand.RaiseCanExecuteChanged(); - }); + InvokeUI(() => + { + DropResumeCommand.RaiseCanExecuteChanged(); + }); } private void MachineOperator_PrintingEnded(object sender, Integration.Operation.PrintingEventArgs e) |
