aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2020-01-26 10:49:48 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2020-01-26 10:49:48 +0200
commitb036bae722696ce97279fa556394379688508f12 (patch)
treee45372a748a501649b8d45e3143be9001566ed95 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views
parent08a821df17dcfe04b6749ffdf326a8265285764c (diff)
parent2367c43d732aea2ea169f6fa5844fc877d96632d (diff)
downloadTango-b036bae722696ce97279fa556394379688508f12.tar.gz
Tango-b036bae722696ce97279fa556394379688508f12.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml47
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml45
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml2
4 files changed, 80 insertions, 28 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>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml
index bcca83ca5..b2b770698 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml
@@ -5,11 +5,17 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views"
xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
+ </UserControl.Resources>
+
<Grid Margin="20">
<DockPanel>
<Grid DockPanel.Dock="Top">
@@ -23,7 +29,7 @@
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 20 0">
- <Button Width="170" Height="45" VerticalAlignment="Center" Command="{Binding SaveCommand}">
+ <Button Width="170" Height="45" VerticalAlignment="Center" Command="{Binding SaveCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" />
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock>
@@ -61,10 +67,10 @@
<TabItem Header="HW CONFIGURATION">
<local:HardwareConfigurationView/>
</TabItem>
- <TabItem Header="UPDATES">
+ <TabItem Header="UPDATES" Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<local:MachineUpdatesView/>
</TabItem>
- <TabItem Header="TUP">
+ <TabItem Header="TUP" Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<local:TupView/>
</TabItem>
</TabControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
index 4631ac068..499d6dc89 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
@@ -35,28 +35,39 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition/>
</Grid.ColumnDefinitions>
- <controls:TableGrid RowHeight="50" Margin="10">
- <TextBlock FontWeight="SemiBold">Serial Number</TextBlock>
- <TextBox Text="{Binding ActiveMachine.SerialNumber}"></TextBox>
- <TextBlock FontWeight="SemiBold">Name</TextBlock>
- <TextBox Text="{Binding ActiveMachine.Name}"></TextBox>
+ <StackPanel>
+ <controls:TableGrid RowHeight="50" Margin="10">
+ <TextBlock FontWeight="SemiBold">Serial Number</TextBlock>
+ <TextBox Text="{Binding ActiveMachine.SerialNumber}"></TextBox>
- <TextBlock FontWeight="SemiBold">Machine Version</TextBlock>
- <ComboBox Background="Transparent" ItemsSource="{Binding ActiveMachineAdapter.MachineVersions}" SelectedItem="{Binding ActiveMachine.MachineVersion}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
+ <TextBlock FontWeight="SemiBold">Name</TextBlock>
+ <TextBox Text="{Binding ActiveMachine.Name}"></TextBox>
- <TextBlock FontWeight="SemiBold">Organization</TextBlock>
- <ComboBox Background="Transparent" ItemsSource="{Binding ActiveMachineAdapter.Organizations}" SelectedItem="{Binding ActiveMachine.Organization}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
+ <TextBlock FontWeight="SemiBold">Machine Version</TextBlock>
+ <ComboBox Background="Transparent" ItemsSource="{Binding ActiveMachineAdapter.MachineVersions}" SelectedItem="{Binding ActiveMachine.MachineVersion}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
- <TextBlock FontWeight="SemiBold">Site</TextBlock>
- <ComboBox Background="Transparent" ItemsSource="{Binding Sites}" SelectedItem="{Binding SelectedSite}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
+ <TextBlock FontWeight="SemiBold">Organization</TextBlock>
+ <ComboBox Background="Transparent" ItemsSource="{Binding ActiveMachineAdapter.Organizations}" SelectedItem="{Binding ActiveMachine.Organization}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
- <TextBlock FontWeight="SemiBold">OS Key</TextBlock>
- <TextBox Text="{Binding ActiveMachine.OsKey}"></TextBox>
+ <TextBlock FontWeight="SemiBold">Site</TextBlock>
+ <ComboBox Background="Transparent" ItemsSource="{Binding Sites}" SelectedItem="{Binding SelectedSite}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
+
+ <TextBlock FontWeight="SemiBold">OS Key</TextBlock>
+ <TextBox Text="{Binding ActiveMachine.OsKey}"></TextBox>
+
+ <TextBlock FontWeight="SemiBold">Device COM Port</TextBlock>
+ <TextBox Text="{Binding ActiveMachine.DeviceComPort}"></TextBox>
+ </controls:TableGrid>
+
+ <Button Margin="0 20 0 0" Background="{StaticResource RedBrush300}" ToolTip="Make this machine configuration as a prototype for the selected machine version" BorderBrush="{StaticResource RedBrush300}" Width="200" Height="45" VerticalAlignment="Bottom" Command="{Binding MakePrototypeCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Copyright" Width="24" Height="24" />
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">MAKE PROTOTYPE</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
- <TextBlock FontWeight="SemiBold">Device COM Port</TextBlock>
- <TextBox Text="{Binding ActiveMachine.DeviceComPort}"></TextBox>
- </controls:TableGrid>
<Rectangle Grid.Column="1" StrokeThickness="1" Stroke="{StaticResource borderBrush}" HorizontalAlignment="Center" Margin="50 50" />
<controls:TableGrid RowHeight="50" Margin="10" Grid.Column="2">
<TextBlock FontWeight="SemiBold">Auto Login</TextBlock>
@@ -109,7 +120,7 @@
</TextBlock>
</StackPanel>
- <Button Command="{Binding ResetDeviceRegistrationCommand}" HorizontalAlignment="Center" VerticalAlignment="Center" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Padding="10" Height="Auto">RESET DEVICE REGISTRATION</Button>
+ <Button Command="{Binding ResetDeviceRegistrationCommand}" HorizontalAlignment="Center" VerticalAlignment="Center" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Padding="10" Height="45" Width="240">RESET DEVICE REGISTRATION</Button>
</DockPanel>
</Border>
</StackPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml
index bc9b038dc..833086bf0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml
@@ -9,7 +9,7 @@
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
- <Grid>
+ <Grid IsEnabled="{Binding IsFree}">
<controls:NavigationControl x:Name="navigationControl" TransitionType="Slide">
<local:MachinesView />
<local:MachineDetailsView/>