From 7a222e41a3b28e6fff6917b711b794644fa04a34 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 24 Aug 2025 18:50:28 +0300 Subject: Machine Designer Improved outline. --- .../ViewModels/MainViewVM.cs | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 073f79a97..d262e154e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -240,7 +240,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { get { - if (Settings.UsePreferredLiquidVolumeIndex) + if (Settings != null && Settings.UsePreferredLiquidVolumeIndex) { return LiquidTypesRmls.OrderBy(x => x.LiquidType.PreferredIndex).ToList(); } @@ -1091,26 +1091,26 @@ namespace Tango.MachineStudio.Developer.ViewModels private void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e) { - if (_notification.ShowQuestion("Machine studio has detected a job in progress. Would you like to try and continue from there you were?")) - { - var job = _machineDbContext.Jobs.SingleOrDefault(x => x.Guid == e.JobGuid); - - if (job != null) - { - _msNavigation.NavigateToModule(); - SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == job.MachineGuid); - SelectedMachineJob = SelectedMachine.Jobs.SingleOrDefault(x => x.Guid == job.Guid); - LoadSelectedJob(() => - { - StartJob(e.Approve); - }); - } - else - { - LogManager.Log($"Could not resume job. The running job with guid '{e.JobGuid}' was not found."); - _notification.ShowError("Could not resume job. The running job was not found."); - } - } + //if (_notification.ShowQuestion("Machine studio has detected a job in progress. Would you like to try and continue from there you were?")) + //{ + // var job = _machineDbContext.Jobs.SingleOrDefault(x => x.Guid == e.JobGuid); + + // if (job != null) + // { + // _msNavigation.NavigateToModule(); + // SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == job.MachineGuid); + // SelectedMachineJob = SelectedMachine.Jobs.SingleOrDefault(x => x.Guid == job.Guid); + // LoadSelectedJob(() => + // { + // StartJob(e.Approve); + // }); + // } + // else + // { + // LogManager.Log($"Could not resume job. The running job with guid '{e.JobGuid}' was not found."); + // _notification.ShowError("Could not resume job. The running job was not found."); + // } + //} } private void MachineEventsStateProvider_NewEvents(object sender, IEnumerable events) -- cgit v1.3.1