aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-11 21:14:24 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-11 21:14:24 +0200
commitf4b1d1fce72c7b478d9603db8dfd66e471c9f467 (patch)
treecc101a2828cd40890a1b74614306f0e5d835bb2d /Software/Visual_Studio/MachineStudio
parente739594789125844da1d1ba6ed8d9e4994ad834b (diff)
downloadTango-f4b1d1fce72c7b478d9603db8dfd66e471c9f467.tar.gz
Tango-f4b1d1fce72c7b478d9603db8dfd66e471c9f467.zip
Implemented DisableRendering on RealTimeGraphX.
Implemented partial rendering on tech board.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs77
1 files changed, 77 insertions, 0 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 36f7940ed..90ca3c017 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
@@ -116,6 +116,8 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
_selectedTab.IsSelected = true;
}
+
+ EnableRenderingForSelectedTabGraphs();
}
}
@@ -732,6 +734,81 @@ namespace Tango.MachineStudio.Technician.ViewModels
#region Private Methods
+ private void EnableRenderingForSelectedTabGraphs()
+ {
+ if (SelectedTab != null)
+ {
+ lock (_elementsLock)
+ {
+ var elements = Tabs.SelectMany(x => x.Elements).ToList();
+
+ foreach (var element in elements)
+ {
+ if (SelectedTab.Elements.Contains(element))
+ {
+ var item = element.HostedElement as TechItem;
+
+ if (item != null)
+ {
+ if (item.GetType() == typeof(SingleGraphItem))
+ {
+ SingleGraphItem graphItem = item as SingleGraphItem;
+
+ TechGraphController controller = null;
+
+ if (_singleControllers.TryGetValue(graphItem, out controller))
+ {
+ controller.DisableRendering = false;
+ }
+ }
+ else if (item.GetType() == typeof(MultiGraphItem))
+ {
+ MultiGraphItem graphItem = item as MultiGraphItem;
+
+ TechGraphController controller = null;
+
+ if (_multiControllers.TryGetValue(graphItem, out controller))
+ {
+ controller.DisableRendering = false;
+ }
+ }
+ }
+ }
+ else
+ {
+ var item = element.HostedElement as TechItem;
+
+ if (item != null)
+ {
+ if (item.GetType() == typeof(SingleGraphItem))
+ {
+ SingleGraphItem graphItem = item as SingleGraphItem;
+
+ TechGraphController controller = null;
+
+ if (_singleControllers.TryGetValue(graphItem, out controller))
+ {
+ controller.DisableRendering = true;
+ }
+ }
+ else if (item.GetType() == typeof(MultiGraphItem))
+ {
+ MultiGraphItem graphItem = item as MultiGraphItem;
+
+ TechGraphController controller = null;
+
+ if (_multiControllers.TryGetValue(graphItem, out controller))
+ {
+ controller.DisableRendering = true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
/// <summary>
/// Gets the last data point from a protobuf repeated field.
/// </summary>