diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-11-17 14:48:25 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-11-17 14:48:25 +0200 |
| commit | 854f883509443230cc0360ea45c7d8085dd52882 (patch) | |
| tree | 800752e61652c23a668a6b2f6b7b50548db3f74e /Software/Visual_Studio/MachineStudio/Modules | |
| parent | eaedfecb6b08008649bb79a9767adbe6132da536 (diff) | |
| download | Tango-854f883509443230cc0360ea45c7d8085dd52882.tar.gz Tango-854f883509443230cc0360ea45c7d8085dd52882.zip | |
RML EXTANSION- item 5745, 5909, 5823. DataBase changes:
table Rubbing results , remove GS 100 min and GS 100 max and add GS 100, remove GS 200 min and GS 200 max and add GS 200. Created new table COLOR_PROCESS_INK_UPTAKE
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
10 files changed, 101 insertions, 109 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs index 9494de3f9..b671e053e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs @@ -298,7 +298,7 @@ namespace Tango.MachineStudio.Statistics.ViewModels { _notification = notificationProvider; JobRuns = new ObservableCollection<JobRunModel>(); - LoadJobRunsCommand = new RelayCommand(async () => await LoadJobRuns(), () => IsFree && SelectedMachines.Source.Count >0); + LoadJobRunsCommand = new RelayCommand(async () => await LoadJobRuns(), () => IsFree && SelectedMachines!= null && SelectedMachines.Source.Count >0); ExportToExcelCommand = new RelayCommand(ExportToExcel, () => IsFree); LengthUpperValue = 10000.0; LengthLowerValue = 0.0; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/NumericFieldConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/NumericFieldConverter.cs new file mode 100644 index 000000000..0afcf2956 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/NumericFieldConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.MachineStudio.ThreadExtensions.Converters +{ + public class NumericFieldConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs index 0cb2679fd..a9bc38f4c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs @@ -10,10 +10,10 @@ namespace Tango.MachineStudio.ThreadExtensions.Models public static class FactorTarget { public static Dictionary<FactorColors, double> FACTOR100 = new Dictionary<FactorColors, double>() { - { FactorColors.CYAN, 51.95}, {FactorColors.MAGENTA, 47.47}, { FactorColors.YELLOW, 94.05}, {FactorColors.BLACK, 26.58}}; + { FactorColors.CYAN, 51.64}, {FactorColors.MAGENTA, 46.77}, { FactorColors.YELLOW, 90.3}, {FactorColors.BLACK, 31.61}}; public static Dictionary<FactorColors, double> FACTOR200 = new Dictionary<FactorColors, double>() { - { FactorColors.CYAN, 46.3}, {FactorColors.MAGENTA, 41.04}, { FactorColors.YELLOW, 97.78}, {FactorColors.BLACK, 21.01}}; + { FactorColors.CYAN, 42.26}, {FactorColors.MAGENTA, 42.1}, { FactorColors.YELLOW, 98.86}, {FactorColors.BLACK, 24}}; public static double GetFactor100(FactorColors color) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj index 35123f9b1..fdcef6361 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj @@ -94,6 +94,7 @@ <Compile Include="Converters\ColorNameToBrushConverter.cs" /> <Compile Include="Converters\ColorWithPercentToBrushConverter.cs" /> <Compile Include="Converters\ComboBoxVisibleConverter.cs" /> + <Compile Include="Converters\NumericFieldConverter.cs" /> <Compile Include="Models\ColorDataExcelModel.cs" /> <Compile Include="Models\FactorTarget.cs" /> <Compile Include="Models\MachineModel.cs" /> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs index 2aa5598be..c60c65216 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs @@ -138,35 +138,18 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } } - private ObservableCollection<ColorProcessFactor> _minInkUptake; - public ObservableCollection<ColorProcessFactor> MinInkUptake - { - get - { - return _minInkUptake; - } - set - { - _minInkUptake = value; - RaisePropertyChangedAuto(); - } - } - private ObservableCollection<ColorProcessFactor> _maxInkUptake; - public ObservableCollection<ColorProcessFactor> MaxInkUptake + private ObservableCollection<ColorProcessInkUptake> _colorProcessInkUptakeData; + + public ObservableCollection<ColorProcessInkUptake> ColorProcessInkUptakeData { - get - { - return _maxInkUptake; - } - set - { - _maxInkUptake = value; + get { return _colorProcessInkUptakeData; } + set { + _colorProcessInkUptakeData = value; RaisePropertyChangedAuto(); } } - - + private PlotProperties _cyanPlot; public PlotProperties CyanPlot @@ -456,7 +439,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels var currentcolorProcessParameter = _active_context.ColorProcessParameters.Where(x => x.RmlsExtensionsGuid == RMLExtemtionGUID && x.MachineGuid == SelectedMachineGUID).FirstOrDefault(); if (currentcolorProcessParameter != null) { - SelectedColorProcessParameter = new ColorProcessParametersBuilder(_active_context).Set(currentcolorProcessParameter.Guid).WithColorProcessData().WithColorProcessFactor().Build(); + SelectedColorProcessParameter = new ColorProcessParametersBuilder(_active_context).Set(currentcolorProcessParameter.Guid).WithColorProcessData().WithColorProcessFactor().WithColorProcessInkUptake().Build(); } if (SelectedColorProcessParameter == null) @@ -473,17 +456,20 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.MAGENTA, FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.YELLOW, FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.BLACK, FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.CYAN, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.MAGENTA, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.YELLOW, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.BLACK, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.CYAN, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.MAGENTA, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.YELLOW, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.BLACK, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MININKUPTAKEZONE1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MAXINKUPTAKEZONE1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MININKUPTAKEZONE2, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MAXINKUPTAKEZONE2, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); _active_context.ColorProcessParameters.Add(SelectedColorProcessParameter); _active_context.SaveChangesAsync(); } + else if(SelectedColorProcessParameter.ColorProcessInkUptake.Count == 0) + { + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MININKUPTAKEZONE1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MAXINKUPTAKEZONE1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MININKUPTAKEZONE2, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessInkUptake.Add(new ColorProcessInkUptake() { InkUptakeZoneType = InkUptakeZoneTypes.MAXINKUPTAKEZONE2, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + } } }); @@ -498,10 +484,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels Factor200ProcessData = SelectedColorProcessParameter.ColorProcessFactors.Where(x => x.FactorPercent == 200).ToObservableCollection(); - MinInkUptake = SelectedColorProcessParameter.ColorProcessFactors.Where(x => x.FactorPercent == 1).ToObservableCollection(); - - MaxInkUptake = SelectedColorProcessParameter.ColorProcessFactors.Where(x => x.FactorPercent == 1111).ToObservableCollection(); - + ColorProcessInkUptakeData = SelectedColorProcessParameter.ColorProcessInkUptake.ToObservableCollection(); + RemovedColorProcessDataBeforeSave.Clear(); var cyanDataList = SelectedColorProcessParameter.ColorProcessData.Where(x => x.FactorColor == FactorColors.CYAN).ToList().OrderBy(x => x.InkNlCm).ToList(); @@ -775,10 +759,14 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { factordata.LastUpdated = DateTime.UtcNow; } + foreach (var inkdata in SelectedColorProcessParameter.ColorProcessInkUptake) + { + inkdata.LastUpdated = DateTime.UtcNow; + } await _active_context.SaveChangesAsync(); - LoadColorParameters(); + // LoadColorParameters(); } catch (Exception ex) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs index fc07a5903..12ae1aa89 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs @@ -794,10 +794,10 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels AddManufacturerItemCommand = new RelayCommand(AddManufacturerItem); - EditManufacturerItemCommand = new RelayCommand(EditManufacturerItem, () => ActiveRML.Manufacturer != ""); + EditManufacturerItemCommand = new RelayCommand(EditManufacturerItem, () => ActiveRML !=null && ActiveRML.Manufacturer != ""); AddBrandItemCommand = new RelayCommand(AddBrandItem); - EditBrandItemCommand = new RelayCommand(EditBrandItem, () => ActiveRMLExtension.YarnBrand != null); + EditBrandItemCommand = new RelayCommand(EditBrandItem, () => ActiveRMLExtension != null && ActiveRMLExtension.YarnBrand != null); AddEndUseItemCommand = new RelayCommand(AddEndUseItem); EditEndUseItemCommand = new RelayCommand(EditEndUseItem); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs index 4e7d84e7f..52182cdd7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs @@ -142,11 +142,11 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels //sb.Append(" DeltaE CIE 100 % : "); sb.Append($" { rubbingResult.DeltaeCie100.ToString()} "); //sb.Append(" GS 100% : "); - sb.Append($" { rubbingResult.Gs100Min.ToString()}-{rubbingResult.Gs100Max.ToString()} "); + sb.Append($" { rubbingResult.Gs100.ToString()} "); //sb.Append(" DeltaE CIE 200 % : "); sb.Append($" { rubbingResult.DeltaeCie200.ToString()} "); //sb.Append(" GS 200% : "); - sb.Append($" { rubbingResult.Gs200Min.ToString()}-{rubbingResult.Gs200Max.ToString()} "); + sb.Append($" { rubbingResult.Gs200.ToString()} "); outputFile.WriteLine(sb); } outputFile.WriteLine(""); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs index a94415c74..eea7eb9fc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs @@ -386,7 +386,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels _active_context.SaveChanges(); }); - LoadTestResults(); + // LoadTestResults(); } catch (Exception ex) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml index 697289604..504bf0610 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml @@ -5,7 +5,8 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views" xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels" - xmlns:converters="clr-namespace:Tango.MachineStudio.ThreadExtensions.Converters" + xmlns:localconverters="clr-namespace:Tango.MachineStudio.ThreadExtensions.Converters" + 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" @@ -20,7 +21,9 @@ <UserControl.Resources> <autoCompleteMachine:MachinesProvider x:Key="MachinesProvider" /> - <converters:ColorNameToBrushConverter x:Key="ColorNameToBrushConverter"/> + <localconverters:ColorNameToBrushConverter x:Key="ColorNameToBrushConverter"/> + <localconverters:NumericFieldConverter x:Key="NumericFieldConverter"/> + <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"/> @@ -400,62 +403,43 @@ </DataGrid.Columns> </DataGrid> - <DataGrid x:Name="MinInkUptakeGrid" HorizontalAlignment="Left" VerticalScrollBarVisibility ="Auto" MaxHeight="250" RowHeight="26" SelectionUnit="FullRow" BorderBrush="{StaticResource DarkGrayBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding MinInkUptake}" Margin="0 10 0 20"> - <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> - <Setter Property="FontSize" Value="14"/> - </Style> - </DataGrid.CellStyle> - <DataGrid.Columns> - <DataGridTemplateColumn Header="Min Ink Uptake" Width="1*"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <Border BorderThickness="0" Background="{Binding FactorColor, Converter={StaticResource ColorNameToBrushConverter}}"> - <mahapps:NumericUpDown Minimum="0" Maximum="500" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" - HideUpDownButtons="True" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding InkNlCm,Mode=TwoWay}" FontSize="14"></mahapps:NumericUpDown> - </Border> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <mahapps:DataGridNumericUpDownColumn Header="L" Minimum="0" Maximum="100" Binding="{Binding L}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource FactorCellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/> - <mahapps:DataGridNumericUpDownColumn Header="A" Minimum="-128" Maximum="127" Binding="{Binding A}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource FactorCellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" /> - <mahapps:DataGridNumericUpDownColumn Header="B" Minimum="-128" Maximum="127" Binding="{Binding B}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource FactorCellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" /> - </DataGrid.Columns> - </DataGrid> + <DataGrid x:Name="InkUptakeGrid" HorizontalAlignment="Left" VerticalScrollBarVisibility ="Auto" MaxHeight="250" RowHeight="26" SelectionUnit="FullRow" BorderBrush="{StaticResource DarkGrayBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding ColorProcessInkUptakeData}" Margin="0 10 0 20"> + <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> + <Setter Property="FontSize" Value="14"/> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTemplateColumn Header="" Width="1*"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Border BorderThickness="0" > + <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10 0 0 0" Foreground="{StaticResource GrayBrush200}" Text="{Binding InkUptakeZoneType, Converter={StaticResource EnumToDescriptionConverter}}" FontSize="14"></TextBlock> - <DataGrid x:Name="MaxInkUptakeGrid" HorizontalAlignment="Left" VerticalScrollBarVisibility ="Auto" MaxHeight="250" RowHeight="26" SelectionUnit="FullRow" BorderBrush="{StaticResource DarkGrayBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding MaxInkUptake}" Margin="0 10 0 20"> - <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> - <Setter Property="FontSize" Value="14"/> - </Style> - </DataGrid.CellStyle> - <DataGrid.Columns> - <DataGridTemplateColumn Header="Max Ink Uptake" Width="1*"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <Border BorderThickness="0" Background="{Binding FactorColor, Converter={StaticResource ColorNameToBrushConverter}}"> - <mahapps:NumericUpDown Minimum="0" Maximum="500" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" - HideUpDownButtons="True" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding InkNlCm,Mode=TwoWay}" FontSize="14"></mahapps:NumericUpDown> - </Border> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <mahapps:DataGridNumericUpDownColumn Header="L" Minimum="0" Maximum="100" Binding="{Binding L}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource FactorCellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" /> - <mahapps:DataGridNumericUpDownColumn Header="A" Minimum="-128" Maximum="127" Binding="{Binding A}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource FactorCellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" /> - <mahapps:DataGridNumericUpDownColumn Header="B" Minimum="-128" Maximum="127" Binding="{Binding B}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource FactorCellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" /> - </DataGrid.Columns> - </DataGrid> - </StackPanel> + </Border> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTemplateColumn Header="Value" Width="1*"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Border BorderThickness="0" > + <mahapps:NumericUpDown Minimum="10" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" + HideUpDownButtons="True" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding InkValue, Converter={StaticResource NumericFieldConverter} ,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14"></mahapps:NumericUpDown> + </Border> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <!--<mahapps:DataGridNumericUpDownColumn Header="Value" Minimum="10" Maximum="1000" Binding="{Binding InkValue}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource FactorCellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>--> + + </DataGrid.Columns> + </DataGrid> + </StackPanel> </DockPanel> </Grid> 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 2d37fcc3e..53ed5dc2c 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 @@ -371,9 +371,7 @@ <DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <mahapps:NumericUpDown HasDecimals="True" Minimum="1" Maximum="5" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding Gs100Min,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="1" Maximum="5" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding Gs100Max,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <mahapps:NumericUpDown HasDecimals="True" Minimum="1" Maximum="5" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="False" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding Gs100,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F1}" HorizontalAlignment="Right" MinWidth="26" Interval="0.5"/> </StackPanel> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -385,9 +383,7 @@ <DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <mahapps:NumericUpDown HasDecimals="True" Minimum="1" Maximum="5" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding Gs200Min,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="1" Maximum="5" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding Gs200Max,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <mahapps:NumericUpDown HasDecimals="True" Minimum="1" Maximum="5" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="False" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding Gs200,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F1}" HorizontalAlignment="Right" MinWidth="26" Interval="0.5"/> </StackPanel> </DataTemplate> </DataGridTemplateColumn.CellTemplate> |
