aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2022-03-20 18:07:42 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2022-03-20 18:07:42 +0200
commit74c9b53220accf04d9b48eea5ebc5f4d7dc65e23 (patch)
tree59b98486a1bfd3a3538c87f155b4acd05f8d9c6a /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views
parented26561515291b660b03dadf484d5ef615bc3774 (diff)
parent4439a039bdaf8e59e0f450e2e4fbbd52b50261fd (diff)
downloadTango-74c9b53220accf04d9b48eea5ebc5f4d7dc65e23.tar.gz
Tango-74c9b53220accf04d9b48eea5ebc5f4d7dc65e23.zip
Merged Yana_Thread_Extensions_3
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml349
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml.cs77
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml197
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml145
6 files changed, 758 insertions, 44 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml
new file mode 100644
index 000000000..407ad2e9f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml
@@ -0,0 +1,349 @@
+<UserControl x:Class="Tango.MachineStudio.ThreadExtensions.Views.ColorCalibrationView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:enumerators="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
+ xmlns:global="clr-namespace:Tango.MachineStudio.ThreadExtensions"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:autoCompleteMachine="clr-namespace:Tango.MachineStudio.Common.AutoComplete;assembly=Tango.MachineStudio.Common"
+ xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
+ xmlns:oxy="http://oxyplot.org/wpf"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels"
+ xmlns:fa="http://schemas.fontawesome.io/icons/"
+
+ mc:Ignorable="d"
+ d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:ColorCalibrationViewVM, IsDesignTimeCreatable=False}" FontSize="16">
+ <UserControl.Resources>
+ <autoCompleteMachine:MachinesProvider x:Key="MachinesProvider" />
+ <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+ <Style x:Key="CellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="Focusable" Value="false"/>
+ <Setter Property="IsHitTestVisible" Value="false"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ <Setter Property="HideUpDownButtons" Value="true"/>
+ <Setter Property="FontSize" Value="14"/>
+ </Style>
+
+ <Style x:Key="EditableCellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ <Setter Property="FontSize" Value="14"/>
+ </Style>
+
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+
+ <DataTemplate x:Key="chartsPanel">
+ <Grid Margin="10 20 0 10">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="1*"/>
+ </Grid.ColumnDefinitions>
+
+ <Border Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5">
+ <oxy:Plot TitleFontSize="14" x:Name="LABDataPlot" Margin="0 0 10 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="TopRight" LegendOrientation="Vertical" LegendFontSize="9" LegendItemAlignment="Left" LegendLineSpacing="3" Foreground="{StaticResource Dialog.Foreground}">
+ <oxy:Plot.Series >
+ <oxy:LineSeries ItemsSource="{Binding LPoints}" Color="LawnGreen" Title="L" StrokeThickness="1.5" MarkerType="Circle" MarkerFill="LawnGreen"/>
+ <oxy:LineSeries ItemsSource="{Binding APoints}" Color="#E14141" Title="A" StrokeThickness="1.5" MarkerType="Circle" MarkerFill="#E14141"/>
+ <oxy:LineSeries ItemsSource="{Binding BPoints}" Color="#73B6EC" Title="B" StrokeThickness="1.5" MarkerType="Circle" MarkerFill="#73B6EC"/>
+ </oxy:Plot.Series>
+ <oxy:Plot.Axes>
+ <oxy:LinearAxis Position="Bottom" Title = "Ink%" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" AxisTitleDistance ="12" Minimum="0" Maximum="{Binding MaxX}" />
+ <oxy:LinearAxis Position="Left" Title = "LAB" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="{Binding MinY}" Maximum="{Binding MaxY}" MinorStep="10" />
+ </oxy:Plot.Axes>
+ </oxy:Plot>
+ </Border>
+
+ <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="0" Margin="10 0 0 0">
+ <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5">
+ <oxy:Plot TitleFontSize="14" x:Name="LinearizationPlot" Margin="0 0 0 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="RightTop" LegendOrientation="Vertical" >
+ <oxy:Plot.Series >
+ <oxy:LineSeries ItemsSource="{Binding LinearizationPoints}" Color="#73B6EC" MarkerFill="SteelBlue" MarkerType="Circle"/>
+ </oxy:Plot.Series>
+ <oxy:Plot.Axes>
+ <oxy:LinearAxis Position="Bottom" Title = "In Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="{Binding LinearizationMaxX}"/>
+ <oxy:LinearAxis Position="Left" Title = "Out Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="{Binding LinearizationMaxY}"/>
+ </oxy:Plot.Axes>
+ </oxy:Plot>
+ </Border>
+ </Grid>
+ </Grid>
+ </DataTemplate>
+
+ <DataTemplate x:Key="calibrationDataGrid">
+ <DockPanel Width="240" Margin="20 28 0 60">
+ <Grid >
+ <DataGrid Background="{StaticResource TransparentBackgroundBrush400}" AlternatingRowBackground="{StaticResource Transparent200}" BorderThickness="1" BorderBrush="{StaticResource DarkGrayBrush}" Margin="0 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="True" CanUserSortColumns="False">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
+ <Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource BlackForegroundBrush}"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Resources>
+ <Style x:Key="CellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="Focusable" Value="false"/>
+ <Setter Property="IsHitTestVisible" Value="false"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ <Setter Property="HideUpDownButtons" Value="true"/>
+ </Style>
+ <Style x:Key="EditableCellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ </Style>
+ </DataGrid.Resources>
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="{StaticResource DimGrayBrush}" FontSize="11" />
+ <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>
+ <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" StringFormat="0.00" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+
+ </DataTemplate>
+ </UserControl.Resources>
+
+ <Grid x:Name="contentGrid" DataContext="{Binding ColorCalibrationViewVM}" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <DockPanel Grid.Row="0">
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" 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>
+ </StackPanel>
+ </Button>
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding ApplyToRMLCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" />
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Apply to RML</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="180" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding ApplyToMachineCalibrationCommand}" ToolTip="Apply to machine color calibration">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" />
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Text="Apply to Machine"></TextBlock>
+ </StackPanel>
+ </Button>
+ </DockPanel>
+ <Grid Grid.Row="1" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="30"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+ <StackPanel Orientation="Horizontal" Margin="35 0 0 0">
+ <ListBox Style="{x:Null}" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" ItemContainerStyle="{StaticResource basicListBoxItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" Background="Transparent" BorderThickness="0" ItemsSource="{Binding CalibrationTabs}" SelectedItem="{Binding SelectedTab}" SelectionChanged="ListBox_SelectionChanged">
+ <ListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"></StackPanel>
+ </ItemsPanelTemplate>
+ </ListBox.ItemsPanel>
+
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <Border Padding="5 5" Width="160" CornerRadius="10 10 0 0" Margin="1 0" Tag="{Binding RelativeSource={RelativeSource AncestorType=ListBox},Path=DataContext}">
+ <Border.ContextMenu>
+ <ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Style="{x:Null}" >
+ <MenuItem Header="Rename" Command="{Binding RenameTabCommand}" MinWidth="210" MaxHeight="40" >
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Pencil" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </ContextMenu>
+ </Border.ContextMenu>
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Background" Value="{StaticResource LightGrayBrush150}"></Setter>
+ <Setter Property="TextElement.Foreground" Value="{StaticResource DarkGrayBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter>
+ <Setter Property="TextElement.Foreground" Value="{StaticResource WhiteTextBrush}"></Setter>
+ </DataTrigger>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Opacity" Value="0.8"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <DockPanel VerticalAlignment="Center">
+ <Button Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=DataContext.RemoveTabCommand}" CommandParameter="{Binding }" DockPanel.Dock="Right" Margin="5 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="Auto">
+ <materialDesign:PackIcon Kind="Close">
+ <materialDesign:PackIcon.Style>
+ <Style TargetType="materialDesign:PackIcon">
+ <Setter Property="Foreground" Value="{StaticResource DarkGrayBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Foreground" Value="{StaticResource WhiteTextBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </materialDesign:PackIcon.Style>
+ </materialDesign:PackIcon>
+ </Button>
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center" TextAlignment="Center" TextTrimming="CharacterEllipsis" FontSize="11"></TextBlock>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ <Button Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="24" Cursor="Hand" Command="{Binding AddTabCommand}" ToolTip="New tab">
+ <materialDesign:PackIcon Width="20" Height="20" Kind="Plus" Foreground="{StaticResource AccentColorBrush}" />
+ </Button>
+ </StackPanel>
+
+ <DockPanel Grid.Row="1" Margin="5 0 5 5">
+ <UniformGrid Columns="2" FirstColumn="0" Name="uniformGrid1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Loaded="ContentGrid_Loaded">
+ <DockPanel Grid.Column="0" Grid.Row="0" x:Name="CyanPanel">
+ <Border DockPanel.Dock="Top" Background="LightCyan" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <DockPanel>
+ <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0">
+ <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" />
+ </Button>
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Padding="2" Height="26" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportCyanDataCommand}" ToolTip="Import Cyan data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2">
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock>
+ </Button>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE CYAN</TextBlock>
+ </DockPanel>
+ </Grid>
+ </Border>
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <ContentControl Name="cyanChartsContent" Grid.Row="1" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.CyanPlot}"/>
+ <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.CyanCalibrationData}" Grid.Column="1"/>
+ </Grid>
+ </DockPanel>
+ <DockPanel Grid.Column="1">
+ <Border DockPanel.Dock="Top" Background="#FC63FC" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <DockPanel>
+ <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0">
+ <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" />
+ </Button>
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Height="26" Padding="2" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportMagentaDataCommand}" ToolTip="Import Magenta data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2">
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock>
+ </Button>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE MAGENTA</TextBlock>
+ </DockPanel>
+ </Grid>
+ </Border>
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <ContentControl Name="magentaChartsContent" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.MagentaPlot}"/>
+ <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.MagentaCalibrationData}" Grid.Column="1"/>
+ </Grid>
+ </DockPanel >
+ <DockPanel Grid.Column="0" Grid.Row="1" x:Name="YellowPanel">
+ <Border DockPanel.Dock="Top" Background="LightYellow" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <DockPanel>
+ <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0">
+ <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" />
+ </Button>
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Height="26" Padding="2" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportYellowDataCommand}" ToolTip="Import Yellow data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2">
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock>
+ </Button>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE YELLOW</TextBlock>
+ </DockPanel>
+ </Grid>
+ </Border>
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <ContentControl Name="yellowChartsContent" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.YellowPlot}"/>
+ <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.YellowCalibrationData}" Grid.Column="1"/>
+ </Grid>
+ </DockPanel>
+ <DockPanel Grid.Column="1" Grid.Row="1">
+ <Border DockPanel.Dock="Top" Background="DarkGray" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <DockPanel>
+ <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0">
+ <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" />
+ </Button>
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Height="26" Padding="2" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportBlackDataCommand}" ToolTip="Import Black data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2" >
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock>
+ </Button>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE BLACK</TextBlock>
+ </DockPanel>
+ </Grid>
+
+ </Border>
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <ContentControl Name="blackChartsContent" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.BlackPlot}"/>
+ <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.BlackCalibrationData}" Grid.Column="1"/>
+ </Grid>
+ </DockPanel>
+ </UniformGrid>
+ </DockPanel>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml.cs
new file mode 100644
index 000000000..84219c093
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml.cs
@@ -0,0 +1,77 @@
+using OxyPlot.Wpf;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.MachineStudio.ThreadExtensions.ViewModels;
+
+namespace Tango.MachineStudio.ThreadExtensions.Views
+{
+ /// <summary>
+ /// Interaction logic for ColorCalibrationView.xaml
+ /// </summary>
+ public partial class ColorCalibrationView : UserControl
+ {
+ public ColorCalibrationView()
+ {
+ InitializeComponent();
+ }
+
+ private void ContentGrid_Loaded(object sender, RoutedEventArgs e)
+ {
+ var grid = (UIElement)sender;
+ if (grid != null && ((UniformGrid)grid).DataContext is ColorCalibrationViewVM)
+ {
+ ColorCalibrationViewVM vm = (ColorCalibrationViewVM)((UniformGrid)grid).DataContext;
+ ColorCalibrationTabVM selectedTab = vm.SelectedTab;
+ if (selectedTab != null && !selectedTab.IsTabLoaded)
+ {
+ InitPlots(selectedTab);
+ vm.IsViewLoaded = true;
+ }
+ }
+ }
+
+ private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ var listBox = (UIElement)sender;
+ if (listBox != null && ((ListBox)listBox).DataContext is ColorCalibrationViewVM)
+ {
+ ColorCalibrationViewVM vm = (ColorCalibrationViewVM)((ListBox)listBox).DataContext;
+ ColorCalibrationTabVM selectedTab = vm.SelectedTab;
+ InitPlots(selectedTab);
+ }
+ }
+
+ private void InitPlots(ColorCalibrationTabVM selectedTab)
+ {
+ if (selectedTab != null && !selectedTab.IsTabLoaded)
+ {
+ if (null == (cyanChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot"))
+ return;
+ selectedTab.CyanPlot.DataPlotControl = (cyanChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot");
+ selectedTab.CyanPlot.LinearizationPlotControl = (cyanChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot");
+ selectedTab.MagentaPlot.DataPlotControl = (magentaChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot");
+ selectedTab.MagentaPlot.LinearizationPlotControl = (magentaChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot");
+ selectedTab.YellowPlot.DataPlotControl = (yellowChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot");
+ selectedTab.YellowPlot.LinearizationPlotControl = (yellowChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot");
+ selectedTab.BlackPlot.DataPlotControl = (blackChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot");
+ selectedTab.BlackPlot.LinearizationPlotControl = (blackChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot");
+
+ selectedTab.InitData();
+ selectedTab.IsTabLoaded = true;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml
new file mode 100644
index 000000000..b9341d0de
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml
@@ -0,0 +1,197 @@
+<UserControl x:Class="Tango.MachineStudio.ThreadExtensions.Views.ColorShadeView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:autoCompleteMachine="clr-namespace:Tango.MachineStudio.Common.AutoComplete;assembly=Tango.MachineStudio.Common"
+ xmlns:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels"
+ xmlns:fa="http://schemas.fontawesome.io/icons/"
+ mc:Ignorable="d"
+ d:DesignHeight="450" d:DesignWidth="800" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:ColorShadeViewVM, IsDesignTimeCreatable=False}" FontSize="16">
+
+ <UserControl.Resources>
+ <autoCompleteMachine:MachinesProvider x:Key="MachinesProvider" />
+ <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+
+
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+
+ </UserControl.Resources>
+
+ <Grid x:Name="contentGrid" DataContext="{Binding ColorShadeViewVM}" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <DockPanel Grid.Row="0">
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" 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>
+ </StackPanel>
+ </Button>
+ </DockPanel>
+ <Grid Grid.Row="1" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="30"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+ <StackPanel Orientation="Horizontal" Margin="35 0 0 0">
+ <ListBox Style="{x:Null}" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" ItemContainerStyle="{StaticResource basicListBoxItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" Background="Transparent" BorderThickness="0" ItemsSource="{Binding ColorShadeTabs}" SelectedItem="{Binding SelectedTab}">
+ <ListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"></StackPanel>
+ </ItemsPanelTemplate>
+ </ListBox.ItemsPanel>
+
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <Border Padding="5 5" Width="160" CornerRadius="10 10 0 0" Margin="1 0" Tag="{Binding RelativeSource={RelativeSource AncestorType=ListBox},Path=DataContext}">
+ <Border.ContextMenu>
+ <ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Style="{x:Null}" >
+ <MenuItem Header="Rename" Command="{Binding RenameTabCommand}" MinWidth="210" MaxHeight="40" >
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Pencil" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </ContextMenu>
+ </Border.ContextMenu>
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Background" Value="{StaticResource LightGrayBrush150}"></Setter>
+ <Setter Property="TextElement.Foreground" Value="{StaticResource DarkGrayBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter>
+ <Setter Property="TextElement.Foreground" Value="{StaticResource WhiteTextBrush}"></Setter>
+ </DataTrigger>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Opacity" Value="0.8"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <DockPanel VerticalAlignment="Center">
+ <Button Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=DataContext.RemoveTabCommand}" CommandParameter="{Binding }" DockPanel.Dock="Right" Margin="5 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="Auto">
+ <materialDesign:PackIcon Kind="Close">
+ <materialDesign:PackIcon.Style>
+ <Style TargetType="materialDesign:PackIcon">
+ <Setter Property="Foreground" Value="{StaticResource DarkGrayBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Foreground" Value="{StaticResource WhiteTextBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </materialDesign:PackIcon.Style>
+ </materialDesign:PackIcon>
+ </Button>
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center" TextAlignment="Center" TextTrimming="CharacterEllipsis" FontSize="11"></TextBlock>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ <Button Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="24" Cursor="Hand" Command="{Binding AddTabCommand}" ToolTip="New tab">
+ <materialDesign:PackIcon Width="20" Height="20" Kind="Plus" Foreground="{StaticResource AccentColorBrush}" />
+ </Button>
+ </StackPanel>
+
+ <Border Margin="5 0 5 5" Grid.Row="1" Background="Transparent" Padding="4" CornerRadius="5" VerticalAlignment="Top" BorderThickness="2" BorderBrush="{StaticResource borderBrush}">
+ <DockPanel >
+ <DockPanel DockPanel.Dock="Top" Height="30">
+ <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 10 0">
+ <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="26" Height="24" />
+ </Button>
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Height="Auto" Width="180" Command="{Binding SelectedTab.ImportColorsCommand}" ToolTip="Import Cyan data " Margin="0 0 10 0" >
+ <TextBlock FontSize="14" VerticalAlignment="Center" >IMPORT COLORS</TextBlock>
+ </Button>
+ </DockPanel>
+ <Grid DockPanel.Dock="Bottom" Margin="0 0 0 0">
+ <DataGrid Margin="10" BorderBrush="Silver" BorderThickness="1" RowHeight="30" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" ItemsSource="{Binding SelectedTab.RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData}" IsReadOnly="False"
+ ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="700">
+ <DataGrid.ColumnHeaderStyle >
+ <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
+ <Setter Property="FontSize" Value="16"/>
+ <Setter Property="HorizontalAlignment" Value="Center"/>
+ <Setter Property="VerticalAlignment" Value="Center"/>
+ <Setter Property="Margin" Value="2 0 0 0"/>
+ <Setter Property="Padding" Value="0 5"/>
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Center"/>
+ </Style>
+ </DataGrid.ColumnHeaderStyle>
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ <Setter Property="Padding" Value="4"></Setter>
+ <Setter Property="Margin" Value="0 0 0 0"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="Number" Binding="{Binding ColorNum}" Width="80" />
+ <DataGridTemplateColumn Header="Shade" Width="200">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <Rectangle Fill="{Binding ColorBrush, Mode=OneWay}"/>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+
+ <DataGridTextColumn Header="L" Binding="{Binding L, UpdateSourceTrigger=PropertyChanged}" Width="1*" />
+ <DataGridTextColumn Header="A" Binding="{Binding A, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="1*"/>
+ <DataGridTextColumn Header="B" Binding="{Binding B, UpdateSourceTrigger=PropertyChanged}" Width="1*"/>
+ <DataGridTextColumn Header="C" Binding="{Binding C, UpdateSourceTrigger=PropertyChanged}" Width="1*" />
+ <DataGridTextColumn Header="M" Binding="{Binding M, UpdateSourceTrigger=PropertyChanged}" Width="1*"/>
+ <DataGridTextColumn Header="Y" Binding="{Binding Y, UpdateSourceTrigger=PropertyChanged}" Width="1*"/>
+ <DataGridTextColumn Header="K" Binding="{Binding K, UpdateSourceTrigger=PropertyChanged}" Width="1*" />
+ <DataGridTextColumn Header="TI" Binding="{Binding TI, UpdateSourceTrigger=PropertyChanged}" Width="1*"/>
+ <DataGridTextColumn Header="L" Binding="{Binding LRes, UpdateSourceTrigger=PropertyChanged}" Width="1*">
+ <DataGridTextColumn.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="Background" Value="LightCyan" />
+ </Style>
+ </DataGridTextColumn.CellStyle>
+ </DataGridTextColumn>
+ <DataGridTextColumn Header="A" Binding="{Binding ARes}" Width="1*" >
+ <DataGridTextColumn.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="Background" Value="LightCyan" />
+ </Style>
+ </DataGridTextColumn.CellStyle>
+ </DataGridTextColumn>
+ <DataGridTextColumn Header="B" Binding="{Binding BRes}" Width="1*">
+ <DataGridTextColumn.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="Background" Value="LightCyan" />
+ </Style>
+ </DataGridTextColumn.CellStyle>
+ </DataGridTextColumn>
+ <DataGridTextColumn Header="Delta E" Binding="{Binding DeltaE}" Width="1*">
+ <DataGridTextColumn.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="Background" Value="LightCyan" />
+ <Setter Property="Foreground" Value="red" />
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+ </DataGridTextColumn.CellStyle>
+ </DataGridTextColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </Border>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml.cs
new file mode 100644
index 000000000..2a8079cfe
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.ThreadExtensions.Views
+{
+ /// <summary>
+ /// Interaction logic for ColorShadeView.xaml
+ /// </summary>
+ public partial class ColorShadeView : UserControl
+ {
+ public ColorShadeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml
index bfb8a58d0..820c68715 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml
@@ -58,6 +58,12 @@
<TabItem Header="TEST RESULTS" Margin="20 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20" >
<local:TestResultsView />
</TabItem>
+ <TabItem Header="COLOR CALIBRATION" Margin="20 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
+ <local:ColorCalibrationView/>
+ </TabItem>
+ <TabItem Header="COLOR SHADE" Margin="20 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
+ <local:ColorShadeView/>
+ </TabItem>
</TabControl>
</Grid>
</DockPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml
index 50a2537e1..f6262b52d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml
@@ -158,33 +158,12 @@
</UserControl.Resources>
<Grid DataContext="{Binding TestResultsViewVM}">
- <Grid.RowDefinitions>
+ <!--<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
- </Grid.RowDefinitions>
- <DockPanel Grid.Row="0">
- <Button DockPanel.Dock="Top" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" 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>
- </StackPanel>
- </Button>
- <!--<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
- <TextBlock Margin="40 20" FontSize="30" FontWeight="SemiBold" FontStyle="Italic">TARGET MACHINE</TextBlock>
-
- <autoComplete:AutoCompleteTextBox Provider="{StaticResource MachinesProvider}" LoadingContent="Loading..." FontSize="20" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" materialDesign:HintAssist.Hint="Serial Number" DisplayMember="SerialNumber" Width="280">
- <autoComplete:AutoCompleteTextBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock Text="{Binding SerialNumber}" FontWeight="Bold" FontStyle="Italic"></TextBlock>
- <TextBlock FontSize="11" Text="{Binding Name}" Foreground="Gray"></TextBlock>
- </StackPanel>
- </DataTemplate>
- </autoComplete:AutoCompleteTextBox.ItemTemplate>
- </autoComplete:AutoCompleteTextBox>
- </StackPanel>-->
- </DockPanel>
- <Grid Grid.Row="1" >
+ </Grid.RowDefinitions>-->
+
+ <Grid Grid.Row="1" Margin="0 8 0 0" >
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="1*"/>
@@ -265,22 +244,17 @@
</ItemsControl>
<Grid Grid.Column="0" MinWidth="600" HorizontalAlignment="Left" >
- <DockPanel >
-
- <Grid DockPanel.Dock="Bottom" Margin="20 10 20 40">
- <TextBlock FontSize="21">Conclusion:</TextBlock>
- <TextBox Margin="120 0 10 0" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Conclusions}" Style="{StaticResource Rounded_Corners_TextBox_Multiline}"></TextBox>
- </Grid>
-
- <Grid DockPanel.Dock="Bottom" Margin="20 10 20 0">
- <TextBlock FontSize="21">Comments:</TextBlock>
- <TextBox Margin="120 0 10 0" Style="{StaticResource Rounded_Corners_TextBox_Multiline}" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Comment}"></TextBox>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="3*"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="1*"/>
+ </Grid.ColumnDefinitions>
- </Grid>
-
- <Border Padding="10 10 20 10" DockPanel.Dock="Top" BorderBrush="Transparent" BorderThickness="1" >
-
- <ScrollViewer VerticalScrollBarVisibility="Auto" >
+ <Border Padding="10 10 20 10" Grid.ColumnSpan="2" Grid.Row="0" BorderBrush="Transparent" BorderThickness="1" >
+ <ScrollViewer VerticalScrollBarVisibility="Auto" >
<Grid HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
@@ -293,8 +267,8 @@
</Grid.RowDefinitions>
<Border>
<StackPanel x:Name="DryerTempPanel" HorizontalAlignment="Stretch" Grid.Column="0" Grid.Row="0" >
- <DockPanel Margin="0 0 0 0">
- <Button DockPanel.Dock="Right" Margin="0 0 40 0" HorizontalAlignment="Left" Padding="0" Height="Auto" Width="200" Command="{Binding ApplyToProcessParametersCommand}" ToolTip="Apply to Process Parameters" VerticalContentAlignment="Center">
+ <DockPanel Margin="0 10 0 0">
+ <Button DockPanel.Dock="Right" Margin="0 0 40 0" HorizontalAlignment="Left" Padding="0" Width="200" Command="{Binding ApplyToProcessParametersCommand}" ToolTip="Apply to Process Parameters" VerticalContentAlignment="Center">
<TextBlock FontSize="14" Background="Transparent" VerticalAlignment="Center" Margin="0 2 0 0">Apply to Process Parameters</TextBlock>
</Button>
<TextBlock HorizontalAlignment="Center" FontSize="21" Margin="180 10 0 0"> Process Parameters</TextBlock>
@@ -390,7 +364,7 @@
</DataGrid>
</StackPanel>
- <StackPanel x:Name="TensionresultsPanel" Grid.Column="1" Grid.Row="0" Margin="0 10 0 0" >
+ <StackPanel x:Name="TensionresultsPanel" Grid.Column="1" Grid.Row="0" Margin="0 20 0 0" >
<TextBlock HorizontalAlignment="Center" FontSize="21"> Tension through the thread path</TextBlock>
<Border BorderThickness="1" BorderBrush="{StaticResource GrayBrush200}" Margin="0 10 20 10" >
<UniformGrid Columns="4" Background="{StaticResource TransparentBackgroundBrush}" HorizontalAlignment="Left" MinWidth="{ Binding ElementName=MechanicalPropertiesGrid, Path= ActualWidth }" >
@@ -631,10 +605,93 @@
</ScrollViewer>
</Border>
+ <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 20 20">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="120"/>
+ <ColumnDefinition Width="1*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="1*" />
+ </Grid.RowDefinitions>
+
+ <TextBlock FontSize="21" HorizontalAlignment="Left" VerticalAlignment="Center">Conclusion:</TextBlock>
+ <TextBox Grid.Column="1" Margin="20 0 20 0" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Conclusions}" Style="{StaticResource Rounded_Corners_TextBox_Multiline}"></TextBox>
+
+ <TextBlock Grid.Row="1" FontSize="21" HorizontalAlignment="Left" VerticalAlignment="Center">Comments:</TextBlock>
+ <TextBox Grid.Column="1" Grid.Row="1" Margin="20 0 20 0" Style="{StaticResource Rounded_Corners_TextBox_Multiline}" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Comment}" VerticalAlignment="Center"></TextBox>
+
+ </Grid>
+ <DockPanel Grid.Row="1" Grid.Column="0" Margin="20 0 20 20" x:Name="ImportExcelFile">
+ <DockPanel DockPanel.Dock="Top" Margin="0 0 20 0">
+ <Button Margin="10 0 0 0" Padding="2" Height="24" Cursor="Hand" Width="100" Command="{Binding SelectedTab.UploadCommand}" ToolTip="Upload selected files">Upload</Button>
+ <Button DockPanel.Dock="Right" Margin="0 0 10 0" HorizontalAlignment="Right" Padding="2" Height="24" Cursor="Hand" Width="100" Command="{Binding SelectedTab.DownLoadAllCommand}" ToolTip="Upload selected files">Download All</Button>
+ </DockPanel>
+
+ <Grid DockPanel.Dock="Bottom" Margin="0 0 20 0">
+ <DataGrid Margin="10" RowHeight="30" Padding="0" SelectionUnit="FullRow" BorderBrush="{StaticResource DarkGrayBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding SelectedTab.TestResultsFiles}" IsReadOnly="True"
+ ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="100">
+ <DataGrid.ColumnHeaderStyle >
+ <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
+ <Setter Property="FontSize" Value="16"/>
+ <Setter Property="HorizontalAlignment" Value="Left"/>
+ <Setter Property="Margin" Value="2 0 0 0"/>
+ <Setter Property="Padding" Value="0 5"/>
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ </Style>
+ </DataGrid.ColumnHeaderStyle>
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ <Setter Property="Padding" Value="0"></Setter>
+ <Setter Property="Margin" Value="0 0 0 0"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="File Name" Binding="{Binding FileName}" Width="1*" FontSize="16"/>
+ <DataGridTextColumn Header="Progress" Width="1*" />
+ <DataGridTemplateColumn Header="DownLoad" Width="140">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <Button Style="{StaticResource emptyButton}" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid},AncestorLevel=2},Path=DataContext.SelectedTab.DownLoadFileCommand}" CommandParameter="{Binding}">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock FontSize="16" Text="Download" VerticalAlignment="Center"></TextBlock>
+ <materialDesign:PackIcon VerticalAlignment="Center" Margin="5 0 0 0" Kind="Download" Width="18" />
+ </StackPanel>
+ </Button>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn Header="Delete" Width="140">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <Button Style="{StaticResource emptyButton}" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid},AncestorLevel=2},Path=DataContext.SelectedTab.DeleteCommand}" CommandParameter="{Binding}">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock FontSize="16" Text="Delete" VerticalAlignment="Center"></TextBlock>
+ <materialDesign:PackIcon VerticalAlignment="Center" Margin="5 0 0 0" Kind="Delete" Width="18" />
+ </StackPanel>
+ </Button>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
</DockPanel>
</Grid>
</Grid>
</Grid>
-
+ <DockPanel VerticalAlignment="Top">
+ <Button DockPanel.Dock="Top" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" 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>
+ </StackPanel>
+ </Button>
+
+ </DockPanel>
</Grid>
</UserControl>