diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 13 |
1 files changed, 8 insertions, 5 deletions
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 fc0680d9c..4cc41e5a7 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 @@ -91,6 +91,7 @@ namespace Tango.MachineStudio.Developer.ViewModels private JobDTO _beforeSaveJobDTO; private IActionLogManager _actionLogManager; private RmlDTO _selectedRMLBeforeLiquidFactorsSaves; + private List<Cct> _cctCache; #region Properties @@ -757,6 +758,8 @@ namespace Tango.MachineStudio.Developer.ViewModels { _converter = new DefaultColorConverter(); + _cctCache = new List<Cct>(); + CanWork = true; EnableColorConversion = true; @@ -1622,7 +1625,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { LogManager.Log("Invalidating liquid factors, process parameters and process group history..."); - _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML.Guid).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCCT().WithLiquidFactors().WithSpools().Build(); + _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCctCache(_cctCache).WithCCT().WithLiquidFactors().WithSpools().Build(); _selectedRMLBeforeLiquidFactorsSaves = RmlDTO.FromObservable(_selectedRML); @@ -1679,7 +1682,7 @@ namespace Tango.MachineStudio.Developer.ViewModels InvalidateLiquidFactorsAndProcessTables(); } catch - {} + { } finally { IsFree = true; @@ -1867,7 +1870,7 @@ namespace Tango.MachineStudio.Developer.ViewModels _activeJobDbContext.Spools.Where(x => x.MachineGuid == SelectedMachine.Guid).Load(); LogManager.Log("Setting active job..."); - ActiveJob = new JobBuilder(_activeJobDbContext).Set(SelectedMachineJob.Guid).WithUser().WithSegments().WithBrushStops().WithConfiguration().WithRML().Build(); + ActiveJob = new JobBuilder(_activeJobDbContext).Set(SelectedMachineJob.Guid).WithUser().WithSegments().WithBrushStops().WithConfiguration().WithRML(_cctCache).Build(); //_activeJobDbContext.Ccts.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); //_activeJobDbContext.Cats.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); @@ -2332,7 +2335,7 @@ namespace Tango.MachineStudio.Developer.ViewModels } SelectedSegment.BrushStops.Remove(x); var existingBrushStop = _activeJobDbContext.BrushStops.FirstOrDefault(y => y.Guid == x.Guid); - if(existingBrushStop != null) + if (existingBrushStop != null) { _activeJobDbContext.BrushStops.Remove(existingBrushStop); } @@ -2372,7 +2375,7 @@ namespace Tango.MachineStudio.Developer.ViewModels stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8); stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML, SelectedProcessParametersTable); SelectedSegment.BrushStops.Add(stop); - // _activeJobDbContext.BrushStops.Add(stop); + // _activeJobDbContext.BrushStops.Add(stop); SelectedSegment.BrushStops.ToList().ForEach(x => x.RaiseOffsetChanged()); ArrangeBrushStopsIndices(); } |
