diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-22 16:10:48 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-22 16:10:48 +0300 |
| commit | 829a1f93613c09782c4411431de5fb2b79b364d6 (patch) | |
| tree | 8b80bdffae83aa4be2fe3de0224a54aa73d2f7f8 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs | |
| parent | fa5e1c45ab2da4e988cf256c0e5ec521288e537f (diff) | |
| download | Tango-829a1f93613c09782c4411431de5fb2b79b364d6.tar.gz Tango-829a1f93613c09782c4411431de5fb2b79b364d6.zip | |
Implemented graphs rendering control (NavigatedTo/From) on technician module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index c1dfe5f8c..91c80a41a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -49,6 +49,7 @@ namespace Tango.MachineStudio.Technician.ViewModels private IEventLogger _eventLogger; private DateTime _lastDiagnosticsResponseUpdate; private const int MIN_DIAGNOSTICS_UPDATE_MILI = 500; + private bool _isViewLoaded; #region Properties @@ -243,6 +244,7 @@ namespace Tango.MachineStudio.Technician.ViewModels CurrentDiagnosticsResponseSize = data.CalculateSize(); } + lock (_elementsLock) { var elements = Elements.ToList(); @@ -769,7 +771,7 @@ namespace Tango.MachineStudio.Technician.ViewModels } catch (Exception ex) { - LogManager.Log(ex, String.Format("Error executing technician command '{0}' on item '{1}'.", action,item.TechName)); + LogManager.Log(ex, String.Format("Error executing technician command '{0}' on item '{1}'.", action, item.TechName)); _eventLogger.Log(ex, String.Format("Error executing technician command '{0}' on item '{1}'.", action, item.TechName)); } }; @@ -1207,6 +1209,18 @@ namespace Tango.MachineStudio.Technician.ViewModels #region IStudioModuleVM + public override void OnNavigatedTo() + { + base.OnNavigatedTo(); + _singleControllers.ToList().ForEach(x => x.Value.ChangeRenderMode(true)); + } + + public override void OnNavigatedFrom() + { + base.OnNavigatedFrom(); + _singleControllers.ToList().ForEach(x => x.Value.ChangeRenderMode(false)); + } + public override void OnShuttingDown() { InvokeUINow(() => |
