diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB')
10 files changed, 164 insertions, 0 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 b8b9dea44..2bd5bd986 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 @@ -116,6 +116,7 @@ <Compile Include="ViewModels\HardwareVersionsViewVM.cs" /> <Compile Include="ViewModels\IdsPacksViewVM.cs" /> <Compile Include="ViewModels\LinearMassDensityUnitsViewVM.cs" /> + <Compile Include="ViewModels\LiquidTypesRmlsViewVM.cs" /> <Compile Include="ViewModels\LiquidTypesViewVM.cs" /> <Compile Include="ViewModels\MachinesViewVM.cs" /> <Compile Include="ViewModels\MachineVersionsViewVM.cs" /> @@ -322,12 +323,18 @@ <Compile Include="Views\DBViews\EventTypesView.xaml.cs"> <DependentUpon>EventTypesView.xaml</DependentUpon> </Compile> + <Compile Include="Views\DBViews\LiquidTypesRmlsView.xaml.cs"> + <DependentUpon>LiquidTypesRmlsView.xaml</DependentUpon> + </Compile> <Compile Include="Views\DBViews\UsersView.xaml.cs"> <DependentUpon>UsersView.xaml</DependentUpon> </Compile> <Compile Include="Views\DBViews\EventTypeView.xaml.cs"> <DependentUpon>EventTypeView.xaml</DependentUpon> </Compile> + <Compile Include="Views\DBViews\LiquidTypesRmlView.xaml.cs"> + <DependentUpon>LiquidTypesRmlView.xaml</DependentUpon> + </Compile> <Compile Include="Views\DBViews\UserView.xaml.cs"> <DependentUpon>UserView.xaml</DependentUpon> </Compile> @@ -601,6 +608,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="Views\DBViews\LiquidTypesRmlsView.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Views\DBViews\UsersView.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -609,6 +620,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="Views\DBViews\LiquidTypesRmlView.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Views\DBViews\UserView.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> 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 87ac26c4d..ce7eb637b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -54,6 +54,7 @@ namespace Tango.MachineStudio.DB SimpleIoc.Default.Register<FiberShapesViewVM>(); SimpleIoc.Default.Register<FiberSynthsViewVM>(); SimpleIoc.Default.Register<RmlsViewVM>(); + SimpleIoc.Default.Register<LiquidTypesRmlsViewVM>(); SimpleIoc.Default.Register<CctsViewVM>(); SimpleIoc.Default.Register<CatsViewVM>(); @@ -330,5 +331,13 @@ namespace Tango.MachineStudio.DB return ServiceLocator.Current.GetInstance<MidTankTypesViewVM>(); } } + + public static LiquidTypesRmlsViewVM LiquidTypesRmlViewVM + { + get + { + return ServiceLocator.Current.GetInstance<LiquidTypesRmlsViewVM>(); + } + } } }
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs index 5ffe0d58c..97adfa7d4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs @@ -12,6 +12,7 @@ namespace Tango.MachineStudio.DB.ViewModels { public DispenserTypesViewVM(INotificationProvider notification) : base(notification) { + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesRmlsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesRmlsViewVM.cs new file mode 100644 index 000000000..5b8e3749f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesRmlsViewVM.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; + +namespace Tango.MachineStudio.DB.ViewModels +{ + public class LiquidTypesRmlsViewVM : DbTableViewModel<LiquidTypesRml> + { + public LiquidTypesRmlsViewVM(INotificationProvider notification) : base(notification) + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml index b6e3336b3..55c995360 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml @@ -24,6 +24,10 @@ <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="Nanolitter Per Pulse:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.NlPerPulse,Mode=TwoWay}"></mahapps:NumericUpDown> + <TextBlock Text="Capacity:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.Capacity,Mode=TwoWay}"></mahapps:NumericUpDown> </controls:TableGrid> </Grid> </UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml index 874629128..040ac5799 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml @@ -17,6 +17,8 @@ <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn> <DataGridTextColumn Header="Code" Binding="{Binding Code}"></DataGridTextColumn> <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn> + <DataGridTextColumn Header="Nanolitter Per Pulse" Binding="{Binding NlPerPulse}"></DataGridTextColumn> + <DataGridTextColumn Header="Capacity" Binding="{Binding Capacity}"></DataGridTextColumn> </DataGrid.Columns> </DataGrid> </controls:DbTableView> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml new file mode 100644 index 000000000..a3b3f5eed --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml @@ -0,0 +1,31 @@ +<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.LiquidTypesRmlView" + 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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" + xmlns:global="clr-namespace:Tango.MachineStudio.DB" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters" + xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews" + mc:Ignorable="d" + d:DesignHeight="300" d:DesignWidth="300" DataContext="{x:Static global:ViewModelLocator.LiquidTypesRmlViewVM}"> + + <Grid> + <controls:TableGrid> + <TextBlock Text="ID:" FontWeight="Bold"></TextBlock> + <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True" IsEnabled="False"></TextBox> + <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock> + <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True" IsEnabled="False"></TextBox> + <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock> + <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True" IsEnabled="False"></TextBox> + <TextBlock Text="Liquid Type:" FontWeight="Bold"></TextBlock> + <ComboBox ItemsSource="{Binding Adapter.LiquidTypes}" SelectedItem="{Binding EditEntity.LiquidTypes,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox> + <TextBlock Text="RML:" FontWeight="Bold"></TextBlock> + <ComboBox ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding EditEntity.Rml}" DisplayMemberPath="Name"></ComboBox> + <TextBlock Text="Max nl/cm:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.MaxNlPerCm,Mode=TwoWay}"></mahapps:NumericUpDown> + </controls:TableGrid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml.cs new file mode 100644 index 000000000..baaac7633 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// <summary> + /// Interaction logic for UserView.xaml + /// </summary> + public partial class LiquidTypesRmlView : UserControl + { + public LiquidTypesRmlView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml new file mode 100644 index 000000000..f96402432 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml @@ -0,0 +1,26 @@ +<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.LiquidTypesRmlsView" + 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:controls="clr-namespace:Tango.MachineStudio.DB.Controls" + xmlns:global="clr-namespace:Tango.MachineStudio.DB" + xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews" + mc:Ignorable="d" + d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.LiquidTypesRmlViewVM}"> + + <Grid> + <controls:DbTableView> + <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.LiquidTypesRmlsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True"> + <DataGrid.Columns> + <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn> + <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn> + <DataGridTextColumn Header="Liquid Type" Binding="{Binding LiquidTypes.Name}"></DataGridTextColumn> + <DataGridTextColumn Header="RML" Binding="{Binding Rml.Name}"></DataGridTextColumn> + <DataGridTextColumn Header="Maximum Nanolitter Per Centimeter" Binding="{Binding MaxNlPerCm}"></DataGridTextColumn> + </DataGrid.Columns> + </DataGrid> + </controls:DbTableView> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml.cs new file mode 100644 index 000000000..9bda7a713 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.MachineStudio.DB.CustomAttributes; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// <summary> + /// Interaction logic for UsersView.xaml + /// </summary> + [DBView] + public partial class LiquidTypesRmlsView : UserControl + { + public LiquidTypesRmlsView() + { + InitializeComponent(); + } + } +} |
