aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs17
1 files changed, 9 insertions, 8 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 100880cec..cf3cbab7d 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,6 +28,7 @@ using Tango.Transport;
using Tango.Integration.Printing;
using Tango.Integration.Diagnostics;
using Microsoft.Win32;
+using Tango.Integration.Observables.Enumerations;
namespace Tango.MachineStudio.Developer.ViewModels
{
@@ -209,14 +210,14 @@ namespace Tango.MachineStudio.Developer.ViewModels
set { _isSideBarOpened = value; RaisePropertyChangedAuto(); }
}
- private ObservableCollection<Io> _availableSensors;
+ private ObservableCollection<Io> _availableGraphs;
/// <summary>
/// Gets or sets the available sensors.
/// </summary>
- public ObservableCollection<Io> AvailableSensors
+ public ObservableCollection<Io> AvailableGraphs
{
- get { return _availableSensors; }
- set { _availableSensors = value; RaisePropertyChangedAuto(); }
+ get { return _availableGraphs; }
+ set { _availableGraphs = value; RaisePropertyChangedAuto(); }
}
private ObservableCollection<IRealTimeGraph> _graphs;
@@ -475,7 +476,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
if (!this.DesignMode)
{
Adapter = ObservablesEntitiesAdapter.Instance;
- AvailableSensors = Adapter.Ios.ToObservableCollection();
+ AvailableGraphs = Adapter.Ios.Where(x => (IOType)x.Type == IOType.Input || (IOType)x.Type == IOType.InputOutput).ToObservableCollection();
}
Graphs = new ObservableCollection<IRealTimeGraph>();
@@ -1124,7 +1125,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// Add sensor graph from available sensors to displayed graphs.
/// </summary>
/// <param name="sensor">The sensor.</param>
- public void OnDropAvailableSensor(Io sensor)
+ public void OnDropAvailableGraph(Io sensor)
{
if (Graphs.Count < 8)
{
@@ -1172,7 +1173,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
StartFullScreenGraph(sender as IRealTimeGraph);
};
Graphs.Add(graphControl);
- AvailableSensors.Remove(sensor);
+ AvailableGraphs.Remove(sensor);
_controllers.Add(sensor.Name, controller);
}
@@ -1212,7 +1213,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
_controllers.Remove(sensor.Name);
graph.InnerGraph.Dispose();
Graphs.Remove(graph);
- AvailableSensors.Insert(0, sensor);
+ AvailableGraphs.Insert(0, sensor);
}
#endregion