diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-02-27 16:03:37 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-02-27 16:03:37 +0200 |
| commit | 3f80b6889eedc225204c66a3180123a0df70bd7a (patch) | |
| tree | 04189d331b81bd0e7ce4665001f3da614570eee4 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner | |
| parent | c9ba7c0b806818cdcbcd10fb03805a61608b4233 (diff) | |
| parent | b51e6204dba42b3b664a9b9ddbc6d268e0ec3bff (diff) | |
| download | Tango-3f80b6889eedc225204c66a3180123a0df70bd7a.tar.gz Tango-3f80b6889eedc225204c66a3180123a0df70bd7a.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner')
3 files changed, 10 insertions, 7 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index e0d99d0f0..ed93b4308 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -523,7 +523,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels try { initHwConfig = false; - ActiveMachine = machineCreationDialogVM.SelectedMachineVersion.CreatePrototypeMachine(ActiveMachineAdapter.Context); + ActiveMachine = await machineCreationDialogVM.SelectedMachineVersion.CreatePrototypeMachine(ActiveMachineAdapter.Context); ActiveMachine.SerialNumber = machineCreationDialogVM.SerialNumber; ActiveMachine.Name = machineCreationDialogVM.Name; ActiveMachineAdapter.Context.Machines.Add(ActiveMachine); @@ -547,7 +547,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { var serial = machineCreationDialogVM.SerialNumber + "-" + (i + 1); - var existingDispenser = await ActiveMachineAdapter.Context.Dispensers.Include(x => x.IdsPacks).SingleAsync(x => x.SerialNumber == serial); + var existingDispenser = await ActiveMachineAdapter.Context.Dispensers.Include(x => x.IdsPacks).SingleOrDefaultAsync(x => x.SerialNumber == serial); if (existingDispenser != null) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml index 446303aa2..a231e92a3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml @@ -26,7 +26,7 @@ <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0 0 0 10"> <materialDesign:PackIcon VerticalAlignment="Center" Kind="BarcodeScan" Width="32" Height="32" /> - <TextBox Width="400" FontSize="20" Margin="10 0 0 0" materialDesign:HintAssist.Hint="Serial Number" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,Delay=1500}"></TextBox> + <TextBox Width="400" FontSize="20" Margin="10 0 0 0" materialDesign:HintAssist.Hint="Serial Number" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,Delay=500}"></TextBox> </StackPanel> </StackPanel> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml index 3663f72f8..f08da88d1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml @@ -9,8 +9,14 @@ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" mc:Ignorable="d" d:DesignHeight="720" d:DesignWidth="1280" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + + <UserControl.Resources> + <converters:EmptyStringToNullConverter x:Key="EmptyStringToNullConverter" /> + </UserControl.Resources> + <Grid Margin="20"> <DockPanel> <Grid DockPanel.Dock="Bottom"> @@ -67,10 +73,7 @@ </Style> </DataGridComboBoxColumn.EditingElementStyle> </DataGridComboBoxColumn> - <DataGridTextColumn Header="START OFFSET PULSES" Binding="{Binding StartOffsetPulses}" Width="Auto" /> - <DataGridTextColumn Header="BACKING RATE" Binding="{Binding BackingRate}" Width="Auto" /> - <DataGridTextColumn Header="SEGMENT OFFSET PULSES" Binding="{Binding SegmentOffsetPulses}" Width="Auto" /> - <DataGridTextColumn Header="BOTTOM BACKING RATE" Binding="{Binding BottomBackingRate}" Width="1*" /> + <DataGridTextColumn Header="LIMIT SWITCH START POINT OFFSET" Binding="{Binding LimitSwitchStartPointOffset,Converter={StaticResource EmptyStringToNullConverter}}" Width="1*" /> </DataGrid.Columns> </DataGrid> </Grid> |
