aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-26 15:29:37 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-26 15:29:37 +0200
commit76fd65594e3c7434be615036ea569a1f8907a648 (patch)
treedce0fd8c3214af20e15ea34586b39d1a9280c8b1 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views
parent6549d8672a93893599e921d9f1938af7dcabb8bf (diff)
downloadTango-76fd65594e3c7434be615036ea569a1f8907a648.tar.gz
Tango-76fd65594e3c7434be615036ea569a1f8907a648.zip
Added DB Tables.
TECH_HEATERS DANCER_TYPES MOTOR_TYPES HARDWARE_VERSIONS_MOTOR_TYPES HARDWARE_VERSIONS_DANCER_TYPES Implemented Dancers & motors on DB Module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml41
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml34
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml36
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml72
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml46
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml.cs32
10 files changed, 363 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml
new file mode 100644
index 000000000..717e07f48
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml
@@ -0,0 +1,41 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DancerTypeView"
+ 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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:DancerTypesViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Code:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+
+ <TextBlock Text="Gradual:" FontWeight="Bold"></TextBlock>
+ <ToggleButton IsChecked="{Binding EditEntity.Gradual}" HorizontalAlignment="Right"></ToggleButton>
+
+ <TextBlock Text="K:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.K,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="X:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.X,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Pulse Per Millimeter Spring:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="40000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.PulsePerMmSpring,Mode=TwoWay}"></mahapps:NumericUpDown>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml.cs
new file mode 100644
index 000000000..d07cf68c5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class DancerTypeView : UserControl
+ {
+ public DancerTypeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml
new file mode 100644
index 000000000..245d4a04a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml
@@ -0,0 +1,34 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DancerTypesView"
+ 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:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.DancerTypesViewVM}">
+
+ <UserControl.Resources>
+ <converters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.DancerTypesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+
+ <DataGridTextColumn Header="Gradual" Binding="{Binding Gradual,Converter={StaticResource BooleanToYesNoConverter}}"></DataGridTextColumn>
+ <DataGridTextColumn Header="K" Binding="{Binding K}"></DataGridTextColumn>
+ <DataGridTextColumn Header="X" Binding="{Binding X}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Pulse Per Millimeter Spring" Binding="{Binding PulsePerMmSpring}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml.cs
new file mode 100644
index 000000000..1b0c8e82e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class DancerTypesView : UserControl
+ {
+ public DancerTypesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml
index 55c995360..e7b5957e2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml
@@ -28,6 +28,42 @@
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.NlPerPulse,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Capacity:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Capacity,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Min Frequency:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="40000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MinFrequency,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Max Frequency:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="40000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MaxFrequency,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Min Micro Step:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MinMicroStep,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Max Micro Step:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MaxMicroStep,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Correction Gain:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.CorrectionGain,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Ratio To Dryer Speed:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.RatioToDryerSpeed,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="KP:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.KP,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="KI:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Ki,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="KD:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Kd,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Change Slope:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.ChangeSlope,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="High Length Micro Second:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.HighLengthMicroSecond,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Control Timing:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.ControlTiming,Mode=TwoWay}"></mahapps:NumericUpDown>
</controls:TableGrid>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml
index 040ac5799..e88e0dfea 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml
@@ -19,6 +19,20 @@
<DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
<DataGridTextColumn Header="Nanolitter Per Pulse" Binding="{Binding NlPerPulse}"></DataGridTextColumn>
<DataGridTextColumn Header="Capacity" Binding="{Binding Capacity}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Min Frequency" Binding="{Binding MinFrequency}"></DataGridTextColumn>
+
+ <DataGridTextColumn Header="Max Frequency" Binding="{Binding MaxFrequency}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Min Micro Step" Binding="{Binding MinMicroStep}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Max Micro Step" Binding="{Binding MaxMicroStep}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Correction Gain" Binding="{Binding CorrectionGain}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Ratio To Dryer Speed" Binding="{Binding RatioToDryerSpeed}"></DataGridTextColumn>
+ <DataGridTextColumn Header="KP" Binding="{Binding Kp}"></DataGridTextColumn>
+ <DataGridTextColumn Header="KI" Binding="{Binding Ki}"></DataGridTextColumn>
+
+ <DataGridTextColumn Header="KD" Binding="{Binding Kd}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Change Slope" Binding="{Binding ChangeSlope}"></DataGridTextColumn>
+ <DataGridTextColumn Header="High Length Micro Second" Binding="{Binding HighLengthMicroSecond}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Control Timing" Binding="{Binding ControlTiming}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</controls:DbTableView>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml
new file mode 100644
index 000000000..491c69a69
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml
@@ -0,0 +1,72 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MotorTypeView"
+ 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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:MotorTypesViewVM, IsDesignTimeCreatable=False}">
+
+ <Grid>
+ <controls:TableGrid>
+ <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Code:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Code,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+
+
+ <TextBlock Text="Min Frequency:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="40000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MinFrequency,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Max Frequency:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="40000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MaxFrequency,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Min Micro Step:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MinMicroStep,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Max Micro Step:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MaxMicroStep,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Linear Ratio:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.LinearRatio,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Median Position:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MedianPosition,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Correction Gain:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.CorrectionGain,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Ratio To Dryer Speed:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.RatioToDryerSpeed,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="KP:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Kp,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="KI:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Ki,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="KD:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Kd,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Change Slope:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.ChangeSlope,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="High Length Micro Second:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.HighLengthMicroSecond,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Speed Master:" FontWeight="Bold"></TextBlock>
+ <ToggleButton IsChecked="{Binding EditEntity.SpeedMaster}" HorizontalAlignment="Right"></ToggleButton>
+ </controls:TableGrid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml.cs
new file mode 100644
index 000000000..e19082280
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.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.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachineView.xaml
+ /// </summary>
+ public partial class MotorTypeView : UserControl
+ {
+ public MotorTypeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml
new file mode 100644
index 000000000..0f748eba6
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml
@@ -0,0 +1,46 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.MotorTypesView"
+ 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:global="clr-namespace:Tango.MachineStudio.DB"
+ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MotorTypesViewVM}">
+
+ <UserControl.Resources>
+ <converters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.MotorTypesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
+ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+
+ <DataGridTextColumn Header="Min Frequency" Binding="{Binding MinFrequency}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Max Frequency" Binding="{Binding MaxFrequency}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Min Micro Step" Binding="{Binding MinMicroStep}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Max Micro Step" Binding="{Binding MaxMicroStep}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Linear Ratio" Binding="{Binding LinearRatio}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Median Position" Binding="{Binding MedianPosition}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Correction Gain" Binding="{Binding CorrectionGain}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Ratio To Dryer Speed" Binding="{Binding RatioToDryerSpeed}"></DataGridTextColumn>
+ <DataGridTextColumn Header="KP" Binding="{Binding Kp}"></DataGridTextColumn>
+ <DataGridTextColumn Header="KI" Binding="{Binding Ki}"></DataGridTextColumn>
+
+ <DataGridTextColumn Header="KD" Binding="{Binding Kd}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Change Slope" Binding="{Binding ChangeSlope}"></DataGridTextColumn>
+ <DataGridTextColumn Header="High Length Micro Second" Binding="{Binding HighLengthMicroSecond}"></DataGridTextColumn>
+
+ <DataGridTextColumn Header="Speed Master" Binding="{Binding SpeedMaster,Converter={StaticResource BooleanToYesNoConverter}}"></DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml.cs
new file mode 100644
index 000000000..9497d1f1e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml.cs
@@ -0,0 +1,32 @@
+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;
+using Tango.MachineStudio.DB.CustomAttributes;
+using Tango.MachineStudio.DB.Managers;
+using Tango.SharedUI.Controls;
+
+namespace Tango.MachineStudio.DB.Views.DBViews
+{
+ /// <summary>
+ /// Interaction logic for MachinesView.xaml
+ /// </summary>
+ [DBView]
+ public partial class MotorTypesView : UserControl
+ {
+ public MotorTypesView() : base()
+ {
+ InitializeComponent();
+ }
+ }
+}