diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
5 files changed, 218 insertions, 183 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 8a5ec94fa..861a639d3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -7,7 +7,7 @@ xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" xmlns:brushPicker="clr-namespace:Tango.BrushPicker;assembly=Tango.BrushPicker" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" - xmlns:colorConversion="clr-namespace:Tango.BL.ColorConversion;assembly=Tango.BL" + xmlns:colorConversion="clr-namespace:Tango.ColorConversion;assembly=Tango.ColorConversion" xmlns:hive="clr-namespace:Tango.Hive;assembly=Tango.Hive" xmlns:automation="clr-namespace:Tango.MachineStudio.Common.Automation;assembly=Tango.MachineStudio.Common" xmlns:sys="clr-namespace:System;assembly=mscorlib" @@ -28,7 +28,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views" 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}"> + d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}" x:Name="control"> <UserControl.Resources> @@ -85,7 +85,7 @@ </ObjectDataProvider> - <SolidColorBrush x:Key="SideBarBackground" Color="White"> + <SolidColorBrush x:Key="SideBarBackground" Color="{Binding Path=Color, Source={StaticResource SideBarBackgroundBrush}}"> </SolidColorBrush> @@ -126,18 +126,12 @@ </Style> <Style TargetType="Border" x:Key="JobFieldBorder"> - <Setter Property="BorderBrush" Value="#A5A4A4"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource LightGrayBrush}"></Setter> <Setter Property="BorderThickness" Value="0 0 1 1"></Setter> <Setter Property="CornerRadius" Value="100 10 100 0"></Setter> <Setter Property="Padding" Value="10 5 10 5"></Setter> <Setter Property="Margin" Value="0 0 10 0"></Setter> - <Setter Property="Background"> - <Setter.Value> - <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> - <GradientStop Color="#00E6E6E6"/> - <GradientStop Color="#DEDEDE" Offset="1"/> - </LinearGradientBrush> - </Setter.Value> + <Setter Property="Background" Value="{StaticResource borderBackground}"> </Setter> </Style> @@ -167,7 +161,7 @@ </StackPanel> </ToggleButton> <Popup x:Name="Popup" MouseDown="Popup_MouseDown" PopupAnimation="Fade" StaysOpen="False" PlacementTarget="{Binding ElementName=PopupButton}" Placement="Bottom" AllowsTransparency="True"> - <Border Background="#E6FFFFFF" CornerRadius="5" Margin="10"> + <Border Background="{StaticResource WhiteBrush}" CornerRadius="5" Margin="10"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="10" /> </Border.Effect> @@ -194,7 +188,7 @@ <Setter Property="BorderThickness" Value="1"></Setter> <Setter Property="ToolTip"> <Setter.Value> - <ToolTip Background="White"> + <ToolTip Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}"> <ItemsControl ItemsSource="{Binding Coordinates.OutputLiquids}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> @@ -203,7 +197,7 @@ </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <TextBlock TextAlignment="Center" Foreground="#202020" Margin="10 0"> + <TextBlock TextAlignment="Center" Foreground="{StaticResource DarkGrayBrush200}" Margin="10 0"> <Run Text="{Binding LiquidType}"></Run> <LineBreak/> <Run Text="{Binding Volume,StringFormat=0}"></Run> @@ -249,7 +243,17 @@ <DataTemplate x:Key="Volume_Template"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <StackPanel VerticalAlignment="Center"> - <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center"> + <ItemsControl VerticalAlignment="Center"> + <ItemsControl.Style> + <Style TargetType="ItemsControl"> + <Setter Property="ItemsSource" Value="{Binding LiquidVolumes}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Settings.UsePreferredLiquidVolumeIndex}" Value="True"> + <Setter Property="ItemsSource" Value="{Binding LiquidVolumesOrdered}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </ItemsControl.Style> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> @@ -284,8 +288,8 @@ </ItemsControl> <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsLiquidVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FFAC3C" /> - <TextBlock Margin="5 0 0 0" Foreground="#FFAC3C">Liquid volumes exceeds the maximum range for color conversion!</TextBlock> + <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource OrangeBrush}" /> + <TextBlock Margin="5 0 0 0" Foreground="{StaticResource OrangeBrush}">Liquid volumes exceeds the maximum range for color conversion!</TextBlock> </StackPanel> </StackPanel> @@ -300,7 +304,7 @@ <Run>)</Run> </TextBlock> - <Border Margin="60 0 0 0" DataContext="{Binding LiquidVolumes,Converter={StaticResource LiquidVolumesToLubricantLiquidVolume}}" BorderBrush="#E6E6E6" BorderThickness="1 0 0 0"> + <Border Margin="60 0 0 0" DataContext="{Binding LiquidVolumes,Converter={StaticResource LiquidVolumesToLubricantLiquidVolume}}" BorderBrush="{StaticResource WhiteBrush100}" BorderThickness="1 0 0 0"> <Border.Style> <Style TargetType="Border"> <Setter Property="Visibility" Value="Collapsed"></Setter> @@ -315,7 +319,7 @@ <ContentControl.Foreground> <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> </ContentControl.Foreground> - <mahapps:NumericUpDown Foreground="#515151" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontSize="20" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> + <mahapps:NumericUpDown Foreground="{StaticResource GrayBrush250}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontSize="20" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> </mahapps:NumericUpDown.Resources> @@ -328,7 +332,7 @@ <DataTemplate x:Key="RGB_Template"> <StackPanel> <StackPanel Orientation="Horizontal"> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF6F6F" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource RedBrush200}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Red, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -336,7 +340,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource GreenBrush400}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Green, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -344,7 +348,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#3C7EF4" BorderThickness="1" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource DarkBlueBrush}" BorderThickness="1" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Blue, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -356,8 +360,8 @@ </StackPanel> <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FF6D6D" /> - <TextBlock Margin="5 0 0 0" Foreground="#FF6D6D">Color is out of gamut!</TextBlock> + <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush200}" /> + <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush200}">Color is out of gamut!</TextBlock> </StackPanel> </StackPanel> </DataTemplate> @@ -372,7 +376,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF8A8A" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource RedBrush400}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding A, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -380,7 +384,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource GreenBrush400}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding B, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -418,7 +422,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="Black" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource BlackForegroundBrush}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Black,Converter={StaticResource OneToPercentConverter}, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -446,7 +450,7 @@ <ColumnDefinition Width="1*" /> </Grid.ColumnDefinitions> - <Grid Background="#96FFFFFF"> + <Grid Background="{StaticResource TransparentBackgroundBrush}"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Width" Value="304"></Setter> @@ -478,19 +482,19 @@ <DockPanel> <Border DockPanel.Dock="Bottom" Margin="10"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> - <Button Command="{Binding DuplicateSegmentCommand}" Margin="0 0 4 0" Background="#FF9A6A" BorderBrush="#FF9A6A" Height="42" Padding="10" ToolTip="Duplicate Segment"> + <Button Command="{Binding DuplicateSegmentCommand}" Margin="0 0 4 0" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}" Height="42" Padding="10" ToolTip="Duplicate Segment"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">Duplicate</TextBlock> </StackPanel> </Button> - <Button Command="{Binding RemoveSegmentCommand}" Margin="0 0 4 0" Background="#FF6A6A" BorderBrush="#FF6A6A" Height="42" Padding="10" ToolTip="Remove Segment"> + <Button Command="{Binding RemoveSegmentCommand}" Margin="0 0 4 0" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Height="42" Padding="10" ToolTip="Remove Segment"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Delete" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">Remove</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddSegmentButton}" Command="{Binding AddSegmentCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10" ToolTip="Add Segment"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddSegmentButton}" Command="{Binding AddSegmentCommand}" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Height="42" Padding="10" ToolTip="Add Segment"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">New</TextBlock> @@ -514,25 +518,14 @@ </Polygon.Effect> <Polygon.Style> <Style TargetType="Polygon"> - <Setter Property="Stroke" Value="Black"></Setter> - <Setter Property="Fill"> - <Setter.Value> - <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Color="#00EEEEEE" Offset="0" /> - <GradientStop Color="#FFB5B5B5" Offset="1" /> - </LinearGradientBrush> - </Setter.Value> + <Setter Property="Stroke" Value="{StaticResource BlackForegroundBrush}"></Setter> + <Setter Property="Fill" Value="{StaticResource SegmentGradientBrush}"> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> - <Setter Property="Stroke" Value="Black"></Setter> - <Setter Property="Fill"> - <Setter.Value> - <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Color="White" Offset="0" /> - <GradientStop Color="{StaticResource AccentColor}" Offset="2" /> - </LinearGradientBrush> - </Setter.Value> + <Setter Property="Stroke" Value="{StaticResource BlackForegroundBrush}"></Setter> + <Setter Property="Fill" Value="{StaticResource SelectedSegmentGradientBrush}"> + </Setter> </DataTrigger> </Style.Triggers> @@ -554,12 +547,12 @@ </Grid.ColumnDefinitions> <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> - <TextBlock FontWeight="SemiBold">#</TextBlock> - <TextBlock FontWeight="SemiBold" Margin="5 0 0 0" Text="{Binding SegmentIndex}"></TextBlock> + <TextBlock FontWeight="SemiBold" Foreground="{StaticResource DarkGrayBrush}">#</TextBlock> + <TextBlock FontWeight="SemiBold" Margin="5 0 0 0" Text="{Binding SegmentIndex}" Foreground="{StaticResource DarkGrayBrush}"></TextBlock> </StackPanel> - <TextBox Grid.Column="1" CaretBrush="Transparent" Cursor="Arrow" VerticalAlignment="Center" Width="200" HorizontalContentAlignment="Center" Style="{x:Null}" BorderThickness="0" Background="Transparent" Text="{Binding Name}"></TextBox> + <TextBox Grid.Column="1" CaretBrush="Transparent" Cursor="Arrow" VerticalAlignment="Center" Width="200" HorizontalContentAlignment="Center" Style="{x:Null}" BorderThickness="0" Background="Transparent" Text="{Binding Name}" Foreground="{StaticResource DarkGrayBrush}"></TextBox> </Grid> </Grid> @@ -571,16 +564,16 @@ <Rectangle HorizontalAlignment="Right" StrokeThickness="1" Width="3" Margin="0 0 0 0"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Offset="0" Color="#ECECEC" /> - <GradientStop Offset="0.5" Color="Black" /> - <GradientStop Offset="1.1" Color="Black" /> + <GradientStop Offset="0" Color="{Binding Source={StaticResource WhiteBrush100}, Path=Color}" /> + <GradientStop Offset="0.5" Color="{Binding Source={StaticResource BlackForegroundBrush}, Path=Color}" /> + <GradientStop Offset="1.1" Color="{Binding Source={StaticResource BlackForegroundBrush}, Path=Color}" /> </LinearGradientBrush> </Rectangle.Fill> <Rectangle.Stroke> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Offset="0" Color="White" /> - <GradientStop Offset="0.5" Color="White" /> - <GradientStop Offset="1" Color="White" /> + <GradientStop Offset="0" Color="{Binding Source={StaticResource BorderBrushGainsboro}, Path=Color}" /> + <GradientStop Offset="0.5" Color="{Binding Source={StaticResource BorderBrushGainsboro}, Path=Color}" /> + <GradientStop Offset="1" Color="{Binding Source={StaticResource BorderBrushGainsboro}, Path=Color}" /> </LinearGradientBrush> </Rectangle.Stroke> </Rectangle> @@ -591,7 +584,12 @@ <RowDefinition Height="Auto" /> <RowDefinition/> </Grid.RowDefinitions> - + <Grid.Resources> + <Style TargetType="TextBlock"> + <Setter Property="Foreground" + Value="{StaticResource JobFieldForeground}" /> + </Style> + </Grid.Resources> <Grid> <StackPanel> <Grid> @@ -613,7 +611,7 @@ <Image Source="../Images/name.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Name</TextBlock> </StackPanel> - <TextBox Margin="0 3 0 0" Width="100" HorizontalAlignment="Left" Text="{Binding ActiveJob.Name,UpdateSourceTrigger=PropertyChanged}"></TextBox> + <TextBox Margin="0 3 0 0" Width="100" HorizontalAlignment="Left" Text="{Binding ActiveJob.Name,UpdateSourceTrigger=PropertyChanged}" Foreground="{StaticResource JobFieldForeground}"></TextBox> </StackPanel> </Border> @@ -623,7 +621,7 @@ <Image Source="../Images/wind.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Winding Method</TextBlock> </StackPanel> - <ComboBox Width="90" HorizontalAlignment="Left" ItemsSource="{Binding WindingMethods}" SelectedItem="{Binding ActiveJob.WindingMethod}" DisplayMemberPath="Name" ></ComboBox> + <ComboBox Width="90" HorizontalAlignment="Left" ItemsSource="{Binding WindingMethods}" SelectedItem="{Binding ActiveJob.WindingMethod}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> </StackPanel> </Border> @@ -633,20 +631,20 @@ <Image Source="../Images/thread.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Spool</TextBlock> </StackPanel> - <ComboBox Width="90" HorizontalAlignment="Left" ItemsSource="{Binding SpoolTypes}" SelectedItem="{Binding ActiveJob.SpoolType}" > + <ComboBox Width="90" HorizontalAlignment="Left" ItemsSource="{Binding SpoolTypes}" SelectedItem="{Binding ActiveJob.SpoolType}" Style="{StaticResource TransparentComboBoxStyle}" > <ComboBox.ToolTip> <TextBlock> <Run Text="{Binding ActiveJob.SpoolType.Name}"></Run> - <Run FontSize="9" Foreground="#D9D9D9" Text="{Binding ActiveJob.SpoolType.Length,Mode=OneWay}"></Run> - <Run FontSize="9" Foreground="#DEDEDE" Text="m"></Run> + <Run FontSize="9" Foreground="{StaticResource LightGrayBrush200}" Text="{Binding ActiveJob.SpoolType.Length,Mode=OneWay}"></Run> + <Run FontSize="9" Foreground="{StaticResource LightGrayBrush200}" Text="m"></Run> </TextBlock> </ComboBox.ToolTip> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock TextTrimming="CharacterEllipsis"> <Run Text="{Binding Name}"></Run> - <Run FontSize="9" Foreground="Gray" Text="{Binding Length,Mode=OneWay}"></Run> - <Run FontSize="9" Foreground="Gray" Text="m"></Run> + <Run FontSize="9" Foreground="{StaticResource GrayBrush}" Text="{Binding Length,Mode=OneWay}"></Run> + <Run FontSize="9" Foreground="{StaticResource GrayBrush}" Text="m"></Run> </TextBlock> </DataTemplate> </ComboBox.ItemTemplate> @@ -662,7 +660,7 @@ </StackPanel> <DockPanel LastChildFill="True"> <ToggleButton Margin="10 0 25 0" DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" IsChecked="{Binding ActiveJob.EnableInterSegment}"></ToggleButton> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" StringFormat="{}{0:N1} m" FontFamily="{StaticResource digital-7}" IsEnabled="{Binding ActiveJob.EnableInterSegment}" Margin="0 2 0 0" HideUpDownButtons="True" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.InterSegmentLength,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" StringFormat="{}{0:N1} m" FontFamily="{StaticResource digital-7}" IsEnabled="{Binding ActiveJob.EnableInterSegment}" Margin="0 2 0 0" HideUpDownButtons="True" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.InterSegmentLength,Mode=TwoWay}"></mahapps:NumericUpDown> </DockPanel> </StackPanel> </Border> @@ -685,7 +683,7 @@ <Image Source="../Images/repeat.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Units</TextBlock> </StackPanel> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" Margin="0 5 0 0" HideUpDownButtons="True" Minimum="1" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.NumberOfUnits,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" Margin="0 5 0 0" HideUpDownButtons="True" Minimum="1" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.NumberOfUnits,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> @@ -696,7 +694,7 @@ <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Description</TextBlock> </StackPanel> - <Border BorderThickness="0" BorderBrush="Silver" CornerRadius="5" Margin="0 0 5 5"> + <Border BorderThickness="0" BorderBrush="{StaticResource borderBrush}" CornerRadius="5" Margin="0 0 5 5"> <TextBox Padding="5 0 0 0" FontStyle="Italic" Background="Transparent" Style="{x:Null}" BorderThickness="0" Margin="5" Height="40" Text="{Binding ActiveJob.Description}" VerticalAlignment="Stretch" materialDesign:HintAssist.Hint="Enter description" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"></TextBox> </Border> </StackPanel> @@ -708,13 +706,13 @@ <Grid HorizontalAlignment="Right" Margin="0 0 10 0"> <StackPanel Orientation="Horizontal"> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.ToJobsButton}" Height="70" Width="100" Margin="0 0 10 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding DiscardJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.ToJobsButton}" Height="70" Width="100" Margin="0 0 10 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding DiscardJobCommand}"> <StackPanel> <materialDesign:PackIcon HorizontalAlignment="Center" Width="24" Height="24" Kind="KeyboardBackspace" /> <TextBlock VerticalAlignment="Center" Margin="0 10 0 0">TO JOBS</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.SaveJobButton}" Height="70" Width="100" Margin="0 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding SaveJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.SaveJobButton}" Height="70" Width="100" Margin="0 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding SaveJobCommand}"> <StackPanel> <materialDesign:PackIcon HorizontalAlignment="Center" Width="24" Height="24" Kind="ContentSave" /> <TextBlock VerticalAlignment="Center" Margin="0 10 0 0">SAVE JOB</TextBlock> @@ -743,7 +741,7 @@ <Image Source="../Images/ruler.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Segment Length</TextBlock> </StackPanel> - <mahapps:NumericUpDown x:Name="numSegmentLength" FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> + <mahapps:NumericUpDown x:Name="numSegmentLength" FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> <mahapps:NumericUpDown.Resources> <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> </mahapps:NumericUpDown.Resources> @@ -755,7 +753,7 @@ <StackPanel> <TextBlock>MEDIA</TextBlock> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> - <ComboBox Width="250" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}"> + <ComboBox Width="250" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}" Style="{StaticResource TransparentComboBoxStyle}"> <ComboBox.ItemTemplate> <DataTemplate> <StackPanel> @@ -785,16 +783,16 @@ </StackPanel> - <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Margin="0 40 40 0"> + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 40 180 0"> <materialDesign:PackIcon Kind="ChevronLeft" Width="24" Height="24" /> - <TextBlock Margin="10 -2 10 0" VerticalAlignment="Center"><Run>SUPPORTED MEDIA LIQUID</Run> <Run FontSize="10" Foreground="DimGray">( Max Nanolitter/CM )</Run></TextBlock> + <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>SUPPORTED MEDIA LIQUID</Run> <Run FontSize="10" Foreground="{StaticResource DimGrayBrush}">( Max Nanolitter/CM )</Run></TextBlock> <materialDesign:PackIcon Kind="ChevronRight" Width="24" Height="24" /> </StackPanel> - <Grid HorizontalAlignment="Right" Margin="0 0 0 0" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> + <Grid HorizontalAlignment="Right" Margin="0 0 0 0"> <StackPanel HorizontalAlignment="Right" Margin="0 0 0 0"> <StackPanel Margin="0 10 0 0" Orientation="Horizontal" VerticalAlignment="Center"> - <ItemsControl ItemsSource="{Binding LiquidTypesRmls}"> + <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"></WrapPanel> @@ -803,7 +801,7 @@ <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type observables:LiquidTypesRml}"> <StackPanel Margin="0 0 10 0"> - <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="DimGray" Text="{Binding LiquidType.Name}"></TextBlock> + <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="{StaticResource DimGrayBrush}" Text="{Binding LiquidType.Name}"></TextBlock> <Grid Width="58" Height="48" Margin="0 5 0 0"> <shapes:Hexagon StrokeThickness="1" Stroke="Gray"> <shapes:Hexagon.Fill> @@ -814,19 +812,27 @@ </shapes:Hexagon.Fill> </shapes:Hexagon> - <TextBox Style="{x:Null}" Background="Transparent" Foreground="Black" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox> + <TextBox Style="{x:Null}" Background="Transparent" Foreground="{StaticResource Hexagon.ForegroundBrush}" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox> </Grid> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> - <Button Command="{Binding SaveLiquidFactorsCommand}" HorizontalAlignment="Right" Margin="0 20 0 0" Style="{StaticResource MaterialDesignFlatButton}"> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="Harddisk"></materialDesign:PackIcon> - <TextBlock Margin="10 0 0 0">SAVE FACTORS</TextBlock> + <StackPanel Margin="0 20 0 0"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 0 0 5" ToolTip="Sort the liquid volumes by their liquid type preferred index"> + <Viewbox Width="25"> + <ToggleButton IsChecked="{Binding Settings.UsePreferredLiquidVolumeIndex}" /> + </Viewbox> + <TextBlock Margin="5 0 0 0" FontSize="10">Use Preferred Index</TextBlock> </StackPanel> - </Button> + <Button Command="{Binding SaveLiquidFactorsCommand}" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="Harddisk"></materialDesign:PackIcon> + <TextBlock Margin="10 0 0 0" Foreground="{StaticResource CheckmarkFill}">SAVE FACTORS</TextBlock> + </StackPanel> + </Button> + </StackPanel> </StackPanel> </StackPanel> </Grid> @@ -835,22 +841,22 @@ <Border DockPanel.Dock="Bottom" Margin="10"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> - <Button Command="{Binding DuplicateBrushStopCommand}" Margin="0 0 4 0" Background="#FF9A6A" BorderBrush="#FF9A6A" Height="42" Padding="10"> + <Button Command="{Binding DuplicateBrushStopCommand}" Margin="0 0 4 0" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="24" Height="24"></materialDesign:PackIcon> - <TextBlock VerticalAlignment="Center">Duplicate</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource AccentSelectedColorBrush}">Duplicate</TextBlock> </StackPanel> </Button> - <Button Command="{Binding RemoveBrushStopCommand}" Margin="0 0 4 0" Background="#FF6A6A" BorderBrush="#FF6A6A" Height="42" Padding="10"> + <Button Command="{Binding RemoveBrushStopCommand}" Margin="0 0 4 0" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Delete" Width="24" Height="24"></materialDesign:PackIcon> - <TextBlock VerticalAlignment="Center">Remove</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource AccentSelectedColorBrush}">Remove</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddBrushStopButton}" Command="{Binding AddBrushStopCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddBrushStopButton}" Command="{Binding AddBrushStopCommand}" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="24" Height="24"></materialDesign:PackIcon> - <TextBlock VerticalAlignment="Center">New</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource AccentSelectedColorBrush}">New</TextBlock> </StackPanel> </Button> </StackPanel> @@ -861,15 +867,15 @@ <Grid DockPanel.Dock="Top"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <Image Source="../Images/color-palette.png" Width="42"></Image> - <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="DimGray" FontSize="16" FontWeight="SemiBold">SEGMENT BRUSH</TextBlock> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="{StaticResource DimGrayBrush}" FontSize="16" FontWeight="SemiBold">SEGMENT BRUSH</TextBlock> </StackPanel> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 0 0 0"> - <TextBlock VerticalAlignment="Center" Foreground="DimGray">Generate Gradient</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource DimGrayBrush}">Generate Gradient</TextBlock> <ToggleButton Margin="10 0 0 0" IsChecked="{Binding Settings.EnableGradientGeneration,Mode=TwoWay}" /> - <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="DimGray">Resolution:</TextBlock> - <mahapps:NumericUpDown HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontSize="14" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N0} cm" Margin="5 1 0 0" Minimum="10" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding Settings.GradientResolutionCM,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="{StaticResource DimGrayBrush}">Resolution:</TextBlock> + <mahapps:NumericUpDown HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontSize="14" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N0} cm" Margin="5 1 0 0" Minimum="10" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding Settings.GradientResolutionCM,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> <mahapps:NumericUpDown.Resources> <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> </mahapps:NumericUpDown.Resources> @@ -883,10 +889,30 @@ </DockPanel> </Grid> <Grid Margin="0 10 10 0"> - <controls:MultiSelectListBox AutomationProperties.AutomationId="{x:Static automation:Developer.BrushStopsListBox}" SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> + <controls:MultiSelectListBox x:Name="listStops" AutomationProperties.AutomationId="{x:Static automation:Developer.BrushStopsListBox}" SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> + <ListBox.Template> + <ControlTemplate TargetType="{x:Type ListBox}"> + <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" Padding="1"> + <Grid> + <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false"> + <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> + </ScrollViewer> + </Grid> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Background" TargetName="Bd" Value="Transparent" /> + </Trigger> + <Trigger Property="IsGrouping" Value="true"> + <Setter Property="ScrollViewer.CanContentScroll" Value="false" /> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </ListBox.Template> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem" BasedOn="{StaticResource basicListBoxItem}"> - + <EventSetter Event="PreviewMouseDown" Handler="OnBrushStopMouseDown"></EventSetter> </Style> </ListBox.ItemContainerStyle> <ItemsControl.ItemTemplate> @@ -896,8 +922,8 @@ <Border BorderThickness="1" CornerRadius="5" Padding="10" dragAndDrop:DragAndDropService.Drop="OnBrushStopBorderDrop"> <Border.Style> <Style TargetType="Border" BasedOn="{StaticResource brushStopBorder}"> - <Setter Property="BorderBrush" Value="#B5B5B5"></Setter> - <Setter Property="Background" Value="#70FFFFFF"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource LightGrayBrush100}"></Setter> + <Setter Property="Background" Value="{StaticResource TransparentBackgroundBrush600}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> <Setter Property="BorderBrush" Value="Gainsboro"></Setter> @@ -944,7 +970,7 @@ <ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> </Style> </ComboBox.ItemContainerStyle> </ComboBox> @@ -964,9 +990,9 @@ </Style> </StackPanel.Style> <TextBlock Width="180" TextAlignment="Center" HorizontalAlignment="Center" FontSize="16"> - <Run FontWeight="Bold" FontStyle="Italic" Text="OFFSET:" Foreground="#5E5E5E"></Run> - <Run FontFamily="{StaticResource digital-7}" Text="{Binding OffsetPercent,StringFormat={}{0:F1}%}"></Run> - <Run FontSize="12" Foreground="Gray" Text="{Binding OffsetMeters,Mode=OneWay,StringFormat={} ( {0:F1}m )}"></Run> + <Run FontWeight="Bold" FontStyle="Italic" Text="OFFSET:" Foreground="{StaticResource GrayBrush250}"></Run> + <Run FontFamily="{StaticResource digital-7}" Text="{Binding OffsetPercent,StringFormat={}{0:F1}%}" Foreground="{StaticResource BlackForegroundBrush}"></Run> + <Run FontSize="12" Foreground="{StaticResource GrayBrush250}" Text="{Binding OffsetMeters,Mode=OneWay,StringFormat={} ( {0:F1}m )}"></Run> </TextBlock> <Slider ValueChanged="Offset_Slider_ValueChanged" Style="{StaticResource GradientOffsetSlider}" SmallChange="0.1" IsSnapToTickEnabled="True" TickFrequency="0.1" Margin="0 20 0 0" HorizontalAlignment="Center" Width="300" Value="{Binding OffsetPercent}" IsEnabled="{Binding IsMiddle}" Minimum="0" Maximum="100"> <Slider.Foreground> @@ -1030,7 +1056,17 @@ <DataTrigger Binding="{Binding ElementName=toggleExpand,Path=IsChecked}" Value="True"> <Setter Property="Content"> <Setter.Value> - <DataGrid ItemsSource="{Binding LiquidVolumes}" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" Background="Transparent" SelectionUnit="FullRow"> + <DataGrid AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" Background="Transparent" SelectionUnit="FullRow"> + <DataGrid.Style> + <Style TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}"> + <Setter Property="ItemsSource" Value="{Binding LiquidVolumes}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Reference control},Path=DataContext.Settings.UsePreferredLiquidVolumeIndex}" Value="True"> + <Setter Property="ItemsSource" Value="{Binding LiquidVolumesOrdered}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </DataGrid.Style> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="BorderThickness" Value="0"/> @@ -1042,7 +1078,7 @@ <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Grid x:Name="t0"> - <Polygon x:Name="t1" Points="0,0 15,0 0,15 0,0" Margin="-15 -11 0 0"> + <Polygon x:Name="t1" Points="0,0 15,0 0,15 0,0" Margin="-15 -9 0 0"> <Polygon.Fill> <SolidColorBrush x:Name="t2" Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter},FallbackValue={StaticResource dummyColor}}" /> </Polygon.Fill> @@ -1064,7 +1100,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerStep,Mode=OneWay,StringFormat='0.00'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1075,7 +1111,7 @@ <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}" BorderThickness="0"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> </Style> </ComboBox.ItemContainerStyle> <ComboBox.ItemTemplate> @@ -1092,7 +1128,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding LiquidMaxNanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1102,7 +1138,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding Volume}"></Run> - <Run Text="%" Foreground="Gray"></Run> + <Run Text="%" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1121,7 +1157,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1131,7 +1167,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1146,7 +1182,7 @@ <Setter.Value> <TextBlock> <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(pulse)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </Setter.Value> </Setter> @@ -1159,7 +1195,7 @@ <Setter.Value> <TextBlock> <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(pulse)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </Setter.Value> </Setter> @@ -1214,8 +1250,8 @@ <DockPanel> <Grid DockPanel.Dock="Left" VerticalAlignment="Center" Margin="20 15 0 0"> <TextBlock FontSize="16" Margin="0 0 0 0"> - <Run FontWeight="Bold">ESTIMATED DURATION:</Run> - <Run Foreground="Black" FontSize="22" FontStyle="Italic" FontFamily="{StaticResource digital-7}" Text="{Binding EstimatedDuration,StringFormat=hh\\:mm\\:ss,TargetNullValue='00:00:00'}"></Run> + <Run FontWeight="Bold" Foreground="{StaticResource BlackForegroundBrush}">ESTIMATED DURATION:</Run> + <Run Foreground="{StaticResource BlackForegroundBrush}" FontSize="22" FontStyle="Italic" FontFamily="{StaticResource digital-7}" Text="{Binding EstimatedDuration,StringFormat=hh\\:mm\\:ss,TargetNullValue='00:00:00'}"></Run> </TextBlock> </Grid> @@ -1224,17 +1260,17 @@ <Button Height="60" Width="280" Command="{Binding StartJobCommand}" Click="OnJobStartClick"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="32" Height="32" Kind="ClockFast" /> - <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18">START JOB</TextBlock> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18" Foreground="{StaticResource WhiteTextBrush}">START JOB</TextBlock> </StackPanel> </Button> <Button Height="60" Width="60" Margin="-60 0 0 0" Padding="0" Command="{Binding StartJobAndRecordCommand}" Click="OnJobStartClick" ToolTip="Start Job and Record"> - <materialDesign:PackIcon VerticalAlignment="Center" Width="38" Height="38" Kind="Record" Foreground="#FF6D6D" /> + <materialDesign:PackIcon VerticalAlignment="Center" Width="38" Height="38" Kind="Record" Foreground="{StaticResource RedBrush200}" /> </Button> </StackPanel> <Button Command="{Binding ToRunningJobCommand}" Width="280" Height="60" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="32" Height="32" Kind="AlertCircle" /> - <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18">VIEW RUNNING JOB</TextBlock> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18" Foreground="{StaticResource WhiteTextBrush}">VIEW RUNNING JOB</TextBlock> </StackPanel> </Button> </Grid> @@ -1270,11 +1306,11 @@ </Rectangle> <StackPanel Margin="0 0 0 0" HorizontalAlignment="Center"> - <TextBlock FontSize="12" HorizontalAlignment="Right" Foreground="Black"> + <TextBlock FontSize="12" HorizontalAlignment="Right" Foreground="{StaticResource BlackForegroundBrush}"> <Run Text="{Binding Length,Mode=OneWay,StringFormat=N2}"></Run> - <Run Foreground="Gray" FontSize="10" Text="m"></Run> + <Run Foreground="{StaticResource GrayBrush250}" FontSize="10" Text="m"></Run> </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="8" Height="8" Foreground="DimGray"> + <materialDesign:PackIcon HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="8" Height="8" Foreground="{StaticResource DimGrayBrush}"> <materialDesign:PackIcon.RenderTransform> <RotateTransform Angle="180" /> </materialDesign:PackIcon.RenderTransform> @@ -1286,28 +1322,28 @@ </ItemsControl> <StackPanel Margin="-30 -5 0 0" HorizontalAlignment="Left"> - <TextBlock FontSize="12" Foreground="Black"> + <TextBlock FontSize="12" Foreground="{StaticResource BlackForegroundBrush}"> <Run Text="0"></Run> - <Run Foreground="Gray" FontSize="10" Text="m"></Run> + <Run Foreground="{StaticResource GrayBrush250}" FontSize="10" Text="m"></Run> </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="16" Height="16" Foreground="DimGray"> + <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="16" Height="16" Foreground="{StaticResource DimGrayBrush}"> </materialDesign:PackIcon> </StackPanel> <StackPanel Margin="0 -5 -20 0" HorizontalAlignment="Right"> - <TextBlock FontSize="12" Foreground="Black"> + <TextBlock FontSize="12" Foreground="{StaticResource BlackForegroundBrush}"> <Run Text="{Binding ActiveJob.Length,Mode=OneWay,StringFormat=N2}"></Run> <Run Foreground="Gray" FontSize="10" Text="m"></Run> <Run>x</Run> <Run Text="{Binding ActiveJob.NumberOfUnits}"></Run> </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="16" Height="16" Foreground="DimGray"> + <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="16" Height="16" Foreground="{StaticResource DimGrayBrush}"> </materialDesign:PackIcon> </StackPanel> - <Border BorderBrush="Gainsboro" BorderThickness="1" VerticalAlignment="Bottom" Height="20" Margin="40 0 50 0"> + <Border BorderBrush="{StaticResource BorderBrushGainsboro}" BorderThickness="1" VerticalAlignment="Bottom" Height="20" Margin="40 0 50 0"> </Border> </Grid> @@ -1321,7 +1357,7 @@ </Grid> <Grid> - <Grid Background="#B9FFFFFF"> + <Grid Background="{StaticResource TransparentBackgroundBrush100}"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Width" Value="520"></Setter> @@ -1362,7 +1398,7 @@ <ComboBox Margin="0 10 0 0" ItemsSource="{Binding GroupsHistory}" SelectedItem="{Binding SelectedGroupHistory}"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#E6FFFFFF"></Setter> + <Setter Property="Background" Value="{StaticResource TransparentBackgroundBrush200}"></Setter> <Setter Property="Padding" Value="5"></Setter> </Style> </ComboBox.ItemContainerStyle> @@ -1374,14 +1410,14 @@ <Style TargetType="TextBlock"> <Style.Triggers> <DataTrigger Binding="{Binding Active}" Value="True"> - <Setter Property="Foreground" Value="#FF5F5F"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> <Setter Property="FontStyle" Value="Italic"></Setter> </DataTrigger> </Style.Triggers> </Style> </TextBlock.Style> </TextBlock> - <TextBlock Text="{Binding SaveDate}" Margin="10 0 0 0" FontStyle="Italic" Foreground="Gray" VerticalAlignment="Center"></TextBlock> + <TextBlock Text="{Binding SaveDate}" Margin="10 0 0 0" FontStyle="Italic" Foreground="{StaticResource GrayBrush250}" VerticalAlignment="Center"></TextBlock> </StackPanel> </DataTemplate> </ComboBox.ItemTemplate> @@ -1405,13 +1441,13 @@ <Border Padding="5" CornerRadius="5" BorderThickness="1" Margin="5"> <Border.Style> <Style TargetType="Border"> - <Setter Property="BorderBrush" Value="Silver"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource borderBrush}"></Setter> <Setter Property="Opacity" Value="0.5"></Setter> <Setter Property="Background" Value="Transparent"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> <Setter Property="BorderBrush" Value="{StaticResource AccentColorBrush}"></Setter> - <Setter Property="Background" Value="#D4FFFFFF"></Setter> + <Setter Property="Background" Value="{StaticResource TransparentBackgroundBrush300}"></Setter> <Setter Property="Opacity" Value="1"></Setter> </DataTrigger> </Style.Triggers> @@ -1420,12 +1456,12 @@ <Grid> <StackPanel> <DockPanel> - <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox> + <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}" Foreground="{StaticResource MainWindow.Foreground}"></TextBox> <WrapPanel Orientation="Vertical" Margin="0 5 0 0"> <WrapPanel.Resources> <Style TargetType="TextBlock"> <Setter Property="FontSize" Value="10"></Setter> - <Setter Property="Foreground" Value="#7A7A7A"></Setter> + <Setter Property="Foreground" Value="{StaticResource GrayBrush50}"></Setter> <Setter Property="Margin" Value="0 5 0 5"></Setter> <Setter Property="MinWidth" Value="80"></Setter> </Style> @@ -1443,7 +1479,7 @@ <Border> <Border.Style> <Style TargetType="Border"> - <Setter Property="BorderBrush" Value="Gainsboro"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource BorderBrushGainsboro}"></Setter> <Setter Property="BorderThickness" Value="1"></Setter> <Setter Property="Padding" Value="2"></Setter> <Setter Property="Margin" Value="4"></Setter> @@ -1473,8 +1509,8 @@ <Grid Background="Transparent" Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessParameterDropped" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=editors:ParameterizedEditor},Path=DraggingSurface}"> <ContentControl> <StackPanel> - <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock> - <mahapps:NumericUpDown FontSize="20" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Center" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown> + <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11" Foreground="{StaticResource MainWindow.Foreground}"></TextBlock> + <mahapps:NumericUpDown FontSize="20" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Center" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}" Foreground="{StaticResource MainWindow.Foreground}"></mahapps:NumericUpDown> </StackPanel> </ContentControl> </Grid> @@ -1486,7 +1522,7 @@ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="5" Visibility="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,Converter={StaticResource BooleanToVisibilityConverter}}"> <TextBlock Text="Active" FontWeight="Bold" FontStyle="Italic" FontSize="13" VerticalAlignment="Center"></TextBlock> - <materialDesign:PackIcon Foreground="#90E990" Kind="CheckboxBlankCircle" VerticalAlignment="Center" Margin="5 0 0 0"> + <materialDesign:PackIcon Foreground="{StaticResource GreenBrush400}" Kind="CheckboxBlankCircle" VerticalAlignment="Center" Margin="5 0 0 0"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Opacity" Value="0"></Setter> @@ -1525,7 +1561,7 @@ </ListBox> <StackPanel Margin="10 20" VerticalAlignment="Bottom" Orientation="Horizontal" HorizontalAlignment="Right"> - <Button Height="40" Width="105" Command="{Binding ResetProcessParametersCommand}" Background="Transparent" BorderBrush="#202020" Foreground="#202020" Margin="0 2 10 0" ToolTip="Resets the current process parameters in the embedded device"> + <Button Height="40" Width="105" Command="{Binding ResetProcessParametersCommand}" Background="Transparent" BorderBrush="{StaticResource DarkGrayBrush200}" Foreground="{StaticResource DarkGrayBrush200}" Margin="0 2 10 0" ToolTip="Resets the current process parameters in the embedded device"> <TextBlock TextWrapping="Wrap" TextAlignment="Center"> TEMP OFF </TextBlock> @@ -1561,7 +1597,7 @@ </Style.Triggers> </Style> </Grid.Style> - <TextBlock Foreground="#FA9292" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24">SELECT MACHINE & MEDIA</TextBlock> + <TextBlock Foreground="{StaticResource RedBrush400}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24">SELECT MACHINE & MEDIA</TextBlock> </Grid> </Grid> </Expander> @@ -1571,14 +1607,14 @@ </StackPanel> </ScrollViewer> - <Rectangle HorizontalAlignment="Right" Stroke="#383838" VerticalAlignment="Top" Height="427"></Rectangle> - <Rectangle HorizontalAlignment="Right" Stroke="#383838" VerticalAlignment="Bottom" Height="428"></Rectangle> + <Rectangle HorizontalAlignment="Right" Stroke="{StaticResource GrayBrush280}" VerticalAlignment="Top" Height="427"></Rectangle> + <Rectangle HorizontalAlignment="Right" Stroke="{StaticResource GrayBrush280}" VerticalAlignment="Bottom" Height="428"></Rectangle> </Grid> <Button Background="Transparent" Command="{Binding ToggleSideBarCommand}" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Right" VerticalAlignment="Center" Height="200" Width="50" Margin="0 0 -50 0"> - <Border Background="#F1F1F1" CornerRadius="0 10 10 0" BorderThickness="0 1 1 1" BorderBrush="#383838"> + <Border Background="{StaticResource WhiteBrush100}" CornerRadius="0 10 10 0" BorderThickness="0 1 1 1" BorderBrush="{StaticResource GrayBrush280}"> <Grid> - <TextBlock Foreground="#FF7272" Text="PROCESS PARAMETERS" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center"> + <TextBlock Foreground="{StaticResource RedBrush300}" Text="PROCESS PARAMETERS" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center"> <TextBlock.LayoutTransform> <RotateTransform Angle="270"></RotateTransform> </TextBlock.LayoutTransform> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index f3af53352..18dc795bd 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -312,5 +312,10 @@ namespace Tango.MachineStudio.Developer.Views _vm.OnBrushStopFieldValueChanged(stop); } } + + private void OnBrushStopMouseDown(object sender, MouseButtonEventArgs e) + { + listStops.SelectedItem = (sender as ListBoxItem).DataContext; + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml index ab97d7858..70d5b6180 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml @@ -35,12 +35,12 @@ <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> - <Grid Background="#B1FFFFFF"> + <Grid Background="{StaticResource TransparentBackgroundBrush400}"> <StackPanel> <TextBlock Margin="40 20" FontSize="30" FontWeight="SemiBold" FontStyle="Italic">TARGET MACHINE</TextBlock> <DockPanel Margin="40 0 40 0" IsEnabled="{Binding CanWork}"> - <Button Command="{Binding ReloadMachinesCommand}" DockPanel.Dock="Right" ToolTip="Reload" Foreground="#404040" Margin="20 0 0 0" Padding="0" Width="40" Height="Auto" Style="{StaticResource MaterialDesignFlatButton}"> + <Button Command="{Binding ReloadMachinesCommand}" DockPanel.Dock="Right" ToolTip="Reload" Foreground="{StaticResource GrayBrush280}" Margin="20 0 0 0" Padding="0" Width="40" Height="Auto" Style="{StaticResource MaterialDesignFlatButton}"> <materialDesign:PackIcon Kind="Refresh" Width="24" Height="24" /> </Button> <autoComplete:AutoCompleteTextBox Provider="{Binding MachinesProvider}" LoadingContent="Loading..." FontSize="20" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" materialDesign:HintAssist.Hint="Serial Number" DisplayMember="SerialNumber"> @@ -55,12 +55,6 @@ </autoComplete:AutoCompleteTextBox> </DockPanel> <designer:MachineView Width="600" IsHitTestVisible="False" Margin="0 40 0 0" DataContext="{Binding SelectedMachine}" /> - <Button Command="{Binding EditMachineCommand}" HorizontalAlignment="Right" Margin="0 10 20 20" Style="{StaticResource MaterialDesignFlatButton}"> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="Pencil"></materialDesign:PackIcon> - <TextBlock Margin="10 0 0 0">EDIT</TextBlock> - </StackPanel> - </Button> </StackPanel> </Grid> @@ -100,19 +94,19 @@ <Grid DockPanel.Dock="Bottom" Margin="0 20 0 0"> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20 0 0 0"> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DeleteJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DeleteJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveJobCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DuplicateJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF995A" BorderBrush="#FF995A" Command="{Binding DuplicateJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DuplicateJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}" Command="{Binding DuplicateJobCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">DUPLICATE</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.NewJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.NewJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddJobCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">NEW JOB</TextBlock> @@ -266,7 +260,7 @@ </Grid> </DockPanel> - <Button Command="{Binding ImportEmbroideryFileCommand}" Margin="20 0 0 -100" Foreground="Black" FontSize="16" VerticalAlignment="Bottom" HorizontalAlignment="Left" Style="{StaticResource emptyButton}" Cursor="Hand"> + <Button Command="{Binding ImportEmbroideryFileCommand}" Margin="20 0 0 -100" Foreground="{StaticResource BlackForegroundBrush}" FontSize="16" VerticalAlignment="Bottom" HorizontalAlignment="Left" Style="{StaticResource emptyButton}" Cursor="Hand"> <StackPanel Orientation="Horizontal"> <Image Source="../Images/sewing-machine.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" TextDecorations="Underline">Import Embroidery File</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 6289f009b..08ba5b699 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -43,7 +43,7 @@ <converters:MathOperatorConverter x:Key="MathOperatorConverter" /> - <SolidColorBrush x:Key="SideBarBackground" Color="White"> + <SolidColorBrush x:Key="SideBarBackground" Color="{Binding Path=Color, Source={StaticResource SideBarBackgroundBrush}}"> </SolidColorBrush> @@ -65,7 +65,7 @@ </Grid.RowDefinitions> <StackPanel> - <Grid Background="#202020" TextElement.Foreground="Silver"> + <Grid Background="#1B1B1B" TextElement.Foreground="Silver"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="LayoutTransform"> @@ -93,13 +93,13 @@ </Style.Triggers> </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 0 0 1" Padding="20"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 0 0 1" Padding="20"> <Grid> <DockPanel> <Grid DockPanel.Dock="Left" MinWidth="190" VerticalAlignment="Center" Margin="0 0 0 0"> <StackPanel Orientation="Vertical" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"> - <ProgressBar Foreground="#FF6464" Width="50" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" /> - <TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontStyle="Italic" FontWeight="DemiBold" Foreground="#FF6464" TextWrapping="Wrap"> + <ProgressBar Foreground="{StaticResource RedBrush300}" Width="50" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" /> + <TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontStyle="Italic" FontWeight="DemiBold" Foreground="{StaticResource RedBrush300}" TextWrapping="Wrap"> <Run Text="Running '"></Run> <Run Text="{Binding RunningJob.Name}"></Run> <Run Text="'..."></Run> @@ -108,9 +108,9 @@ </Grid> <StackPanel DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 20 0 0"> <StackPanel Orientation="Horizontal"> - <TextBlock VerticalAlignment="Center" FontSize="30" FontFamily="{StaticResource digital-7}" Margin="0 0 40 0" Foreground="#FF6464" Width="100" Text="{Binding RunningJobStatus.RemainingTime,StringFormat=hh\\:mm\\:ss}"></TextBlock> + <TextBlock VerticalAlignment="Center" FontSize="30" FontFamily="{StaticResource digital-7}" Margin="0 0 40 0" Foreground="{StaticResource RedBrush300}" Width="100" Text="{Binding RunningJobStatus.RemainingTime,StringFormat=hh\\:mm\\:ss}"></TextBlock> - <Button Height="40" Width="170" Command="{Binding StopJobCommand}" Background="#FF6464" BorderBrush="#FF6464"> + <Button Height="40" Width="170" Command="{Binding StopJobCommand}" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="24" Height="24" Kind="Stop" /> <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">STOP</TextBlock> @@ -120,7 +120,7 @@ </StackPanel> <Grid> <Grid> - <Border Margin="0 10 0 0" VerticalAlignment="Bottom" Width="1200" BorderBrush="#404040" BorderThickness="0" ClipToBounds="False"> + <Border Margin="0 10 0 0" VerticalAlignment="Bottom" Width="1200" BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0" ClipToBounds="False"> <Grid ClipToBounds="False" > <ItemsControl ClipToBounds="False" x:Name="runningJobBrushList" ItemsSource="{Binding RunningJobStatus.CurrentUnitSegments}" Margin="0 0 60 0"> @@ -135,7 +135,7 @@ <Grid.ToolTip> <ToolTip Background="White" Padding="0" Visibility="{Binding IsInterSegment,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <Border BorderThickness="1" BorderBrush="#202020" CornerRadius="3" Padding="5"> + <Border BorderThickness="1" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="3" Padding="5"> <StackPanel Background="White"> <ItemsControl ItemsSource="{Binding BrushStops[0].LiquidVolumes}" VerticalAlignment="Center"> <ItemsControl.ItemsPanel> @@ -149,7 +149,7 @@ <ContentControl.Foreground> <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> </ContentControl.Foreground> - <TextBlock Foreground="#202020" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Volume,StringFormat=0.00}"></TextBlock> + <TextBlock Foreground="{StaticResource DarkGrayBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Volume,StringFormat=0.00}"></TextBlock> </ContentControl> </DataTemplate> </ItemsControl.ItemTemplate> @@ -200,7 +200,7 @@ <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}" BorderThickness="0"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> </Style> </ComboBox.ItemContainerStyle> <ComboBox.ItemTemplate> @@ -339,7 +339,7 @@ <DataTrigger Binding="{Binding Started}" Value="True"> <Setter Property="Content"> <Setter.Value> - <TextBlock Text="{Binding RemainingTime,StringFormat=hh\\:mm\\:ss}" Foreground="#FF6464" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Margin="10" FontSize="20"></TextBlock> + <TextBlock Text="{Binding RemainingTime,StringFormat=hh\\:mm\\:ss}" Foreground="{StaticResource RedBrush300}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Margin="10" FontSize="20"></TextBlock> </Setter.Value> </Setter> </DataTrigger> @@ -378,14 +378,14 @@ <Run Text="{Binding RunningJobStatus.CurrentUnitTotalProgress,Mode=OneWay,StringFormat=N2}"></Run> <Run FontSize="13" Text="m"></Run> <Run></Run> - <Run Foreground="#FF6464">x</Run><Run Foreground="#FF6464" FontSize="16" FontWeight="SemiBold" Text="{Binding RunningJobStatus.RemainingUnits}"></Run> + <Run Foreground="{StaticResource RedBrush300}">x</Run><Run Foreground="{StaticResource RedBrush300}" FontSize="16" FontWeight="SemiBold" Text="{Binding RunningJobStatus.RemainingUnits}"></Run> </TextBlock> <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="20" Height="20"> </materialDesign:PackIcon> </StackPanel> - <Border BorderBrush="#404040" BorderThickness="1" VerticalAlignment="Center" Height="30" Margin="0 11 60 0"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="1" VerticalAlignment="Center" Height="30" Margin="0 11 60 0"> </Border> @@ -398,8 +398,8 @@ <Binding ElementName="jobProgressCanvas" Path="ActualWidth" /> </MultiBinding> </Canvas.Left> - <materialDesign:PackIcon Kind="MapMarker" Foreground="#FF6464" Width="35" Height="35" Margin="-17 0 0 0" /> - <TextBlock Margin="-11 -23 0 0" FontSize="16" Foreground="#FF6464" VerticalAlignment="Top" Height="18" Text="{Binding RunningJobStatus.Progress,StringFormat=0.0}"></TextBlock> + <materialDesign:PackIcon Kind="MapMarker" Foreground="{StaticResource RedBrush300}" Width="35" Height="35" Margin="-17 0 0 0" /> + <TextBlock Margin="-11 -23 0 0" FontSize="16" Foreground="{StaticResource RedBrush300}" VerticalAlignment="Top" Height="18" Text="{Binding RunningJobStatus.Progress,StringFormat=0.0}"></TextBlock> </Grid> </Canvas> </Grid> @@ -408,7 +408,7 @@ </Grid> </DockPanel> - <TextBlock Visibility="{Binding RunningJobStatus.IsFinalizing,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="-170 0 0 0" Background="#202020" FontSize="14" Height="30" Foreground="#FF6D6D">Finalizing...</TextBlock> + <TextBlock Visibility="{Binding RunningJobStatus.IsFinalizing,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="-170 0 0 0" Background="{StaticResource DarkGrayBrush}" FontSize="14" Height="30" Foreground="{StaticResource RedBrush100}">Finalizing...</TextBlock> </Grid> </Border> @@ -444,7 +444,7 @@ </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Check" Width="32" Height="32" VerticalAlignment="Center" /> @@ -454,7 +454,7 @@ <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0"> <Button Height="20" Padding="0" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> + <materialDesign:PackIcon Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> @@ -495,7 +495,7 @@ </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Alert" Width="32" Height="32" VerticalAlignment="Center" /> @@ -512,7 +512,7 @@ <Button Padding="0" Height="20" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> + <materialDesign:PackIcon Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> @@ -553,7 +553,7 @@ </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Alert" Width="32" Height="32" VerticalAlignment="Center" /> @@ -563,7 +563,7 @@ <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0"> <Button Padding="0" Height="20" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> + <materialDesign:PackIcon Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index d0f0c2af6..e7f16146b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -84,7 +84,7 @@ </DataTrigger> <DataTrigger Binding="{Binding Completed}" Value="True"> <Setter Property="Kind" Value="CheckCircle"></Setter> - <Setter Property="Foreground" Value="#29B31D"></Setter> + <Setter Property="Foreground" Value="{StaticResource GreenBrush100}"></Setter> </DataTrigger> </Style.Triggers> </Style> @@ -110,7 +110,7 @@ </DockPanel> </Grid> - <GridSplitter Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="5" Background="Black" /> + <GridSplitter Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="5" Background="{StaticResource BlackForegroundBrush}" /> <Grid Grid.Row="2" Margin="0 40 0 0"> <DockPanel> <StackPanel Margin="0 0 0 0" Orientation="Horizontal" DockPanel.Dock="Top"> @@ -174,11 +174,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> @@ -220,7 +220,7 @@ <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> - <Border BorderBrush="Gray" BorderThickness="1 0 0 0" Background="White"> + <Border BorderBrush="Gray" BorderThickness="1 0 0 0" Background="{StaticResource WhiteBrush}"> <Grid> <ScrollViewer Padding="20" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"> <controls:JobOutlineControl HorizontalAlignment="Left" DataContext="{Binding JobHandler.JobTicket}" VirtualizingStackPanel.IsVirtualizing="True"/> @@ -237,7 +237,7 @@ </ContentControl> - <Border VerticalAlignment="Center" HorizontalAlignment="Left" Background="White" Width="30" Height="120" CornerRadius="10 0 0 10" Margin="-28 0 0 0" BorderBrush="Gray" BorderThickness="1 1 0 1"> + <Border VerticalAlignment="Center" HorizontalAlignment="Left" Background="{StaticResource WhiteBrush}" Width="30" Height="120" CornerRadius="10 0 0 10" Margin="-28 0 0 0" BorderBrush="Gray" BorderThickness="1 1 0 1"> <ToggleButton x:Name="toggleOutline" BorderThickness="0" Cursor="Hand" Background="Transparent"> <ToggleButton.Style> <Style TargetType="ToggleButton"> |
