diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-01-21 17:27:52 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-01-21 17:27:52 +0200 |
| commit | 2dce6d8d825850b942d8065877bdc2d3af9cf499 (patch) | |
| tree | 6e3a52ded2b602b635a392d9680de77be94013ee /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml | |
| parent | 27cb63f6a6d4d569aa31ed353f5dca60b9a99d0e (diff) | |
| download | Tango-2dce6d8d825850b942d8065877bdc2d3af9cf499.tar.gz Tango-2dce6d8d825850b942d8065877bdc2d3af9cf499.zip | |
Implemented new machine clone and creation.
Implemented auto dispenser generation.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml index 2d380c0d2..417dfbc0b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml @@ -6,9 +6,15 @@ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views" mc:Ignorable="d" - d:DesignHeight="400" d:DesignWidth="700" Height="400" Width="700" Background="{StaticResource WhiteBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:MachineCreationDialogVM, IsDesignTimeCreatable=False}"> + d:DesignHeight="400" d:DesignWidth="700" Height="460" Width="750" Background="{StaticResource WhiteBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:MachineCreationDialogVM, IsDesignTimeCreatable=False}"> + + <UserControl.Resources> + <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></converters:BooleanToVisibilityConverter> + </UserControl.Resources> + <Grid Margin="10"> <DockPanel> <Grid DockPanel.Dock="Top"> @@ -17,7 +23,18 @@ <Image Source="../Images/machine-full-fx.png" Width="120" RenderOptions.BitmapScalingMode="Fant"></Image> <materialDesign:PackIcon HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -10 -10" Kind="PlusCircle" Foreground="#15C315" Width="42" Height="42" /> </Grid> - <TextBlock Margin="30 0 0 0" VerticalAlignment="Bottom" FontSize="22">NEW MACHINE</TextBlock> + <TextBlock Margin="30 0 0 0" VerticalAlignment="Bottom" FontSize="22"> + <TextBlock.Style> + <Style TargetType="TextBlock"> + <Setter Property="Text" Value="CLONE MACHINE"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsNewMachine}" Value="True"> + <Setter Property="Text" Value="NEW MACHINE"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </TextBlock.Style> + </TextBlock> </StackPanel> </Grid> @@ -33,12 +50,30 @@ </Grid> <Grid> - <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="400"> - <TextBlock TextWrapping="Wrap" TextAlignment="Center"> - <Run>Please specify the machine version in order to prototype the new machine with default machine settings and configuartion.</Run> + <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20 20 0 0" Width="400"> + <TextBlock TextWrapping="Wrap" Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}"> + <Run>Please specify the machine version in order to prototype the new machine with default machine settings and configuration.</Run> </TextBlock> - <ComboBox ItemsSource="{Binding MachineVersions}" SelectedItem="{Binding SelectedMachineVersion}" DisplayMemberPath="Name" Margin="0 10 0 0" FontSize="16" materialDesign:HintAssist.Hint="NONE"></ComboBox> + <ComboBox Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}" ItemsSource="{Binding MachineVersions}" SelectedItem="{Binding SelectedMachineVersion}" DisplayMemberPath="Name" Margin="0 10 0 0" FontSize="16" materialDesign:HintAssist.Hint="NONE"></ComboBox> + + <TextBlock Margin="0 20 0 0" FontSize="10">Serial Number</TextBlock> + <TextBox Margin="0 2 0 0" Text="{Binding SerialNumber,UpdateSourceTrigger=PropertyChanged}"></TextBox> + + <TextBlock Margin="0 20 0 0" FontSize="10">Name</TextBlock> + <TextBox Margin="0 2 0 0" Text="{Binding Name,UpdateSourceTrigger=PropertyChanged}"></TextBox> + + <CheckBox Margin="0 30 0 0" IsChecked="{Binding GenerateDispensers}"> + <TextBlock> + <Run>Automatically generate 8 dispensers for this machine</Run> + <Run>(</Run><Run Foreground="{StaticResource GrayBrush}" FontSize="10" Text="{Binding SerialNumber}"></Run><Run Foreground="{StaticResource GrayBrush}" FontSize="10">-1-8</Run><Run>)</Run> + </TextBlock> + </CheckBox> + + <StackPanel Margin="20 10 0 0" Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}"> + <TextBlock FontSize="10">Dispenser max nl/cm</TextBlock> + <mahapps:NumericUpDown Minimum="0" StringFormat="0.00" Maximum="10" InterceptMouseWheel="True" Value="{Binding DispenserFactor,Mode=TwoWay}" HorizontalContentAlignment="Left" Width="95" HorizontalAlignment="Left" BorderThickness="0 0 0 1" Margin="0 2 0 0" HideUpDownButtons="True" HasDecimals="True"></mahapps:NumericUpDown> + </StackPanel> </StackPanel> </Grid> </DockPanel> |
