diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-14 03:43:16 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-14 03:43:16 +0300 |
| commit | d9322cdd83c46d1add0a3c8421e28ee878c29396 (patch) | |
| tree | db0dd91f24b9ae7af438f498a4f6200e04977599 /Software/Visual_Studio/PPC | |
| parent | 61bc5d6672a0dd3c7fd0f8e1a95d5c037fb20cab (diff) | |
| download | Tango-d9322cdd83c46d1add0a3c8421e28ee878c29396.tar.gz Tango-d9322cdd83c46d1add0a3c8421e28ee878c29396.zip | |
Machine Operator Printing Operations Major Refactoring.
Revived Job Resume for X1/X4/PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC')
3 files changed, 22 insertions, 15 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs index 5e0d36da5..59de35d51 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs @@ -70,31 +70,38 @@ namespace Tango.PPC.Jobs.ViewModels { _handler = e.JobHandler; - if (resuming) + if (!BuildProvider.MachineType.IsXMachine()) { - resuming = false; - - InvokeUI(() => + if (resuming) { - NavigationManager.NavigateTo<JobsV2Module>(nameof(JobProgressView)); + resuming = false; - if (_last_failed_job_notification != null) + InvokeUI(() => { - _last_failed_job_notification.Close(); - _last_failed_job_notification = null; - } - }); + NavigationManager.NavigateTo<JobsV2Module>(nameof(JobProgressView)); + + if (_last_failed_job_notification != null) + { + _last_failed_job_notification.Close(); + _last_failed_job_notification = null; + } + }); + } } } - private void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e) + private async void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e) { LogManager.Log($"Job resume request '{e.JobGuid}' approving..."); try { - e.Approve(); - resuming = true; + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var job = await new JobBuilder(db).Set(e.JobGuid).WithRML(null).WithConfiguration().WithSegments().WithBrushStops().BuildAsync(); + e.Approve(job); + resuming = true; + } } catch (Exception ex) { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Synchronization/DefaultMachineDataSynchronizer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Synchronization/DefaultMachineDataSynchronizer.cs index d1fb283b0..84b8a8851 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Synchronization/DefaultMachineDataSynchronizer.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Synchronization/DefaultMachineDataSynchronizer.cs @@ -488,7 +488,7 @@ namespace Tango.PPC.Common.Synchronization { _synchronizedOnce = true; - if (!IsEnabled || IsSynchronizing) return; + if (!IsEnabled || IsSynchronizing || _machineProvider.MachineOperator.IsPrinting) return; var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); 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 59f4d4f93..f153b3636 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -1207,7 +1207,7 @@ namespace Tango.PPC.UI.ViewModels } } - private async void DropResume() + private void DropResume() { if (Job != null && HasResumeModel) { |
