diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-27 15:40:19 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-27 15:40:19 +0200 |
| commit | 47c117490f9f9fed42329ebd1374709528693d6b (patch) | |
| tree | 5c50f9acf1f9721d3db8cbecbdb5df89e6cc800e /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB | |
| parent | 7d61c30b400b62069d1e69893ebe196412b2df2b (diff) | |
| download | Tango-47c117490f9f9fed42329ebd1374709528693d6b.tar.gz Tango-47c117490f9f9fed42329ebd1374709528693d6b.zip | |
Refactored Hardware Designer DAL.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB')
23 files changed, 170 insertions, 364 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> |
