aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-27 15:40:19 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-27 15:40:19 +0200
commit47c117490f9f9fed42329ebd1374709528693d6b (patch)
tree5c50f9acf1f9721d3db8cbecbdb5df89e6cc800e /Software/Visual_Studio/MachineStudio/Modules
parent7d61c30b400b62069d1e69893ebe196412b2df2b (diff)
downloadTango-47c117490f9f9fed42329ebd1374709528693d6b.tar.gz
Tango-47c117490f9f9fed42329ebd1374709528693d6b.zip
Refactored Hardware Designer DAL.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj44
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs37
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareDancerTypesViewVM.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MotorTypesViewVM.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareMotorTypesViewVM.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DancerTypesViewVM.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwarePidControlTypesViewVM.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/PidControlsViewVM.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsDancerTypeViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsMotorTypesViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypeView.xaml (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml)16
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypeView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlView.xaml.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypesView.xaml (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml)11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypesView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypeView.xaml29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypeView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlsView.xaml.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypeView.xaml29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypeView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml.cs)4
-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/MotorTypesView.xaml46
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlView.xaml73
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlsView.xaml48
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs54
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml60
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs24
26 files changed, 237 insertions, 435 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
index fa567697d..5a07c6c4a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
@@ -106,7 +106,7 @@
<Compile Include="ViewModels\CctsViewVM.cs" />
<Compile Include="ViewModels\ConfigurationsViewVM.cs" />
<Compile Include="ViewModels\ContactsViewVM.cs" />
- <Compile Include="ViewModels\DancerTypesViewVM.cs" />
+ <Compile Include="ViewModels\HardwareDancerTypesViewVM.cs" />
<Compile Include="ViewModels\DbTableViewModel.cs" />
<Compile Include="ViewModels\DialogOpenMode.cs" />
<Compile Include="ViewModels\DispenserTypesViewVM.cs" />
@@ -115,8 +115,6 @@
<Compile Include="ViewModels\EventTypesViewVM.cs" />
<Compile Include="ViewModels\FiberShapesViewVM.cs" />
<Compile Include="ViewModels\FiberSynthsViewVM.cs" />
- <Compile Include="ViewModels\HardwareVersionsDancerTypeViewVM.cs" />
- <Compile Include="ViewModels\HardwareVersionsMotorTypesViewVM.cs" />
<Compile Include="ViewModels\HardwareVersionsViewVM.cs" />
<Compile Include="ViewModels\IdsPackFormulasViewVM.cs" />
<Compile Include="ViewModels\IdsPacksViewVM.cs" />
@@ -130,11 +128,11 @@
<Compile Include="ViewModels\MediaMaterialsViewVM.cs" />
<Compile Include="ViewModels\MediaPurposesViewVM.cs" />
<Compile Include="ViewModels\MidTankTypesViewVM.cs" />
- <Compile Include="ViewModels\MotorTypesViewVM.cs" />
+ <Compile Include="ViewModels\HardwareMotorTypesViewVM.cs" />
<Compile Include="ViewModels\MultiComboVM.cs" />
<Compile Include="ViewModels\OrganizationsViewVM.cs" />
<Compile Include="ViewModels\PermissionsViewVM.cs" />
- <Compile Include="ViewModels\PidControlsViewVM.cs" />
+ <Compile Include="ViewModels\HardwarePidControlTypesViewVM.cs" />
<Compile Include="ViewModels\ProcessParametersTablesViewVM.cs" />
<Compile Include="ViewModels\ProcessParametersTablesGroupsViewVM.cs" />
<Compile Include="ViewModels\RmlsViewVM.cs" />
@@ -149,23 +147,23 @@
<Compile Include="Views\DBViews\ActionTypeView.xaml.cs">
<DependentUpon>ActionTypeView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\PidControlsView.xaml.cs">
- <DependentUpon>PidControlsView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\HardwarePidControlTypesView.xaml.cs">
+ <DependentUpon>HardwarePidControlTypesView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\DancerTypesView.xaml.cs">
- <DependentUpon>DancerTypesView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\HardwareDancerTypesView.xaml.cs">
+ <DependentUpon>HardwareDancerTypesView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\PidControlView.xaml.cs">
- <DependentUpon>PidControlView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\HardwarePidControlTypeView.xaml.cs">
+ <DependentUpon>HardwarePidControlTypeView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\DancerTypeView.xaml.cs">
- <DependentUpon>DancerTypeView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\HardwareDancerTypeView.xaml.cs">
+ <DependentUpon>HardwareDancerTypeView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\MotorTypeView.xaml.cs">
- <DependentUpon>MotorTypeView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\HardwareMotorTypeView.xaml.cs">
+ <DependentUpon>HardwareMotorTypeView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\MotorTypesView.xaml.cs">
- <DependentUpon>MotorTypesView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\HardwareMotorTypesView.xaml.cs">
+ <DependentUpon>HardwareMotorTypesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\DBViews\IdsPackFormulasView.xaml.cs">
<DependentUpon>IdsPackFormulasView.xaml</DependentUpon>
@@ -409,27 +407,27 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\PidControlsView.xaml">
+ <Page Include="Views\DBViews\HardwarePidControlTypesView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\DancerTypesView.xaml">
+ <Page Include="Views\DBViews\HardwareDancerTypesView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\PidControlView.xaml">
+ <Page Include="Views\DBViews\HardwarePidControlTypeView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\DancerTypeView.xaml">
+ <Page Include="Views\DBViews\HardwareDancerTypeView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\MotorTypeView.xaml">
+ <Page Include="Views\DBViews\HardwareMotorTypeView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\MotorTypesView.xaml">
+ <Page Include="Views\DBViews\HardwareMotorTypesView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
index 0889be54e..feb9b7de5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
@@ -63,12 +63,9 @@ namespace Tango.MachineStudio.DB
SimpleIoc.Default.Register<ProcessParametersTablesViewVM>();
SimpleIoc.Default.Register<ProcessParametersTablesGroupsViewVM>();
- SimpleIoc.Default.Register<MotorTypesViewVM>();
- SimpleIoc.Default.Register<DancerTypesViewVM>();
- SimpleIoc.Default.Register<HardwareVersionsDancerTypeViewVM>();
- SimpleIoc.Default.Register<HardwareVersionsMotorTypesViewVM>();
-
- SimpleIoc.Default.Register<PidControlsViewVM>();
+ SimpleIoc.Default.Register<HardwareMotorTypesViewVM>();
+ SimpleIoc.Default.Register<HardwareDancerTypesViewVM>();
+ SimpleIoc.Default.Register<HardwarePidControlTypesViewVM>();
}
public static MainViewVM MainViewVM
@@ -375,43 +372,27 @@ namespace Tango.MachineStudio.DB
}
}
- public static MotorTypesViewVM MotorTypesViewVM
- {
- get
- {
- return ServiceLocator.Current.GetInstance<MotorTypesViewVM>();
- }
- }
-
- public static DancerTypesViewVM DancerTypesViewVM
- {
- get
- {
- return ServiceLocator.Current.GetInstance<DancerTypesViewVM>();
- }
- }
-
- public static HardwareVersionsDancerTypeViewVM HardwareVersionsDancerTypeViewVM
+ public static HardwareMotorTypesViewVM HardwareMotorTypesViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<HardwareVersionsDancerTypeViewVM>();
+ return ServiceLocator.Current.GetInstance<HardwareMotorTypesViewVM>();
}
}
- public static HardwareVersionsMotorTypesViewVM HardwareVersionsMotorTypesViewVM
+ public static HardwareDancerTypesViewVM HardwareDancerTypesViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<HardwareVersionsMotorTypesViewVM>();
+ return ServiceLocator.Current.GetInstance<HardwareDancerTypesViewVM>();
}
}
- public static PidControlsViewVM PidControlsViewVM
+ public static HardwarePidControlTypesViewVM HardwarePidControlTypesViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<PidControlsViewVM>();
+ return ServiceLocator.Current.GetInstance<HardwarePidControlTypesViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MotorTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareDancerTypesViewVM.cs
index ad3eeac8f..98068b9a7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MotorTypesViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareDancerTypesViewVM.cs
@@ -8,9 +8,9 @@ using Tango.MachineStudio.Common.Notifications;
namespace Tango.MachineStudio.DB.ViewModels
{
- public class MotorTypesViewVM : DbTableViewModel<MotorType>
+ public class HardwareDancerTypesViewVM : DbTableViewModel<HardwareDancerType>
{
- public MotorTypesViewVM(INotificationProvider notification) : base(notification)
+ public HardwareDancerTypesViewVM(INotificationProvider notification) : base(notification)
{
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DancerTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareMotorTypesViewVM.cs
index 59d55bd0e..343d381c1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DancerTypesViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareMotorTypesViewVM.cs
@@ -8,9 +8,9 @@ using Tango.MachineStudio.Common.Notifications;
namespace Tango.MachineStudio.DB.ViewModels
{
- public class DancerTypesViewVM : DbTableViewModel<DancerType>
+ public class HardwareMotorTypesViewVM : DbTableViewModel<HardwareMotorType>
{
- public DancerTypesViewVM(INotificationProvider notification) : base(notification)
+ public HardwareMotorTypesViewVM(INotificationProvider notification) : base(notification)
{
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/PidControlsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwarePidControlTypesViewVM.cs
index 7fe342da5..2a821fad7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/PidControlsViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwarePidControlTypesViewVM.cs
@@ -9,9 +9,9 @@ using Tango.SharedUI;
namespace Tango.MachineStudio.DB.ViewModels
{
- public class PidControlsViewVM : DbTableViewModel<PidControl>
+ public class HardwarePidControlTypesViewVM : DbTableViewModel<HardwarePidControlType>
{
- public PidControlsViewVM(INotificationProvider notification) : base(notification)
+ public HardwarePidControlTypesViewVM(INotificationProvider notification) : base(notification)
{
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsDancerTypeViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsDancerTypeViewVM.cs
deleted file mode 100644
index 8fd1480ee..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsDancerTypeViewVM.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Integration.Observables;
-using Tango.MachineStudio.Common.Notifications;
-
-namespace Tango.MachineStudio.DB.ViewModels
-{
- public class HardwareVersionsDancerTypeViewVM : DbTableViewModel<HardwareVersionsDancerType>
- {
- public HardwareVersionsDancerTypeViewVM(INotificationProvider notification) : base(notification)
- {
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsMotorTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsMotorTypesViewVM.cs
deleted file mode 100644
index 1dab55614..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsMotorTypesViewVM.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Integration.Observables;
-using Tango.MachineStudio.Common.Notifications;
-
-namespace Tango.MachineStudio.DB.ViewModels
-{
- public class HardwareVersionsMotorTypesViewVM : DbTableViewModel<HardwareVersionsMotorType>
- {
- public HardwareVersionsMotorTypesViewVM(INotificationProvider notification) : base(notification)
- {
- }
- }
-}
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/HardwareDancerTypeView.xaml
index 717e07f48..c4b2d4d83 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypeView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypeView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DancerTypeView"
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwareDancerTypeView"
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"
@@ -10,7 +10,7 @@
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}">
+ d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:HardwareDancerTypesViewVM, IsDesignTimeCreatable=False}">
<Grid>
<controls:TableGrid>
@@ -24,18 +24,6 @@
<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/PidControlView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypeView.xaml.cs
index df45fb1ff..cbc073004 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypeView.xaml.cs
@@ -18,9 +18,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// <summary>
/// Interaction logic for MachineView.xaml
/// </summary>
- public partial class PidControlView : UserControl
+ public partial class HardwareDancerTypeView : UserControl
{
- public PidControlView()
+ public HardwareDancerTypeView()
{
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/HardwareDancerTypesView.xaml
index 245d4a04a..253b9efc5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DancerTypesView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypesView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.DancerTypesView"
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwareDancerTypesView"
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"
@@ -8,7 +8,7 @@
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}">
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.HardwareDancerTypesViewVM}">
<UserControl.Resources>
<converters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" />
@@ -16,17 +16,12 @@
<Grid>
<controls:DbTableView>
- <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.DancerTypesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True">
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.HardwareDancerTypesViewSource}" 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>
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/HardwareDancerTypesView.xaml.cs
index 1b0c8e82e..eed483ffd 100644
--- 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/HardwareDancerTypesView.xaml.cs
@@ -22,9 +22,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// Interaction logic for MachinesView.xaml
/// </summary>
[DBView]
- public partial class DancerTypesView : UserControl
+ public partial class HardwareDancerTypesView : UserControl
{
- public DancerTypesView() : base()
+ public HardwareDancerTypesView() : base()
{
InitializeComponent();
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypeView.xaml
new file mode 100644
index 000000000..d58ff9ec6
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypeView.xaml
@@ -0,0 +1,29 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwareMotorTypeView"
+ 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:HardwareMotorTypesViewVM, 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>
+ </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/HardwareMotorTypeView.xaml.cs
index d07cf68c5..c4f43fb45 100644
--- 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/HardwareMotorTypeView.xaml.cs
@@ -18,9 +18,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// <summary>
/// Interaction logic for MachineView.xaml
/// </summary>
- public partial class DancerTypeView : UserControl
+ public partial class HardwareMotorTypeView : UserControl
{
- public DancerTypeView()
+ public HardwareMotorTypeView()
{
InitializeComponent();
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml
new file mode 100644
index 000000000..5c9fe6cc9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml
@@ -0,0 +1,29 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwareMotorTypesView"
+ 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.HardwareMotorTypesViewVM}">
+
+ <UserControl.Resources>
+ <converters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.HardwareMotorTypesViewSource}" 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>
+ </DataGrid.Columns>
+ </DataGrid>
+ </controls:DbTableView>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml.cs
index 9ac44d396..6df28f455 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlsView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml.cs
@@ -22,9 +22,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// Interaction logic for MachinesView.xaml
/// </summary>
[DBView]
- public partial class PidControlsView : UserControl
+ public partial class HardwareMotorTypesView : UserControl
{
- public PidControlsView() : base()
+ public HardwareMotorTypesView() : base()
{
InitializeComponent();
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypeView.xaml
new file mode 100644
index 000000000..1c9fd3ed5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypeView.xaml
@@ -0,0 +1,29 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwarePidControlTypeView"
+ 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:HardwarePidControlTypesViewVM, 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>
+ </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/HardwarePidControlTypeView.xaml.cs
index e19082280..896501d8e 100644
--- 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/HardwarePidControlTypeView.xaml.cs
@@ -18,9 +18,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// <summary>
/// Interaction logic for MachineView.xaml
/// </summary>
- public partial class MotorTypeView : UserControl
+ public partial class HardwarePidControlTypeView : UserControl
{
- public MotorTypeView()
+ public HardwarePidControlTypeView()
{
InitializeComponent();
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml
new file mode 100644
index 000000000..4ea3904bf
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml
@@ -0,0 +1,30 @@
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.HardwarePidControlTypesView"
+ 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:observables="clr-namespace:Tango.Integration.Observables;assembly=Tango.Integration"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" d:DataContext="{d:DesignInstance Type=observables:HardwarePidControlType, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.HardwarePidControlTypesViewVM}">
+
+ <UserControl.Resources>
+ <converters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <controls:DbTableView>
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.HardwarePidControlTypesViewSource}" 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>
+ </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/HardwarePidControlTypesView.xaml.cs
index 9497d1f1e..f554a8f66 100644
--- 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/HardwarePidControlTypesView.xaml.cs
@@ -22,9 +22,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// Interaction logic for MachinesView.xaml
/// </summary>
[DBView]
- public partial class MotorTypesView : UserControl
+ public partial class HardwarePidControlTypesView : UserControl
{
- public MotorTypesView() : base()
+ public HardwarePidControlTypesView() : base()
{
InitializeComponent();
}
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
deleted file mode 100644
index 491c69a69..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypeView.xaml
+++ /dev/null
@@ -1,72 +0,0 @@
-<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/MotorTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml
deleted file mode 100644
index 0f748eba6..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MotorTypesView.xaml
+++ /dev/null
@@ -1,46 +0,0 @@
-<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/PidControlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlView.xaml
deleted file mode 100644
index 5459fbbff..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlView.xaml
+++ /dev/null
@@ -1,73 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.PidControlView"
- 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:PidControlsViewVM, 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="Description:" FontWeight="Bold"></TextBlock>
- <TextBox Text="{Binding EditEntity.Description,Mode=TwoWay}"></TextBox>
-
- <TextBlock Text="Output Proportional Power Limit:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.OutputProportionalPowerLimit,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Output Proportional Band:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.OutputProportionalBand,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Integral Time:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.IntegralTime,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Derivative Time:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.DerivativeTime,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Sensor Correction Adjustment:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.SensorCorrectionAdjustment,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Sensor Min Value:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.SensorMinValue,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Sensor Max Value:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.SensorMaxValue,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="SetPoint Ramp Rateor Soft Start Ramp:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.SetPointRampRateorSoftStartRamp,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Set Point Control Output Rate:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.SetPointControlOutputRate,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Control Output Type:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.ControlOutputType,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="SSR Control Output Type:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.SsrControlOutputType,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Output On/Off Hysteresis Value:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.OutputOnOffHysteresisValue,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="Process Variable Sampling Rate:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.ProcessVariableSamplingRate,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
-
- <TextBlock Text="PV Input Filter Factor Mode:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" Value="{Binding EditEntity.PvInputFilterFactorMode,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
- </controls:TableGrid>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlsView.xaml
deleted file mode 100644
index 0a7d6d4df..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PidControlsView.xaml
+++ /dev/null
@@ -1,48 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.PidControlsView"
- 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:observables="clr-namespace:Tango.Integration.Observables;assembly=Tango.Integration"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- mc:Ignorable="d"
- d:DesignHeight="720" d:DesignWidth="1280" Background="White" d:DataContext="{d:DesignInstance Type=observables:PidControl, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.PidControlsViewVM}">
-
- <UserControl.Resources>
- <converters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" />
- </UserControl.Resources>
-
- <Grid>
- <controls:DbTableView>
- <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.PidControlsViewSource}" 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="Description" Binding="{Binding Description}"></DataGridTextColumn>
- <DataGridTextColumn Header="Output Proportional Power Limit" Binding="{Binding OutputProportionalPowerLimit}"></DataGridTextColumn>
- <DataGridTextColumn Header="Output Proportional Band" Binding="{Binding OutputProportionalBand}"></DataGridTextColumn>
-
- <DataGridTextColumn Header="Integral Time" Binding="{Binding IntegralTime}"></DataGridTextColumn>
- <DataGridTextColumn Header="Derivative Time" Binding="{Binding DerivativeTime}"></DataGridTextColumn>
- <DataGridTextColumn Header="Sensor Correction Adjustment" Binding="{Binding SensorCorrectionAdjustment}"></DataGridTextColumn>
- <DataGridTextColumn Header="Sensor Min Value" Binding="{Binding SensorMinValue}"></DataGridTextColumn>
- <DataGridTextColumn Header="Sensor Max Value" Binding="{Binding SensorMaxValue}"></DataGridTextColumn>
- <DataGridTextColumn Header="SetPoint Ramp Rateor Soft Start Ramp" Binding="{Binding SetPointRampRateorSoftStartRamp}"></DataGridTextColumn>
- <DataGridTextColumn Header="Set Point Control Output Rate" Binding="{Binding SetPointControlOutputRate}"></DataGridTextColumn>
- <DataGridTextColumn Header="Control Output Type" Binding="{Binding ControlOutputType}"></DataGridTextColumn>
-
- <DataGridTextColumn Header="SSR Control Output Type" Binding="{Binding SsrControlOutputType}"></DataGridTextColumn>
- <DataGridTextColumn Header="Output On/Off Hysteresis Value" Binding="{Binding OutputOnOffHysteresisValue}"></DataGridTextColumn>
- <DataGridTextColumn Header="Process Variable Sampling Rate" Binding="{Binding ProcessVariableSamplingRate}"></DataGridTextColumn>
- <DataGridTextColumn Header="PV Input Filter Factor Mode" Binding="{Binding PvInputFilterFactorMode}"></DataGridTextColumn>
- </DataGrid.Columns>
- </DataGrid>
- </controls:DbTableView>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
index 0da894aba..06a3c9ba4 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
@@ -33,27 +33,6 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
set { _currentVersion = value; RaisePropertyChangedAuto(); }
}
- private ObservableCollection<MotorType> _currentVersionMotorTypes;
- public ObservableCollection<MotorType> CurrentVersionMotorTypes
- {
- get { return _currentVersionMotorTypes; }
- set { _currentVersionMotorTypes = value; RaisePropertyChangedAuto(); }
- }
-
- private ObservableCollection<DancerType> _currentVersionDancerTypes;
- public ObservableCollection<DancerType> CurrentVersionDancerTypes
- {
- get { return _currentVersionDancerTypes; }
- set { _currentVersionDancerTypes = value; RaisePropertyChangedAuto(); }
- }
-
- private ObservableCollection<PidControl> _currentVersionPidControls;
- public ObservableCollection<PidControl> CurrentVersionPidControls
- {
- get { return _currentVersionPidControls; }
- set { _currentVersionPidControls = value; RaisePropertyChangedAuto(); }
- }
-
public RelayCommand SaveCommand { get; set; }
public MainViewVM()
@@ -66,47 +45,44 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
private void OnSelectedVersionChanged()
{
CurrentVersion = SelectedVersion.Clone();
- CurrentVersionDancerTypes = CurrentVersion.HardwareVersionsDancerTypes.Select(x => x.DancerType).ToObservableCollection();
- CurrentVersionMotorTypes = CurrentVersion.HardwareVersionsMotorTypes.Select(x => x.MotorType).ToObservableCollection();
- CurrentVersionPidControls = CurrentVersion.HardwareVersionsPidControls.Select(x => x.PidControl).ToObservableCollection();
}
- public void OnRemoveDancer(DancerType dancerType)
+ public void OnRemoveDancer(HardwareDancer dancer)
{
- CurrentVersionDancerTypes.Remove(dancerType);
+ CurrentVersion.HardwareDancers.Remove(dancer);
}
- public void OnRemoveMotor(MotorType motorType)
+ public void OnRemoveMotor(HardwareMotor motor)
{
- CurrentVersionMotorTypes.Remove(motorType);
+ CurrentVersion.HardwareMotors.Remove(motor);
}
- public void OnRemovePidControl(PidControl pidControl)
+ public void OnRemovePidControl(HardwarePidControl pidControl)
{
- CurrentVersionPidControls.Remove(pidControl);
+ CurrentVersion.HardwarePidControls.Remove(pidControl);
}
- public void OnMotorDrop(MotorType motorType)
+ public void OnMotorDrop(HardwareMotorType motorType)
{
- if (!CurrentVersionMotorTypes.Contains(motorType))
+ if (!CurrentVersion.HardwareMotors.ToList().Exists(x => x.HardwareMotorType == motorType))
{
- CurrentVersionMotorTypes.Add(motorType);
+ CurrentVersion.HardwareMotors.Add(new HardwareMotor() { HardwareMotorType = motorType });
}
}
- public void OnDropDancer(DancerType dancerType)
+ public void OnDropDancer(HardwareDancerType dancerType)
{
- if (!CurrentVersionDancerTypes.Contains(dancerType))
+ if (!CurrentVersion.HardwareDancers.ToList().Exists(x => x.HardwareDancerType == dancerType))
{
- CurrentVersionDancerTypes.Add(dancerType);
+ CurrentVersion.HardwareDancers.Add(new HardwareDancer() { HardwareDancerType = dancerType });
}
}
- public void OnDropPidControl(PidControl pidControl)
+ public void OnDropPidControl(HardwarePidControlType pidControlType)
{
- if (!CurrentVersionPidControls.Contains(pidControl))
+ if (!CurrentVersion.HardwarePidControls.ToList().Exists(x => x.HardwarePidControlType == pidControlType))
{
- CurrentVersionPidControls.Add(pidControl);
+ CurrentVersion.HardwarePidControls.Add(new HardwarePidControl() { HardwarePidControlType = pidControlType });
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
index e73ba2a1f..3e840467f 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
@@ -45,7 +45,13 @@
<TextBlock FontSize="30" FontStyle="Italic" VerticalAlignment="Center" Margin="50 10 10 0" Foreground="Silver" FontWeight="Bold">HARDWARE DESIGNER</TextBlock>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="10 10 0 0">
<materialDesign:PackIcon Kind="Pencil" Width="32" Height="32" Foreground="Silver" />
- <ComboBox ItemsSource="{Binding Adapter.HardwareVersions}" SelectedItem="{Binding SelectedVersion}" DisplayMemberPath="Name" Width="300" FontSize="16" FontWeight="Bold" Margin="5 0 0 0" materialDesign:HintAssist.Hint="Hardware Version"></ComboBox>
+ <ComboBox ItemsSource="{Binding Adapter.HardwareVersions}" SelectedItem="{Binding SelectedVersion}" Width="300" FontSize="16" FontWeight="Bold" Margin="5 0 0 0" materialDesign:HintAssist.Hint="Hardware Version">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock><Run Text="{Binding Name}"></Run> <Run></Run> <Run Foreground="Gray" FontSize="14">v</Run><Run Foreground="Gray" FontSize="14" Text="{Binding Version}"></Run></TextBlock>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
</StackPanel>
</StackPanel>
</Grid>
@@ -63,14 +69,14 @@
<Border BorderThickness="1" BorderBrush="Gray" CornerRadius="0 0 20 20" Width="707" Height="132" Canvas.Left="50" Canvas.Top="378" Background="#ABFFFFFF">
<Grid Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnDancerDrop">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Silver" FontSize="20">DRAG &amp; DROP DANCERS</TextBlock>
- <ListBox x:Name="listDancers" ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding CurrentVersionDancerTypes}" Margin="0 5 0 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
+ <ListBox x:Name="listDancers" ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding CurrentVersion.HardwareDancers}" Margin="0 5 0 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
- <DataTemplate DataType="{x:Type observables:DancerType}">
+ <DataTemplate DataType="{x:Type observables:HardwareDancer}">
<Grid Style="{StaticResource draggableGrid}">
<Border Margin="5" CornerRadius="5" Width="100" Height="100" BorderThickness="1" Padding="2" IsHitTestVisible="False">
<Border.Style>
@@ -92,7 +98,7 @@
<Grid>
<StackPanel>
<Image Source="../Images/compass.png" Width="32" Margin="5" />
- <TextBlock FontSize="8" TextAlignment="Center" TextWrapping="Wrap" Margin="0 5 0 0" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ <TextBlock FontSize="8" TextAlignment="Center" TextWrapping="Wrap" Margin="0 5 0 0" Text="{Binding HardwareDancerType.Name}" VerticalAlignment="Center"></TextBlock>
</StackPanel>
</Grid>
</Border>
@@ -106,14 +112,14 @@
<Border BorderThickness="1 1 1 0" BorderBrush="Gray" Width="576" Height="157" Canvas.Left="114" Canvas.Top="224" Background="#ABFFFFFF">
<Grid Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnMotorsDrop">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Silver" FontSize="20">DRAG &amp; DROP MOTORS</TextBlock>
- <ListBox x:Name="listMotors" ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding CurrentVersionMotorTypes}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
+ <ListBox x:Name="listMotors" ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding CurrentVersion.HardwareMotors}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
- <DataTemplate DataType="{x:Type observables:MotorType}">
+ <DataTemplate DataType="{x:Type observables:HardwareMotor}">
<Grid Style="{StaticResource draggableGrid}">
<Grid.ToolTip>
<Border Padding="2">
@@ -150,7 +156,7 @@
<Grid>
<StackPanel Orientation="Horizontal">
<Image Source="../Images/engine.png" Width="16" />
- <TextBlock FontSize="8" Margin="5 0 0 0" TextTrimming="CharacterEllipsis" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ <TextBlock FontSize="8" Margin="5 0 0 0" TextTrimming="CharacterEllipsis" Text="{Binding HardwareMotorType.Name}" VerticalAlignment="Center"></TextBlock>
</StackPanel>
</Grid>
</Border>
@@ -164,14 +170,14 @@
<Border BorderThickness="1 1 1 0" BorderBrush="Gray" Width="545" Height="120" Canvas.Left="130" Canvas.Top="105" Background="#ABFFFFFF" CornerRadius="20 20 0 0" Padding="5">
<Grid Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnPidControlDrop">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Silver" FontSize="20">DRAG &amp; DROP PID CONTROLS</TextBlock>
- <ListBox x:Name="listPid" ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding CurrentVersionPidControls}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
+ <ListBox x:Name="listPid" ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding CurrentVersion.HardwarePidControls}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
- <DataTemplate DataType="{x:Type observables:PidControl}">
+ <DataTemplate DataType="{x:Type observables:HardwarePidControl}">
<Grid Style="{StaticResource draggableGrid}">
<Border Margin="4" CornerRadius="3" Height="25" IsHitTestVisible="False" MaxWidth="100" BorderThickness="1" Padding="5 2 9 2">
<Border.Style>
@@ -193,7 +199,7 @@
<Grid>
<StackPanel Orientation="Horizontal">
<Image Source="../Images/balance.png" Width="16" />
- <TextBlock FontSize="8" Margin="5 0 0 0" TextTrimming="CharacterEllipsis" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ <TextBlock FontSize="8" Margin="5 0 0 0" TextTrimming="CharacterEllipsis" Text="{Binding HardwarePidControlType.Name}" VerticalAlignment="Center"></TextBlock>
</StackPanel>
</Grid>
</Border>
@@ -227,7 +233,7 @@
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
- <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="0 0 0 10">
<Grid>
<StackPanel>
<materialDesign:Card Margin="5,10,5,0" Background="{DynamicResource MaterialDesignBackground}" Padding="20 10">
@@ -245,7 +251,7 @@
<materialDesign:Card Margin="5,10,5,0" Background="{DynamicResource MaterialDesignBackground}">
<StackPanel>
<Expander HorizontalAlignment="Stretch" Header="Motors">
- <ListBox ItemsSource="{Binding Adapter.MotorTypes}" HorizontalContentAlignment="Stretch">
+ <ListBox ItemsSource="{Binding Adapter.HardwareMotorTypes}" HorizontalContentAlignment="Stretch">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
@@ -275,7 +281,7 @@
<materialDesign:Card Margin="5,10,5,0" Background="{DynamicResource MaterialDesignBackground}">
<StackPanel>
<Expander HorizontalAlignment="Stretch" Header="Dancers">
- <ListBox ItemsSource="{Binding Adapter.DancerTypes}" HorizontalContentAlignment="Stretch">
+ <ListBox ItemsSource="{Binding Adapter.HardwareDancerTypes}" HorizontalContentAlignment="Stretch">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
@@ -305,7 +311,7 @@
<materialDesign:Card Margin="5,10,5,0" Background="{DynamicResource MaterialDesignBackground}">
<StackPanel>
<Expander HorizontalAlignment="Stretch" Header="PID Controls">
- <ListBox ItemsSource="{Binding Adapter.PidControls}" HorizontalContentAlignment="Stretch">
+ <ListBox ItemsSource="{Binding Adapter.HardwarePidControlTypes}" HorizontalContentAlignment="Stretch">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
@@ -456,12 +462,26 @@
</ScrollViewer>
<Grid Grid.Row="1" Margin="10 0 10 10">
- <Button Height="Auto" Command="{Binding SaveCommand}" Margin="0 0 0 0">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Kind="ContentSaveSettings"></materialDesign:PackIcon>
- <TextBlock FontSize="14" Margin="10 0 0 0" VerticalAlignment="Center">SAVE</TextBlock>
- </StackPanel>
- </Button>
+ <UniformGrid Rows="1">
+ <Button Height="Auto" Grid.Column="1" Command="{Binding DeleteCommand}" Margin="2" Background="#FF8A8A" BorderBrush="#FF8A8A">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Kind="Delete"></materialDesign:PackIcon>
+ <TextBlock FontSize="14" Margin="10 0 0 0" VerticalAlignment="Center">DEL</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Height="Auto" Grid.Column="1" Command="{Binding NewCommand}" Margin="2" Background="#6BD16F" BorderBrush="#6BD16F">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Kind="Plus"></materialDesign:PackIcon>
+ <TextBlock FontSize="14" Margin="10 0 0 0" VerticalAlignment="Center">NEW</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Height="Auto" Command="{Binding SaveCommand}" Margin="2">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Kind="ContentSaveSettings"></materialDesign:PackIcon>
+ <TextBlock FontSize="14" Margin="10 0 0 0" VerticalAlignment="Center">SAVE</TextBlock>
+ </StackPanel>
+ </Button>
+ </UniformGrid>
</Grid>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
index d18a8ac71..0a3c06344 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml.cs
@@ -43,41 +43,41 @@ namespace Tango.MachineStudio.HardwareDesigner.Views
private void OnMotorsDrop(object sender, DropEventArgs e)
{
- if (e.Draggable.DataContext is MotorType)
+ if (e.Draggable.DataContext is HardwareMotorType)
{
- _vm.OnMotorDrop(e.Draggable.DataContext as MotorType);
+ _vm.OnMotorDrop(e.Draggable.DataContext as HardwareMotorType);
}
}
private void OnDancerDrop(object sender, DropEventArgs e)
{
- if (e.Draggable.DataContext is DancerType)
+ if (e.Draggable.DataContext is HardwareDancerType)
{
- _vm.OnDropDancer(e.Draggable.DataContext as DancerType);
+ _vm.OnDropDancer(e.Draggable.DataContext as HardwareDancerType);
}
}
private void OnPidControlDrop(object sender, DropEventArgs e)
{
- if (e.Draggable.DataContext is PidControl)
+ if (e.Draggable.DataContext is HardwarePidControlType)
{
- _vm.OnDropPidControl(e.Draggable.DataContext as PidControl);
+ _vm.OnDropPidControl(e.Draggable.DataContext as HardwarePidControlType);
}
}
private void OnTrashDrop(object sender, DropEventArgs e)
{
- if (e.Draggable.DataContext is MotorType)
+ if (e.Draggable.DataContext is HardwareMotor)
{
- _vm.OnRemoveMotor(e.Draggable.DataContext as MotorType);
+ _vm.OnRemoveMotor(e.Draggable.DataContext as HardwareMotor);
}
- else if (e.Draggable.DataContext is DancerType)
+ else if (e.Draggable.DataContext is HardwareDancer)
{
- _vm.OnRemoveDancer(e.Draggable.DataContext as DancerType);
+ _vm.OnRemoveDancer(e.Draggable.DataContext as HardwareDancer);
}
- else if (e.Draggable.DataContext is PidControl)
+ else if (e.Draggable.DataContext is HardwarePidControl)
{
- _vm.OnRemovePidControl(e.Draggable.DataContext as PidControl);
+ _vm.OnRemovePidControl(e.Draggable.DataContext as HardwarePidControl);
}
}
}