aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-07-27 04:09:45 +0300
committerRoy <Roy.mail.net@gmail.com>2023-07-27 04:09:45 +0300
commitd9d009df1da8630ec6726ed506865ca9818d1eff (patch)
tree46db9f8310e8525e51f6ac1865fe622da61b966b /Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels
parent3038323fb9bb7f37bf0cb35f3b7e08adae075b99 (diff)
downloadTango-d9d009df1da8630ec6726ed506865ca9818d1eff.tar.gz
Tango-d9d009df1da8630ec6726ed506865ca9818d1eff.zip
More advanced job resume.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs27
1 files changed, 23 insertions, 4 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 65ffca36a..46898210e 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,7 +101,7 @@ namespace Tango.PPC.Jobs.ViewModels
public bool CanEdit
{
- get { return !MachineProvider.MachineOperator.IsPrinting || MachineProvider.MachineOperator.RunningJob == null || MachineProvider.MachineOperator.RunningJob.Guid != Job.Guid; }
+ get { return (!MachineProvider.MachineOperator.IsPrinting || MachineProvider.MachineOperator.RunningJob == null || MachineProvider.MachineOperator.RunningJob.Guid != Job.Guid) && !HasResumeModel; }
}
private ICollectionView _segmentsCollectionView;
@@ -291,7 +291,7 @@ namespace Tango.PPC.Jobs.ViewModels
public JobResumeModel ResumeModel
{
get { return _resumeModel; }
- set { _resumeModel = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(HasResumeModel)); }
+ set { _resumeModel = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(HasResumeModel)); RaisePropertyChanged(nameof(CanEdit)); }
}
public bool HasResumeModel
@@ -355,6 +355,8 @@ namespace Tango.PPC.Jobs.ViewModels
public RelayCommand NavigateBackToJobs { get; set; }
+ public RelayCommand DropResumeCommand { get; set; }
+
#endregion
#region collapsed mode commands
@@ -427,6 +429,8 @@ 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);
+
NavigateBackToJobs = new RelayCommand(NavigateBack);
IsFullMode = true;
@@ -537,7 +541,7 @@ namespace Tango.PPC.Jobs.ViewModels
RaisePropertyChanged(nameof(SelectedRML));
await LoadRML(_selectedRML);
- if(BuildProvider.IsEureka && Job.Segments.Count == 1 && Job.Segments[0].BrushStops.Count == 1)
+ if (BuildProvider.IsEureka && Job.Segments.Count == 1 && Job.Segments[0].BrushStops.Count == 1)
{
IsBasicMode = true;
}
@@ -1780,7 +1784,10 @@ namespace Tango.PPC.Jobs.ViewModels
RaisePropertyChanged(nameof(CanEdit));
- UpdateJobResume(e);
+ if (BuildProvider.IsEureka)
+ {
+ UpdateJobResume(e);
+ }
}
@@ -1839,6 +1846,18 @@ namespace Tango.PPC.Jobs.ViewModels
}
}
+ private async void DropResume()
+ {
+ if (Job != null && HasResumeModel)
+ {
+ if (await NotificationProvider.ShowQuestion("Drop resume information and enable job editing?"))
+ {
+ JobResumeDB.Default.Delete(Job.Guid);
+ ResumeModel = null;
+ }
+ }
+ }
+
#endregion
}
}