From 781e923508aafa6d39c3d38f1b1d4664dedbb83d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 8 Feb 2018 11:35:59 +0200 Subject: Modified IO Table To Graphs. Starting to IO's to separate components... --- .../Modules/Tango.MachineStudio.Developer/ViewModels/IOVM.cs | 6 +++--- .../Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 11 +++++------ .../ViewModels/MonitoringViewVM.cs | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/IOVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/IOVM.cs index 83eee1333..e2a4fae0e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/IOVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/IOVM.cs @@ -10,8 +10,8 @@ namespace Tango.MachineStudio.Developer.ViewModels { public class IOVM : ExtendedObject { - private Io _io; - public Io IO + private Graph _io; + public Graph IO { get { return _io; } set { _io = value; RaisePropertyChangedAuto(); } @@ -38,7 +38,7 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _value = value; RaisePropertyChanged(nameof(Value)); } } - public IOVM(Io io, String name) + public IOVM(Graph io, String name) { IO = io; Name = name; 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 cf3cbab7d..e1166a9bc 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 @@ -28,7 +28,6 @@ using Tango.Transport; using Tango.Integration.Printing; using Tango.Integration.Diagnostics; using Microsoft.Win32; -using Tango.Integration.Observables.Enumerations; namespace Tango.MachineStudio.Developer.ViewModels { @@ -210,11 +209,11 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _isSideBarOpened = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _availableGraphs; + private ObservableCollection _availableGraphs; /// /// Gets or sets the available sensors. /// - public ObservableCollection AvailableGraphs + public ObservableCollection AvailableGraphs { get { return _availableGraphs; } set { _availableGraphs = value; RaisePropertyChangedAuto(); } @@ -476,7 +475,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (!this.DesignMode) { Adapter = ObservablesEntitiesAdapter.Instance; - AvailableGraphs = Adapter.Ios.Where(x => (IOType)x.Type == IOType.Input || (IOType)x.Type == IOType.InputOutput).ToObservableCollection(); + AvailableGraphs = Adapter.Graphs.ToObservableCollection(); } Graphs = new ObservableCollection(); @@ -1125,7 +1124,7 @@ namespace Tango.MachineStudio.Developer.ViewModels /// Add sensor graph from available sensors to displayed graphs. /// /// The sensor. - public void OnDropAvailableGraph(Io sensor) + public void OnDropAvailableGraph(Graph sensor) { if (Graphs.Count < 8) { @@ -1209,7 +1208,7 @@ namespace Tango.MachineStudio.Developer.ViewModels /// The graph. public void RemoveGraph(IRealTimeGraph graph) { - var sensor = graph.Tag as Io; + var sensor = graph.Tag as Graph; _controllers.Remove(sensor.Name); graph.InnerGraph.Dispose(); Graphs.Remove(graph); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MonitoringViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MonitoringViewVM.cs index 8edbd7b83..a0cba6b6b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MonitoringViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MonitoringViewVM.cs @@ -47,7 +47,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (!this.DesignMode) { Adapter = ObservablesEntitiesAdapter.Instance; - AvailableControllers = Adapter.Ios.Select(x => new IOVM(x, x.Name)).ToObservableCollection(); + AvailableControllers = Adapter.Graphs.Select(x => new IOVM(x, x.Name)).ToObservableCollection(); } Controllers = new ObservableCollection(); -- cgit v1.3.1