aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-06 18:39:56 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-06 18:39:56 +0300
commit47c0f9224c370009c3b37f6db83ec99c31d859f8 (patch)
tree5b70c05f2254a3edd8b9af26eb19d61efb450c27 /Software
parent038e6c51a405b39f35f70f9481a4277f39517204 (diff)
downloadTango-47c0f9224c370009c3b37f6db83ec99c31d859f8.tar.gz
Tango-47c0f9224c370009c3b37f6db83ec99c31d859f8.zip
Added support for Win7 for stubs UI.
Added Dancers, Winders, PID Controls on tech module. Some code cleanups.
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin1572864 -> 1572864 bytes
-rw-r--r--Software/Graphics/dancer-big.pngbin0 -> 7870 bytes
-rw-r--r--Software/Graphics/dancer-small.pngbin0 -> 2072 bytes
-rw-r--r--Software/Graphics/function.pngbin0 -> 1867 bytes
-rw-r--r--Software/Graphics/pid.pngbin0 -> 14262 bytes
-rw-r--r--Software/Graphics/winder-big.pngbin0 -> 10598 bytes
-rw-r--r--Software/Graphics/winder-small.pngbin0 -> 2819 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml79
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml.cs102
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml79
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml.cs102
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml79
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml.cs102
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-big.pngbin0 -> 7870 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-small.pngbin0 -> 2072 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/function.pngbin0 -> 1867 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/pid.pngbin0 -> 14262 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-big.pngbin0 -> 10598 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-small.pngbin0 -> 2819 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml78
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml78
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml78
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj59
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs104
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs104
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs104
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs218
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml33
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineSerialViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml6
-rw-r--r--Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs2
-rw-r--r--Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs1
-rw-r--r--Software/Visual_Studio/Tango.Editors/HybridControl.cs1
-rw-r--r--Software/Visual_Studio/Tango.Editors/ISupportEditingOperations.cs1
-rw-r--r--Software/Visual_Studio/Tango.Editors/ISupportUndoRedoOperations.cs1
-rw-r--r--Software/Visual_Studio/Tango.Editors/RelayCommand.cs6
-rw-r--r--Software/Visual_Studio/Tango.Editors/Tango.Editors.csproj2
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs9
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/ViewModel.cs2
-rw-r--r--Software/Visual_Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs1
-rw-r--r--Software/Visual_Studio/Tango.Transport/Adapters/UsbTransportAdapter.cs1
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj51
49 files changed, 1557 insertions, 30 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index 3883b9927..254fd1904 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index ae751d129..f23c7df0d 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Graphics/dancer-big.png b/Software/Graphics/dancer-big.png
new file mode 100644
index 000000000..ce3e97b55
--- /dev/null
+++ b/Software/Graphics/dancer-big.png
Binary files differ
diff --git a/Software/Graphics/dancer-small.png b/Software/Graphics/dancer-small.png
new file mode 100644
index 000000000..df35577d8
--- /dev/null
+++ b/Software/Graphics/dancer-small.png
Binary files differ
diff --git a/Software/Graphics/function.png b/Software/Graphics/function.png
new file mode 100644
index 000000000..92ccdbf4b
--- /dev/null
+++ b/Software/Graphics/function.png
Binary files differ
diff --git a/Software/Graphics/pid.png b/Software/Graphics/pid.png
new file mode 100644
index 000000000..a0295f7fb
--- /dev/null
+++ b/Software/Graphics/pid.png
Binary files differ
diff --git a/Software/Graphics/winder-big.png b/Software/Graphics/winder-big.png
new file mode 100644
index 000000000..46906084f
--- /dev/null
+++ b/Software/Graphics/winder-big.png
Binary files differ
diff --git a/Software/Graphics/winder-small.png b/Software/Graphics/winder-small.png
new file mode 100644
index 000000000..4a9e5e779
--- /dev/null
+++ b/Software/Graphics/winder-small.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
index f4a0c6b0b..8366a3e83 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
@@ -102,16 +102,6 @@ namespace Tango.MachineStudio.DB.ViewModels
set { _filter = value; RaisePropertyChangedAuto(); OnFilterChanged(value); }
}
- private ObservableCollection<String> _validationErrors;
- /// <summary>
- /// Gets or sets the validation errors.
- /// </summary>
- public ObservableCollection<String> ValidationErrors
- {
- get { return _validationErrors; }
- set { _validationErrors = value; RaisePropertyChangedAuto(); }
- }
-
/// <summary>
/// Gets or sets the dialog OK command.
/// </summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml
new file mode 100644
index 000000000..3c6ee7d49
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml
@@ -0,0 +1,79 @@
+<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.DancerElementEditor"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
+ xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals"
+ xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
+ mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:DancerItem, IsDesignTimeCreatable=False}" Height="99.188" Width="163.459">
+
+ <UserControl.Resources>
+ <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
+ <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+
+ <!--Theme-->
+ <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
+ <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush>
+ </UserControl.Resources>
+
+ <UserControl.RenderTransform>
+ <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform>
+ </UserControl.RenderTransform>
+
+ <Grid>
+
+
+ <!--Content-->
+ <Grid IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}">
+
+ <Image Source="../Images/dancer-big.png"></Image>
+
+ <Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
+ <TextBlock Text="{Binding HardwareDancerType.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
+ </Border>
+ </Grid>
+ <!--Content-->
+
+
+ <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected),Converter={StaticResource BoolToVisibilityConverter}}">
+ <Grid>
+ <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter>
+
+ <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+
+ <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10">
+ <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse>
+ <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle>
+ <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
+</local:ElementEditor>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml.cs
new file mode 100644
index 000000000..a83050194
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DancerElementEditor.xaml.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Editors;
+using Tango.BL.Entities;
+using Tango.MachineStudio.Technician.TechItems;
+
+namespace Tango.MachineStudio.Technician.Editors
+{
+ [ContentProperty("InnerContent")]
+ public partial class DancerElementEditor : ElementEditor
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DancerElementEditor"/> class.
+ /// </summary>
+ public DancerElementEditor()
+ : base()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DancerElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ public DancerElementEditor(DancerItem dancerItem)
+ : this()
+ {
+ DancerItem = dancerItem;
+ DataContext = DancerItem;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DancerElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ /// <param name="bounds">The bounds.</param>
+ public DancerElementEditor(DancerItem dancerItem, Rect bounds)
+ : this(dancerItem)
+ {
+ Left = bounds.Left;
+ Top = bounds.Top;
+ Width = bounds.Width;
+ Height = bounds.Height;
+ }
+
+ private DancerItem _dancerItem;
+
+ public DancerItem DancerItem
+ {
+ get { return _dancerItem; }
+ set { _dancerItem = value; RaisePropertyChanged(nameof(DancerItem)); }
+ }
+
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override IElementEditor Clone()
+ {
+ try
+ {
+ var clonedItem = DancerItem.Clone() as DancerItem;
+ DancerElementEditor cloned = new DancerElementEditor(clonedItem);
+ cloned.Top = Top;
+ cloned.Left = Left;
+ cloned.Width = Width;
+ cloned.Height = Height;
+ cloned.Angle = Angle;
+ return cloned;
+ }
+ catch (Exception ex)
+ {
+ throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex);
+ }
+ }
+
+ /// <summary>
+ /// Gets the hosted element.
+ /// </summary>
+ [ParameterIgnore]
+ public override Object HostedElement
+ {
+ get { return DancerItem; }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml
new file mode 100644
index 000000000..6d4f49ace
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml
@@ -0,0 +1,79 @@
+<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.PidElementEditor"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
+ xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals"
+ xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
+ mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:MeterItem, IsDesignTimeCreatable=False}" Height="99.188" Width="163.459">
+
+ <UserControl.Resources>
+ <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
+ <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+
+ <!--Theme-->
+ <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
+ <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush>
+ </UserControl.Resources>
+
+ <UserControl.RenderTransform>
+ <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform>
+ </UserControl.RenderTransform>
+
+ <Grid>
+
+
+ <!--Content-->
+ <Grid IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}">
+
+ <Image Source="../Images/pid.png"></Image>
+
+ <Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
+ <TextBlock Text="{Binding HardwarePidType.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
+ </Border>
+ </Grid>
+ <!--Content-->
+
+
+ <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected),Converter={StaticResource BoolToVisibilityConverter}}">
+ <Grid>
+ <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter>
+
+ <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+
+ <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10">
+ <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse>
+ <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle>
+ <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
+</local:ElementEditor>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml.cs
new file mode 100644
index 000000000..7e7f9c131
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/PidElementEditor.xaml.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Editors;
+using Tango.BL.Entities;
+using Tango.MachineStudio.Technician.TechItems;
+
+namespace Tango.MachineStudio.Technician.Editors
+{
+ [ContentProperty("InnerContent")]
+ public partial class PidElementEditor : ElementEditor
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ public PidElementEditor()
+ : base()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ public PidElementEditor(PidItem pidItem)
+ : this()
+ {
+ PidItem = pidItem;
+ DataContext = PidItem;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ /// <param name="bounds">The bounds.</param>
+ public PidElementEditor(PidItem pidItem, Rect bounds)
+ : this(pidItem)
+ {
+ Left = bounds.Left;
+ Top = bounds.Top;
+ Width = bounds.Width;
+ Height = bounds.Height;
+ }
+
+ private PidItem _pidItem;
+
+ public PidItem PidItem
+ {
+ get { return _pidItem; }
+ set { _pidItem = value; RaisePropertyChanged(nameof(PidItem)); }
+ }
+
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override IElementEditor Clone()
+ {
+ try
+ {
+ var clonedItem = PidItem.Clone() as PidItem;
+ PidElementEditor cloned = new PidElementEditor(clonedItem);
+ cloned.Top = Top;
+ cloned.Left = Left;
+ cloned.Width = Width;
+ cloned.Height = Height;
+ cloned.Angle = Angle;
+ return cloned;
+ }
+ catch (Exception ex)
+ {
+ throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex);
+ }
+ }
+
+ /// <summary>
+ /// Gets the hosted element.
+ /// </summary>
+ [ParameterIgnore]
+ public override Object HostedElement
+ {
+ get { return PidItem; }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml
new file mode 100644
index 000000000..f81597574
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml
@@ -0,0 +1,79 @@
+<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.WinderElementEditor"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
+ xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals"
+ xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
+ mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:WinderItem, IsDesignTimeCreatable=False}" Height="99.188" Width="163.459">
+
+ <UserControl.Resources>
+ <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
+ <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+
+ <!--Theme-->
+ <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
+ <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush>
+ </UserControl.Resources>
+
+ <UserControl.RenderTransform>
+ <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform>
+ </UserControl.RenderTransform>
+
+ <Grid>
+
+
+ <!--Content-->
+ <Grid IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}">
+
+ <Image Source="../Images/winder-big.png"></Image>
+
+ <Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
+ <TextBlock Text="{Binding HardwareWinderType.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
+ </Border>
+ </Grid>
+ <!--Content-->
+
+
+ <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected),Converter={StaticResource BoolToVisibilityConverter}}">
+ <Grid>
+ <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter>
+
+ <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+
+ <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10">
+ <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse>
+ <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle>
+ <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
+</local:ElementEditor>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml.cs
new file mode 100644
index 000000000..5ccb05fc5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/WinderElementEditor.xaml.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Editors;
+using Tango.BL.Entities;
+using Tango.MachineStudio.Technician.TechItems;
+
+namespace Tango.MachineStudio.Technician.Editors
+{
+ [ContentProperty("InnerContent")]
+ public partial class WinderElementEditor : ElementEditor
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ public WinderElementEditor()
+ : base()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ public WinderElementEditor(WinderItem winderItem)
+ : this()
+ {
+ WinderItem = winderItem;
+ DataContext = WinderItem;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ /// <param name="bounds">The bounds.</param>
+ public WinderElementEditor(WinderItem winderItem, Rect bounds)
+ : this(winderItem)
+ {
+ Left = bounds.Left;
+ Top = bounds.Top;
+ Width = bounds.Width;
+ Height = bounds.Height;
+ }
+
+ private WinderItem _winderItem;
+
+ public WinderItem WinderItem
+ {
+ get { return _winderItem; }
+ set { _winderItem = value; RaisePropertyChanged(nameof(WinderItem)); }
+ }
+
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override IElementEditor Clone()
+ {
+ try
+ {
+ var clonedItem = WinderItem.Clone() as WinderItem;
+ WinderElementEditor cloned = new WinderElementEditor(clonedItem);
+ cloned.Top = Top;
+ cloned.Left = Left;
+ cloned.Width = Width;
+ cloned.Height = Height;
+ cloned.Angle = Angle;
+ return cloned;
+ }
+ catch (Exception ex)
+ {
+ throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex);
+ }
+ }
+
+ /// <summary>
+ /// Gets the hosted element.
+ /// </summary>
+ [ParameterIgnore]
+ public override Object HostedElement
+ {
+ get { return WinderItem; }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-big.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-big.png
new file mode 100644
index 000000000..ce3e97b55
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-big.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-small.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-small.png
new file mode 100644
index 000000000..df35577d8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/dancer-small.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/function.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/function.png
new file mode 100644
index 000000000..92ccdbf4b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/function.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/pid.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/pid.png
new file mode 100644
index 000000000..a0295f7fb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/pid.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-big.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-big.png
new file mode 100644
index 000000000..46906084f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-big.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-small.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-small.png
new file mode 100644
index 000000000..4a9e5e779
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/winder-small.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml
new file mode 100644
index 000000000..71112a86e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml
@@ -0,0 +1,78 @@
+<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.DancerTemplate"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ mc:Ignorable="d"
+ d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:DancerItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+ <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" />
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahApps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
+ </UserControl.Resources>
+
+ <Grid>
+ <StackPanel>
+ <GroupBox Header="DANCER">
+ <StackPanel>
+ <TextBlock FontSize="10">Selected Dancer</TextBlock>
+ <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.HardwareDancerTypes}" SelectedItem="{Binding HardwareDancerType,Mode=TwoWay}" DisplayMemberPath="Description" />
+ </StackPanel>
+ </GroupBox>
+
+ <GroupBox Header="PARAMETERS" Margin="0 10 0 0">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding HardwareDancer}" Padding="10">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel></StackPanel>
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,UpdateSourceTrigger=PropertyChanged}" HasDecimals="True" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ <editors:ParameterizedEditor.Int32Template>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,Converter={StaticResource DoubleToIntConverter},UpdateSourceTrigger=PropertyChanged}" HasDecimals="False" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.Int32Template>
+ <editors:ParameterizedEditor.BooleanTemplate>
+ <DataTemplate>
+ <DockPanel Margin="0 5 0 0">
+ <ToggleButton DockPanel.Dock="Right" Width="100" IsChecked="{Binding Value}" HorizontalAlignment="Right" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.BooleanTemplate>
+ </editors:ParameterizedEditor>
+ </GroupBox>
+
+ <GroupBox Header="COLOR" Margin="0 10 0 0">
+ <StackPanel>
+ <Viewbox Margin="0 5 0 0">
+ <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" />
+ </Viewbox>
+ </StackPanel>
+ </GroupBox>
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml.cs
new file mode 100644
index 000000000..0bcd9a797
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DancerTemplate.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.Technician.PropertiesTemplates
+{
+ /// <summary>
+ /// Interaction logic for MonitorTemplate.xaml
+ /// </summary>
+ public partial class DancerTemplate : UserControl
+ {
+ public DancerTemplate()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml
new file mode 100644
index 000000000..316b9a681
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml
@@ -0,0 +1,78 @@
+<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.PidTemplate"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ mc:Ignorable="d"
+ d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:PidItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+ <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" />
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahApps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
+ </UserControl.Resources>
+
+ <Grid>
+ <StackPanel>
+ <GroupBox Header="PID CONTROL">
+ <StackPanel>
+ <TextBlock FontSize="10">Selected PID Control</TextBlock>
+ <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.HardwarePidControlTypes}" SelectedItem="{Binding HardwarePidType,Mode=TwoWay}" DisplayMemberPath="Description" />
+ </StackPanel>
+ </GroupBox>
+
+ <GroupBox Header="PARAMETERS" Margin="0 10 0 0">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding HardwarePid}" Padding="10">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel></StackPanel>
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,UpdateSourceTrigger=PropertyChanged}" HasDecimals="True" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ <editors:ParameterizedEditor.Int32Template>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,Converter={StaticResource DoubleToIntConverter},UpdateSourceTrigger=PropertyChanged}" HasDecimals="False" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.Int32Template>
+ <editors:ParameterizedEditor.BooleanTemplate>
+ <DataTemplate>
+ <DockPanel Margin="0 5 0 0">
+ <ToggleButton DockPanel.Dock="Right" Width="100" IsChecked="{Binding Value}" HorizontalAlignment="Right" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.BooleanTemplate>
+ </editors:ParameterizedEditor>
+ </GroupBox>
+
+ <GroupBox Header="COLOR" Margin="0 10 0 0">
+ <StackPanel>
+ <Viewbox Margin="0 5 0 0">
+ <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" />
+ </Viewbox>
+ </StackPanel>
+ </GroupBox>
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml.cs
new file mode 100644
index 000000000..96f265ba8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/PidTemplate.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.Technician.PropertiesTemplates
+{
+ /// <summary>
+ /// Interaction logic for MonitorTemplate.xaml
+ /// </summary>
+ public partial class PidTemplate : UserControl
+ {
+ public PidTemplate()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml
new file mode 100644
index 000000000..47f6d4380
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml
@@ -0,0 +1,78 @@
+<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.WinderTemplate"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ mc:Ignorable="d"
+ d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:WinderItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+ <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" />
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahApps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
+ </UserControl.Resources>
+
+ <Grid>
+ <StackPanel>
+ <GroupBox Header="WINDER">
+ <StackPanel>
+ <TextBlock FontSize="10">Selected Winder</TextBlock>
+ <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.HardwareWinderTypes}" SelectedItem="{Binding HardwareWinderType,Mode=TwoWay}" DisplayMemberPath="Description" />
+ </StackPanel>
+ </GroupBox>
+
+ <GroupBox Header="PARAMETERS" Margin="0 10 0 0">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding HardwareWinder}" Padding="10">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel></StackPanel>
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,UpdateSourceTrigger=PropertyChanged}" HasDecimals="True" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ <editors:ParameterizedEditor.Int32Template>
+ <DataTemplate>
+ <DockPanel>
+ <mahApps:NumericUpDown DockPanel.Dock="Right" Background="Transparent" BorderThickness="0 0 0 0" Value="{Binding Value,Converter={StaticResource DoubleToIntConverter},UpdateSourceTrigger=PropertyChanged}" HasDecimals="False" HorizontalContentAlignment="Center" Width="100" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.Int32Template>
+ <editors:ParameterizedEditor.BooleanTemplate>
+ <DataTemplate>
+ <DockPanel Margin="0 5 0 0">
+ <ToggleButton DockPanel.Dock="Right" Width="100" IsChecked="{Binding Value}" HorizontalAlignment="Right" />
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.BooleanTemplate>
+ </editors:ParameterizedEditor>
+ </GroupBox>
+
+ <GroupBox Header="COLOR" Margin="0 10 0 0">
+ <StackPanel>
+ <Viewbox Margin="0 5 0 0">
+ <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" />
+ </Viewbox>
+ </StackPanel>
+ </GroupBox>
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml.cs
new file mode 100644
index 000000000..32ec860c7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/WinderTemplate.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.Technician.PropertiesTemplates
+{
+ /// <summary>
+ /// Interaction logic for MonitorTemplate.xaml
+ /// </summary>
+ public partial class WinderTemplate : UserControl
+ {
+ public WinderTemplate()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
index 27b15cb34..cafa8540c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
@@ -102,6 +102,15 @@
<Compile Include="Editors\DigitalOutElementEditor.xaml.cs">
<DependentUpon>DigitalOutElementEditor.xaml</DependentUpon>
</Compile>
+ <Compile Include="Editors\DancerElementEditor.xaml.cs">
+ <DependentUpon>DancerElementEditor.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Editors\WinderElementEditor.xaml.cs">
+ <DependentUpon>WinderElementEditor.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Editors\PidElementEditor.xaml.cs">
+ <DependentUpon>PidElementEditor.xaml</DependentUpon>
+ </Compile>
<Compile Include="Editors\MotorGroupElementEditor.xaml.cs">
<DependentUpon>MotorGroupElementEditor.xaml</DependentUpon>
</Compile>
@@ -143,6 +152,15 @@
<Compile Include="PropertiesTemplates\MotorGroupTemplate.xaml.cs">
<DependentUpon>MotorGroupTemplate.xaml</DependentUpon>
</Compile>
+ <Compile Include="PropertiesTemplates\DancerTemplate.xaml.cs">
+ <DependentUpon>DancerTemplate.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="PropertiesTemplates\WinderTemplate.xaml.cs">
+ <DependentUpon>WinderTemplate.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="PropertiesTemplates\PidTemplate.xaml.cs">
+ <DependentUpon>PidTemplate.xaml</DependentUpon>
+ </Compile>
<Compile Include="PropertiesTemplates\ThreadMotionTemplate.xaml.cs">
<DependentUpon>ThreadMotionTemplate.xaml</DependentUpon>
</Compile>
@@ -164,6 +182,9 @@
<Compile Include="TechItems\MeterItem.cs" />
<Compile Include="TechItems\MotorActionType.cs" />
<Compile Include="TechItems\DispenserItem.cs" />
+ <Compile Include="TechItems\DancerItem.cs" />
+ <Compile Include="TechItems\WinderItem.cs" />
+ <Compile Include="TechItems\PidItem.cs" />
<Compile Include="TechItems\MotorItem.cs" />
<Compile Include="TechItems\MultiGraphItem.cs" />
<Compile Include="TechItems\MotorGroupItem.cs" />
@@ -213,6 +234,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Editors\DancerElementEditor.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Editors\WinderElementEditor.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Editors\PidElementEditor.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Editors\MotorGroupElementEditor.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -265,6 +298,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="PropertiesTemplates\DancerTemplate.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="PropertiesTemplates\WinderTemplate.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="PropertiesTemplates\PidTemplate.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="PropertiesTemplates\ThreadMotionTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -470,5 +515,19 @@
<ItemGroup>
<Resource Include="Images\controller.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\function.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\pid.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\winder-big.png" />
+ <Resource Include="Images\winder-small.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\dancer-big.png" />
+ <Resource Include="Images\dancer-small.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs
new file mode 100644
index 000000000..e5651acce
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using System.Xml.Serialization;
+using Tango.Core.Commands;
+using Tango.BL.Entities;
+using Tango.SharedUI.Helpers;
+using System.Collections.ObjectModel;
+
+namespace Tango.MachineStudio.Technician.TechItems
+{
+ /// <summary>
+ /// Represents a dancer controller item.
+ /// </summary>
+ /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
+ [TechItem(15)]
+ public class DancerItem : TechItem
+ {
+ private static List<HardwareDancer> _dancerConfigurations;
+ /// <summary>
+ /// Gets or sets the winder configurations.
+ /// </summary>
+ public static List<HardwareDancer> DancerConfigurations
+ {
+ get { return _dancerConfigurations; }
+ set { _dancerConfigurations = value; }
+ }
+
+ static DancerItem()
+ {
+ DancerConfigurations = new List<HardwareDancer>();
+
+ foreach (var winderType in BL.ObservablesEntitiesAdapter.Instance.HardwareDancerTypes)
+ {
+ DancerConfigurations.Add(new HardwareDancer() { HardwareDancerType = winderType });
+ }
+ }
+
+ private HardwareDancerType _hardwareDancerType;
+ /// <summary>
+ /// Gets or sets the type of the hardware winder.
+ /// </summary>
+ [XmlIgnore]
+ public HardwareDancerType HardwareDancerType
+ {
+ get { return _hardwareDancerType; }
+ set
+ {
+ _hardwareDancerType = value; RaisePropertyChangedAuto(); TechName = _hardwareDancerType != null ? _hardwareDancerType.Description : null; ItemGuid = value != null ? value.Guid : null;
+
+ if (_hardwareDancerType != null)
+ {
+ HardwareDancer = DancerConfigurations.SingleOrDefault(x => x.HardwareDancerType == _hardwareDancerType);
+ }
+ }
+ }
+
+ private HardwareDancer _hardwareDancer;
+ /// <summary>
+ /// Gets or sets the hardware winder.
+ /// </summary>
+ [XmlIgnore]
+ public HardwareDancer HardwareDancer
+ {
+ get { return _hardwareDancer; }
+ set { _hardwareDancer = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DancerItem"/> class.
+ /// </summary>
+ public DancerItem() : base()
+ {
+ Name = "Dancer";
+ Description = "Dancer Controller";
+ Image = ResourceHelper.GetImageFromResources("Images/dancer-small.png");
+ Color = Colors.White;
+ HardwareDancer = new HardwareDancer();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DancerItem"/> class.
+ /// </summary>
+ /// <param name="winderType">Type of the winder.</param>
+ public DancerItem(HardwareDancerType winderType) : this()
+ {
+ HardwareDancerType = winderType;
+ }
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override TechItem Clone()
+ {
+ DancerItem cloned = base.Clone() as DancerItem;
+ cloned.HardwareDancerType = HardwareDancerType;
+ return cloned;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs
new file mode 100644
index 000000000..a56c3b0c1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using System.Xml.Serialization;
+using Tango.Core.Commands;
+using Tango.BL.Entities;
+using Tango.SharedUI.Helpers;
+using System.Collections.ObjectModel;
+
+namespace Tango.MachineStudio.Technician.TechItems
+{
+ /// <summary>
+ /// Represents a PID controller item.
+ /// </summary>
+ /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
+ [TechItem(12)]
+ public class PidItem : TechItem
+ {
+ private static List<HardwarePidControl> _pidConfigurations;
+ /// <summary>
+ /// Gets or sets the pid configurations.
+ /// </summary>
+ public static List<HardwarePidControl> PidConfigurations
+ {
+ get { return _pidConfigurations; }
+ set { _pidConfigurations = value; }
+ }
+
+ static PidItem()
+ {
+ PidConfigurations = new List<HardwarePidControl>();
+
+ foreach (var pidType in BL.ObservablesEntitiesAdapter.Instance.HardwarePidControlTypes)
+ {
+ PidConfigurations.Add(new HardwarePidControl() { HardwarePidControlType = pidType });
+ }
+ }
+
+ private HardwarePidControlType _hardwarePidType;
+ /// <summary>
+ /// Gets or sets the type of the hardware pid.
+ /// </summary>
+ [XmlIgnore]
+ public HardwarePidControlType HardwarePidType
+ {
+ get { return _hardwarePidType; }
+ set
+ {
+ _hardwarePidType = value; RaisePropertyChangedAuto(); TechName = _hardwarePidType != null ? _hardwarePidType.Description : null; ItemGuid = value != null ? value.Guid : null;
+
+ if (_hardwarePidType != null)
+ {
+ HardwarePid = PidConfigurations.SingleOrDefault(x => x.HardwarePidControlType == _hardwarePidType);
+ }
+ }
+ }
+
+ private HardwarePidControl _hardwarePid;
+ /// <summary>
+ /// Gets or sets the hardware pid.
+ /// </summary>
+ [XmlIgnore]
+ public HardwarePidControl HardwarePid
+ {
+ get { return _hardwarePid; }
+ set { _hardwarePid = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PidItem"/> class.
+ /// </summary>
+ public PidItem() : base()
+ {
+ Name = "PID";
+ Description = "PID Controller";
+ Image = ResourceHelper.GetImageFromResources("Images/function.png");
+ Color = Colors.White;
+ HardwarePid = new HardwarePidControl();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PidItem"/> class.
+ /// </summary>
+ /// <param name="pidType">Type of the pid.</param>
+ public PidItem(HardwarePidControlType pidType) : this()
+ {
+ HardwarePidType = pidType;
+ }
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override TechItem Clone()
+ {
+ PidItem cloned = base.Clone() as PidItem;
+ cloned.HardwarePidType = HardwarePidType;
+ return cloned;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
index e18250594..1071c3511 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
@@ -30,6 +30,9 @@ namespace Tango.MachineStudio.Technician.TechItems
[XmlInclude(typeof(MotorGroupItem))]
[XmlInclude(typeof(DigitalInItem))]
[XmlInclude(typeof(ControllerItem))]
+ [XmlInclude(typeof(PidItem))]
+ [XmlInclude(typeof(WinderItem))]
+ [XmlInclude(typeof(DancerItem))]
public abstract class TechItem : ExtendedObject
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs
new file mode 100644
index 000000000..425baf471
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using System.Xml.Serialization;
+using Tango.Core.Commands;
+using Tango.BL.Entities;
+using Tango.SharedUI.Helpers;
+using System.Collections.ObjectModel;
+
+namespace Tango.MachineStudio.Technician.TechItems
+{
+ /// <summary>
+ /// Represents a winder controller item.
+ /// </summary>
+ /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
+ [TechItem(14)]
+ public class WinderItem : TechItem
+ {
+ private static List<HardwareWinder> _winderConfigurations;
+ /// <summary>
+ /// Gets or sets the winder configurations.
+ /// </summary>
+ public static List<HardwareWinder> WinderConfigurations
+ {
+ get { return _winderConfigurations; }
+ set { _winderConfigurations = value; }
+ }
+
+ static WinderItem()
+ {
+ WinderConfigurations = new List<HardwareWinder>();
+
+ foreach (var winderType in BL.ObservablesEntitiesAdapter.Instance.HardwareWinderTypes)
+ {
+ WinderConfigurations.Add(new HardwareWinder() { HardwareWinderType = winderType });
+ }
+ }
+
+ private HardwareWinderType _hardwareWinderType;
+ /// <summary>
+ /// Gets or sets the type of the hardware winder.
+ /// </summary>
+ [XmlIgnore]
+ public HardwareWinderType HardwareWinderType
+ {
+ get { return _hardwareWinderType; }
+ set
+ {
+ _hardwareWinderType = value; RaisePropertyChangedAuto(); TechName = _hardwareWinderType != null ? _hardwareWinderType.Description : null; ItemGuid = value != null ? value.Guid : null;
+
+ if (_hardwareWinderType != null)
+ {
+ HardwareWinder = WinderConfigurations.SingleOrDefault(x => x.HardwareWinderType == _hardwareWinderType);
+ }
+ }
+ }
+
+ private HardwareWinder _hardwareWinder;
+ /// <summary>
+ /// Gets or sets the hardware winder.
+ /// </summary>
+ [XmlIgnore]
+ public HardwareWinder HardwareWinder
+ {
+ get { return _hardwareWinder; }
+ set { _hardwareWinder = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WinderItem"/> class.
+ /// </summary>
+ public WinderItem() : base()
+ {
+ Name = "Winder";
+ Description = "Winder Controller";
+ Image = ResourceHelper.GetImageFromResources("Images/winder-small.png");
+ Color = Colors.White;
+ HardwareWinder = new HardwareWinder();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WinderItem"/> class.
+ /// </summary>
+ /// <param name="winderType">Type of the winder.</param>
+ public WinderItem(HardwareWinderType winderType) : this()
+ {
+ HardwareWinderType = winderType;
+ }
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override TechItem Clone()
+ {
+ WinderItem cloned = base.Clone() as WinderItem;
+ cloned.HardwareWinderType = HardwareWinderType;
+ return cloned;
+ }
+ }
+}
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 4a8cd82a5..9c587b7c8 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
@@ -30,6 +30,7 @@ using Tango.BL.Enumerations;
using Tango.BL;
using Tango.MachineStudio.Common.EventLogging;
using Tango.MachineStudio.Common;
+using Tango.Core.Commands;
namespace Tango.MachineStudio.Technician.ViewModels
{
@@ -164,6 +165,21 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// </summary>
public RelayCommand OpenProjectCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the synchronize hardware configuration command.
+ /// </summary>
+ public RelayCommand SyncHardwareConfigurationCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the upload hardware configuration command.
+ /// </summary>
+ public RelayCommand UploadHardwareConfigurationCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the reset hardware configuration command.
+ /// </summary>
+ public RelayCommand ResetHardwareConfigurationCommand { get; set; }
+
#endregion
#region Constructors
@@ -200,6 +216,10 @@ namespace Tango.MachineStudio.Technician.ViewModels
}
_diagnosticsFrameProvider.FrameReceived += DiagnosticsFrameProvider_FrameReceived;
+
+ UploadHardwareConfigurationCommand = new RelayCommand(UploadHardwareConfiguration);
+ SyncHardwareConfigurationCommand = new RelayCommand(SyncHardwareConfiguration);
+ ResetHardwareConfigurationCommand = new RelayCommand(ResetHardwareConfiguration);
}
#endregion
@@ -489,6 +509,18 @@ namespace Tango.MachineStudio.Technician.ViewModels
var editor = CreateElement<ControllerElementEditor, ControllerItem, TechController>(bounds, Adapter.TechControllers.FirstOrDefault());
InitControllerItem(editor.ControllerItem);
}
+ else if (item is PidItem)
+ {
+ CreateElement<PidElementEditor, PidItem, HardwarePidControlType>(bounds, Adapter.HardwarePidControlTypes.FirstOrDefault());
+ }
+ else if (item is WinderItem)
+ {
+ CreateElement<WinderElementEditor, WinderItem, HardwareWinderType>(bounds, Adapter.HardwareWinderTypes.FirstOrDefault());
+ }
+ else if (item is DancerItem)
+ {
+ CreateElement<DancerElementEditor, DancerItem, HardwareDancerType>(bounds, Adapter.HardwareDancerTypes.FirstOrDefault());
+ }
}
/// <summary>
@@ -588,6 +620,21 @@ namespace Tango.MachineStudio.Technician.ViewModels
var editor = CreateElement<ControllerElementEditor>(item);
InitControllerItem(editor.ControllerItem);
}
+ else if (item is PidItem)
+ {
+ (item as PidItem).HardwarePidType = Adapter.HardwarePidControlTypes.FirstOrDefault(x => x.Guid == item.ItemGuid);
+ CreateElement<PidElementEditor>(item);
+ }
+ else if (item is WinderItem)
+ {
+ (item as WinderItem).HardwareWinderType = Adapter.HardwareWinderTypes.FirstOrDefault(x => x.Guid == item.ItemGuid);
+ CreateElement<WinderElementEditor>(item);
+ }
+ else if (item is DancerItem)
+ {
+ (item as DancerItem).HardwareDancerType = Adapter.HardwareDancerTypes.FirstOrDefault(x => x.Guid == item.ItemGuid);
+ CreateElement<DancerElementEditor>(item);
+ }
}
/// <summary>
@@ -1229,5 +1276,176 @@ namespace Tango.MachineStudio.Technician.ViewModels
}
#endregion
+
+ #region Hardware Configuration
+
+ private void SyncHardwareConfiguration()
+ {
+ var elements = Elements.ToList();
+
+ if (MachineOperator != null && MachineOperator.CurrentHardwareConfiguration != null)
+ {
+ var config = MachineOperator.CurrentHardwareConfiguration;
+
+ foreach (var motorConfig in config.Motors)
+ {
+ var itemConfig = MotorItem.MotorConfigurations.SingleOrDefault(x => x.HardwareMotorType.Code == motorConfig.HardwareMotorType.ToInt32());
+
+ if (itemConfig != null)
+ {
+ motorConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ foreach (var pidConfig in config.PidControls)
+ {
+ var itemConfig = PidItem.PidConfigurations.SingleOrDefault(x => x.HardwarePidControlType.Code == pidConfig.HardwarePidControlType.ToInt32());
+
+ if (itemConfig != null)
+ {
+ pidConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ foreach (var winderConfig in config.Winders)
+ {
+ var itemConfig = WinderItem.WinderConfigurations.SingleOrDefault(x => x.HardwareWinderType.Code == winderConfig.HardwareWinderType.ToInt32());
+
+ if (itemConfig != null)
+ {
+ winderConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ foreach (var dancerConfig in config.Dancers)
+ {
+ var itemConfig = DancerItem.DancerConfigurations.SingleOrDefault(x => x.HardwareDancerType.Code == dancerConfig.HardwareDancerType.ToInt32());
+
+ if (itemConfig != null)
+ {
+ dancerConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ _notification.ShowInfo("Visual elements synced to the last uploaded hardware configuration.");
+ }
+ else
+ {
+ ResetHardwareConfiguration();
+ }
+ }
+
+ private async void UploadHardwareConfiguration()
+ {
+ if (MachineOperator != null)
+ {
+ var hw = ApplicationManager.ConnectedMachine.Machine.Configuration.HardwareVersion.Clone();
+
+ foreach (var motorConfig in hw.HardwareMotors)
+ {
+ var itemConfig = MotorItem.MotorConfigurations.SingleOrDefault(x => x.HardwareMotorType.Code == motorConfig.HardwareMotorType.Code);
+
+ if (itemConfig != null)
+ {
+ itemConfig.MapPrimitivesTo(motorConfig);
+ }
+ }
+
+ foreach (var pidConfig in hw.HardwarePidControls)
+ {
+ var itemConfig = PidItem.PidConfigurations.SingleOrDefault(x => x.HardwarePidControlType.Code == pidConfig.HardwarePidControlType.Code);
+
+ if (itemConfig != null)
+ {
+ itemConfig.MapPrimitivesTo(pidConfig);
+ }
+ }
+
+ foreach (var winderConfig in hw.HardwareWinders)
+ {
+ var itemConfig = WinderItem.WinderConfigurations.SingleOrDefault(x => x.HardwareWinderType.Code == winderConfig.HardwareWinderType.Code);
+
+ if (itemConfig != null)
+ {
+ itemConfig.MapPrimitivesTo(winderConfig);
+ }
+ }
+
+ foreach (var DancerConfig in hw.HardwareDancers)
+ {
+ var itemConfig = DancerItem.DancerConfigurations.SingleOrDefault(x => x.HardwareDancerType.Code == DancerConfig.HardwareDancerType.Code);
+
+ if (itemConfig != null)
+ {
+ itemConfig.MapPrimitivesTo(DancerConfig);
+ }
+ }
+
+ using (_notification.PushTaskItem("Uploading hardware configuration..."))
+ {
+ try
+ {
+ await MachineOperator.UploadHardwareConfiguration(hw, ApplicationManager.ConnectedMachine.Machine.Configuration);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error uploading hardware configuration.");
+ _notification.ShowError("An error occurred while trying to upload the hardware configuration." + Environment.NewLine + ex.Message);
+ }
+ }
+ }
+ }
+
+ private void ResetHardwareConfiguration()
+ {
+ if (MachineOperator != null)
+ {
+ var hw = ApplicationManager.ConnectedMachine.Machine.Configuration.HardwareVersion;
+
+ foreach (var motorConfig in hw.HardwareMotors)
+ {
+ var itemConfig = MotorItem.MotorConfigurations.SingleOrDefault(x => x.HardwareMotorType.Code == motorConfig.HardwareMotorType.Code);
+
+ if (itemConfig != null)
+ {
+ motorConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ foreach (var pidConfig in hw.HardwarePidControls)
+ {
+ var itemConfig = PidItem.PidConfigurations.SingleOrDefault(x => x.HardwarePidControlType.Code == pidConfig.HardwarePidControlType.Code);
+
+ if (itemConfig != null)
+ {
+ pidConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ foreach (var winderConfig in hw.HardwareWinders)
+ {
+ var itemConfig = WinderItem.WinderConfigurations.SingleOrDefault(x => x.HardwareWinderType.Code == winderConfig.HardwareWinderType.Code);
+
+ if (itemConfig != null)
+ {
+ winderConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ foreach (var dancerConfig in hw.HardwareDancers)
+ {
+ var itemConfig = DancerItem.DancerConfigurations.SingleOrDefault(x => x.HardwareDancerType.Code == dancerConfig.HardwareDancerType.Code);
+
+ if (itemConfig != null)
+ {
+ dancerConfig.MapPrimitivesTo(itemConfig);
+ }
+ }
+
+ _notification.ShowInfo("Visual elements synced to hardware version " + hw.Name + ", " + hw.Version + ".");
+ }
+ }
+
+ #endregion
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index 6d4f3aefd..db97b9de2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -16,7 +16,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.Views"
mc:Ignorable="d"
- d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:MachineTechViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineTechViewVM}">
+ d:DesignHeight="720" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:MachineTechViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineTechViewVM}">
<UserControl.Resources>
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
@@ -153,6 +153,28 @@
</MenuItem>
</Menu>
+
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 5 10" Height="40">
+ <Button Height="Auto" Margin="0 0 10 0" FontSize="12" Command="{Binding ResetHardwareConfigurationCommand}" IsEnabled="{Binding ApplicationManager.IsMachineConnected}" ToolTip="Reset all visual elements to the hardware configuration defined for the current machine">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Margin="0 0 2 0" Width="24" Height="24" Kind="Refresh"/>
+ <TextBlock VerticalAlignment="Center">RESET</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Height="Auto" Margin="0 0 10 0" FontSize="12" Command="{Binding SyncHardwareConfigurationCommand}" IsEnabled="{Binding ApplicationManager.IsMachineConnected}" ToolTip="Sync all visual elements to the current hardware configuration">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Margin="0 0 0 0" Width="24" Height="24" Kind="ArrowDownBold"/>
+ <TextBlock VerticalAlignment="Center">SYNC HW CONFIG</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Height="Auto" FontSize="12" Command="{Binding UploadHardwareConfigurationCommand}" IsEnabled="{Binding ApplicationManager.IsMachineConnected}" ToolTip="Create a hardware configuration from the visual elements and upload that configuration">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center">UPLOAD HW CONFIG</TextBlock>
+ <materialDesign:PackIcon Margin="10 0 0 0" Width="24" Height="24" Kind="ArrowRightBold"/>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+
<Grid Grid.Row="1">
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="20 0 0 0">
<ListBox ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding AvailableTechItems}" SelectedItem="{Binding SelectedTechItem,Mode=TwoWay}" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
@@ -355,6 +377,15 @@
<DataTemplate DataType="{x:Type sys:Nullable}">
</DataTemplate>
+ <DataTemplate DataType="{x:Type items:DancerItem}">
+ <templates:DancerTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:WinderItem}">
+ <templates:WinderTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:PidItem}">
+ <templates:PidTemplate/>
+ </DataTemplate>
<DataTemplate DataType="{x:Type items:ControllerItem}">
<templates:ControllerTemplate/>
</DataTemplate>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs
index 42eab20a5..d34ef4b96 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs
@@ -19,11 +19,6 @@ namespace Tango.MachineStudio.Common.Diagnostics
{
private IStudioApplicationManager _application;
- /// <summary>
- /// Occurs when the machine events state provider has changed.
- /// </summary>
- public event EventHandler<IMachineEventsStateProvider> MachineEventsStateProviderChanged;
-
private bool _disable;
/// <summary>
/// Disables the frame delivery from the current connected machine and enables the manual push frame method.
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineSerialViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineSerialViewVM.cs
index 219bd9e63..9f366829a 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineSerialViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineSerialViewVM.cs
@@ -21,8 +21,6 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _selectedMachine = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
}
- public RelayCommand OKCommand { get; set; }
-
public MachineSerialViewVM()
{
OKCommand = new RelayCommand(Accept, () => SelectedMachine != null);
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
index e34cdb83b..a5c31af3d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
@@ -8,11 +8,11 @@
xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="1080" d:DesignWidth="1920" DataContext="{Binding UpdateViewVM, Source={StaticResource Locator}}" Background="White" FontSize="20">
+ d:DesignHeight="1080" d:DesignWidth="1920" DataContext="{Binding UpdateViewVM, Source={StaticResource Locator}}" FontSize="20">
<Grid>
- <Grid.Background>
+ <!--<Grid.Background>
<ImageBrush ImageSource="/Images/White-Abstract.png" />
- </Grid.Background>
+ </Grid.Background>-->
<Grid MaxWidth="1200" MaxHeight="700">
<DockPanel>
<Grid DockPanel.Dock="Top" HorizontalAlignment="Center">
diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs
index 9d17bd198..098ce6f30 100644
--- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs
+++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs
@@ -66,7 +66,7 @@ public static class ObjectExtensions
{
var desProp = destination.GetType().GetProperty(prop.Name, BindingFlags.Public | BindingFlags.Instance);
- if (desProp != null && desProp.PropertyType.IsPrimitive)
+ if (desProp != null && desProp.PropertyType.IsPrimitive && desProp.SetMethod != null)
{
desProp.SetValue(destination, prop.GetValue(source));
}
diff --git a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
index abd5e5929..98a813fc0 100644
--- a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
+++ b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
@@ -9,6 +9,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
+using Tango.Core.Commands;
using Tango.Editors;
namespace Tango.Editors
diff --git a/Software/Visual_Studio/Tango.Editors/HybridControl.cs b/Software/Visual_Studio/Tango.Editors/HybridControl.cs
index 8b1da701e..0d2fe5336 100644
--- a/Software/Visual_Studio/Tango.Editors/HybridControl.cs
+++ b/Software/Visual_Studio/Tango.Editors/HybridControl.cs
@@ -9,6 +9,7 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Imaging;
+using Tango.Core.Commands;
namespace Tango.Editors
{
diff --git a/Software/Visual_Studio/Tango.Editors/ISupportEditingOperations.cs b/Software/Visual_Studio/Tango.Editors/ISupportEditingOperations.cs
index 539c1f5f9..40c746115 100644
--- a/Software/Visual_Studio/Tango.Editors/ISupportEditingOperations.cs
+++ b/Software/Visual_Studio/Tango.Editors/ISupportEditingOperations.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core.Commands;
namespace Tango.Editors
{
diff --git a/Software/Visual_Studio/Tango.Editors/ISupportUndoRedoOperations.cs b/Software/Visual_Studio/Tango.Editors/ISupportUndoRedoOperations.cs
index 1e67b2fa5..459f15ba4 100644
--- a/Software/Visual_Studio/Tango.Editors/ISupportUndoRedoOperations.cs
+++ b/Software/Visual_Studio/Tango.Editors/ISupportUndoRedoOperations.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core.Commands;
namespace Tango.Editors
{
diff --git a/Software/Visual_Studio/Tango.Editors/RelayCommand.cs b/Software/Visual_Studio/Tango.Editors/RelayCommand.cs
index 6042fad93..63a776238 100644
--- a/Software/Visual_Studio/Tango.Editors/RelayCommand.cs
+++ b/Software/Visual_Studio/Tango.Editors/RelayCommand.cs
@@ -18,6 +18,7 @@ namespace Tango.Editors
readonly Predicate<object> canExecute;
readonly Action<object> execute;
private Action<string> saveProject;
+ private RelayCommand syncHardwareConfigurationCommand;
#endregion fields
#region constructors
@@ -46,6 +47,11 @@ namespace Tango.Editors
this.saveProject = saveProject;
}
+ public RelayCommand(RelayCommand syncHardwareConfigurationCommand)
+ {
+ this.syncHardwareConfigurationCommand = syncHardwareConfigurationCommand;
+ }
+
#endregion constructors
#region methods
diff --git a/Software/Visual_Studio/Tango.Editors/Tango.Editors.csproj b/Software/Visual_Studio/Tango.Editors/Tango.Editors.csproj
index 02a18d94f..8b8e8d802 100644
--- a/Software/Visual_Studio/Tango.Editors/Tango.Editors.csproj
+++ b/Software/Visual_Studio/Tango.Editors/Tango.Editors.csproj
@@ -137,7 +137,7 @@
<Compile Include="IUndoRedoState.cs" />
<Compile Include="IUndoRedoStatesProvider.cs" />
<Compile Include="PixelRuler.cs" />
- <Compile Include="RelayCommand.cs" />
+ <None Include="RelayCommand.cs" />
<Compile Include="UndoRedoStateExecutedEventArgs.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 4220715fb..cad9e86d4 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -23,6 +23,7 @@ using Tango.PMR.Debugging;
using Tango.BL.Enumerations;
using Tango.BL;
using Tango.PMR.Connection;
+using Tango.PMR.Hardware;
namespace Tango.Emulations.Emulators
{
@@ -214,6 +215,9 @@ namespace Tango.Emulations.Emulators
case MessageType.ConnectRequest:
HandleConnectRequest(MessageFactory.ParseTangoMessageFromContainer<ConnectRequest>(container));
break;
+ case MessageType.UploadHardwareConfigurationRequest:
+ HandleUploadHardwareConfigurationRequest(MessageFactory.ParseTangoMessageFromContainer<UploadHardwareConfigurationRequest>(container));
+ break;
}
}
@@ -650,6 +654,11 @@ namespace Tango.Emulations.Emulators
}
+ private void HandleUploadHardwareConfigurationRequest(TangoMessage<UploadHardwareConfigurationRequest> request)
+ {
+ Transporter.SendResponse<UploadHardwareConfigurationResponse>(new UploadHardwareConfigurationResponse(), request.Container.Token);
+ }
+
#endregion
#region Public Methods
diff --git a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs
index 4418ca437..3b974d172 100644
--- a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs
@@ -40,7 +40,7 @@ namespace Tango.SharedUI
public ObservableCollection<String> ValidationErrors
{
get { return _validationErrors; }
- private set { _validationErrors = value; RaisePropertyChangedAuto(); }
+ protected set { _validationErrors = value; RaisePropertyChangedAuto(); }
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs b/Software/Visual_Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs
index 4a0b47fe4..38ba29e5c 100644
--- a/Software/Visual_Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs
+++ b/Software/Visual_Studio/Tango.Transport/Adapters/TcpTransportAdapter.cs
@@ -23,7 +23,6 @@ namespace Tango.Transport.Adapters
private TcpClient _socket;
private Thread _pullThread;
private bool _initializedFromConstructor;
- private LogManager LogManager = LogManager.Default;
#region Properties
diff --git a/Software/Visual_Studio/Tango.Transport/Adapters/UsbTransportAdapter.cs b/Software/Visual_Studio/Tango.Transport/Adapters/UsbTransportAdapter.cs
index 06d0d5d31..75c4eee0e 100644
--- a/Software/Visual_Studio/Tango.Transport/Adapters/UsbTransportAdapter.cs
+++ b/Software/Visual_Studio/Tango.Transport/Adapters/UsbTransportAdapter.cs
@@ -16,7 +16,6 @@ namespace Tango.Transport.Adapters
public class UsbTransportAdapter : TransportAdapterBase
{
private SerialPort _serialPort; //Serial port instance used to communicate over the serial port.
- private LogManager LogManager = LogManager.Default;
/// <summary>
/// Gets or sets the baud rate.
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj b/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj
index e35dcdb3c..0a54fbcd7 100644
--- a/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj
@@ -249,6 +249,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_C5A4AB00302044959F446E92967BBAD4"
+ "OwnerKey" = "8:_UNDEFINED"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_D2FFB7AB335C92855094B6988900F58C"
"OwnerKey" = "8:_8F0D060313A40E3D6C4B196C5819AA1F"
"MsmSig" = "8:_UNDEFINED"
@@ -310,6 +316,12 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
+ "OwnerKey" = "8:_C5A4AB00302044959F446E92967BBAD4"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_E6DED22BB43E475B9794561C384D2713"
"MsmSig" = "8:_UNDEFINED"
}
@@ -447,7 +459,7 @@
"DisplayName" = "8:Debug"
"IsDebugOnly" = "11:TRUE"
"IsReleaseOnly" = "11:FALSE"
- "OutputFilename" = "8:..\\..\\Build\\Debug\\Installers\\Tango Stubs Installer v1.1.msi"
+ "OutputFilename" = "8:..\\..\\Build\\Debug\\Installers\\Tango Stubs Installer v1.2.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
@@ -1118,6 +1130,37 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
+ "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C5A4AB00302044959F446E92967BBAD4"
+ {
+ "AssemblyRegister" = "3:1"
+ "AssemblyIsInGAC" = "11:FALSE"
+ "AssemblyAsmDisplayName" = "8:System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
+ "ScatterAssemblies"
+ {
+ "_C5A4AB00302044959F446E92967BBAD4"
+ {
+ "Name" = "8:System.Security.Cryptography.Algorithms.dll"
+ "Attributes" = "3:512"
+ }
+ }
+ "SourcePath" = "8:..\\..\\packages\\System.Security.Cryptography.Algorithms.4.3.1\\lib\\net46\\System.Security.Cryptography.Algorithms.dll"
+ "TargetName" = "8:"
+ "Tag" = "8:"
+ "Folder" = "8:_D5AAD35A4ABE407AA40E02371659B408"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
+ "IsolateTo" = "8:"
+ }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D2FFB7AB335C92855094B6988900F58C"
{
"AssemblyRegister" = "3:1"
@@ -1329,15 +1372,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Tango Stubs GUI"
- "ProductCode" = "8:{3554CC06-FF4C-4412-931B-177393459D26}"
- "PackageCode" = "8:{D0A7E8A8-473F-46F8-990A-21F9BF3B3007}"
+ "ProductCode" = "8:{C7D785F4-5FA2-43A8-9313-24EA1F9CDE69}"
+ "PackageCode" = "8:{81812BC7-BE61-49B8-9983-095F63F59C57}"
"UpgradeCode" = "8:{72B680FB-E47D-486A-A81E-6C035F2EBA42}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
- "ProductVersion" = "8:1.1"
+ "ProductVersion" = "8:1.2"
"Manufacturer" = "8:Twine"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"