aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs4
3 files changed, 13 insertions, 12 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
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
index f92f96160..cdfef3b0d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
@@ -1789,7 +1789,7 @@
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="DimGray" FontSize="16" FontWeight="SemiBold">AVAILABLE GRAPHS</TextBlock>
</StackPanel>
<ScrollViewer Margin="0 5 0 0" VerticalScrollBarVisibility="Auto">
- <ItemsControl Margin="0 0 5 0" ItemsSource="{Binding AvailableSensors}">
+ <ItemsControl Margin="0 0 5 0" ItemsSource="{Binding AvailableGraphs}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2" IsItemsHost="True"></UniformGrid>
@@ -1815,7 +1815,7 @@
</Grid>
<Grid>
- <Grid Margin="0 0 10 0" Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnDropAvailableSensor">
+ <Grid Margin="0 0 10 0" Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnDropAvailableGraph">
<Border>
<ItemsControl ItemsSource="{Binding Graphs}">
<ItemsControl.ItemsPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
index 9a0a4dc0e..e9111c86c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs
@@ -104,11 +104,11 @@ namespace Tango.MachineStudio.Developer.Views
}
}
- private void OnDropAvailableSensor(object sender, DropEventArgs e)
+ private void OnDropAvailableGraph(object sender, DropEventArgs e)
{
if (e.Draggable.DataContext is Io)
{
- _vm.OnDropAvailableSensor(e.Draggable.DataContext as Io);
+ _vm.OnDropAvailableGraph(e.Draggable.DataContext as Io);
}
}