aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-12-23 23:06:51 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-12-23 23:06:51 +0200
commit941679fac898ab6c488674f611e157d5094a8c83 (patch)
treedea9ab97cefed258aeae14539ca04c5ddec79bfc /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
parent673094ec9200776ff0867ee74be29dff3e275294 (diff)
downloadTango-941679fac898ab6c488674f611e157d5094a8c83.tar.gz
Tango-941679fac898ab6c488674f611e157d5094a8c83.zip
Fixed issue with machine studio job view performance.
Added support for cct caching on RmlBuilder.
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.cs13
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();
}