From 9a5dd17b56d9727a03a5311b9488a1fa85e16a25 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 25 May 2022 14:01:31 +0300 Subject: PPC. Display two decimal numbers for Lab and CMYK values Related Work Items: #6526 --- .../Dialogs/ColorSelectionView.xaml | 4 ++-- .../Dialogs/ColorSelectionViewVM.cs | 2 ++ .../Modules/Tango.PPC.JobsV2/Views/JobView.xaml | 22 +++++++++++----------- .../TouchColorPickerControl.cs | 8 ++++---- .../TouchColorPickerControl.xaml | 2 +- 5 files changed, 20 insertions(+), 18 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml index c4d35c1b7..4e5315957 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml @@ -410,7 +410,7 @@ BorderBrush="{StaticResource TangoKeyboardKeyDarkTextBrush}" PreviewTouchDown="LABPicker_PreviewTouchDown" PreviewMouseDown="LABPicker_OnPreviewMouseDown" - L="{Binding SelectedBrushStop.L, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" A="{Binding SelectedBrushStop.A, Mode=TwoWay}" B="{ Binding SelectedBrushStop.B, Mode=TwoWay}" + L="{Binding SelectedBrushStop.L, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat=0.##}" A="{Binding SelectedBrushStop.A, Mode=TwoWay, StringFormat=0.##}" B="{ Binding SelectedBrushStop.B, Mode=TwoWay, StringFormat=0.##}" /> @@ -462,7 +462,7 @@ Margin="0 0 0 0" MinWidth="200" BorderBrush="{StaticResource TangoKeyboardKeyDarkTextBrush}" - Cyan="{Binding SelectedBrushStop.Cyan, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Magenta="{Binding SelectedBrushStop.Magenta, Mode=TwoWay}" Yellow="{ Binding SelectedBrushStop.Yellow, Mode=TwoWay}" Key="{ Binding SelectedBrushStop.Black, Mode=TwoWay}" + Cyan="{Binding SelectedBrushStop.Cyan, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,StringFormat=0.##}" Magenta="{Binding SelectedBrushStop.Magenta, Mode=TwoWay, StringFormat=0.##}" Yellow="{ Binding SelectedBrushStop.Yellow, Mode=TwoWay, StringFormat=0.##}" Key="{ Binding SelectedBrushStop.Black, Mode=TwoWay, StringFormat=0.##}" MaxCyanValue="{Binding MaxCyanValue,UpdateSourceTrigger=PropertyChanged}" MaxMagentaValue="{Binding MaxMagentaValue, UpdateSourceTrigger=PropertyChanged}" MaxYellowValue="{Binding MaxYellowValue, UpdateSourceTrigger=PropertyChanged}" diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs index cd51334a5..b9b272d40 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs @@ -952,11 +952,13 @@ namespace Tango.PPC.Jobs.Dialogs private void VectorFineTuningDialogCanceled() { VectorFineTuningDialogVM.Canceled -= VectorFineTuningDialogCanceled; + VectorFineTuningDialogVM.Accepted -= VectorFineTuningDialogAccepted; IsOpenVectorFineTuningDialog = false; } private void VectorFineTuningDialogAccepted() { + VectorFineTuningDialogVM.Canceled -= VectorFineTuningDialogCanceled; VectorFineTuningDialogVM.Accepted -= VectorFineTuningDialogAccepted; IsOpenVectorFineTuningDialog = false; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml index 51d0d80e6..884399f95 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml @@ -141,26 +141,26 @@ - - + + - - + + - - + + - - + + @@ -170,19 +170,19 @@ - + - + - + diff --git a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs index 4b494491e..4f8082413 100644 --- a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs +++ b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs @@ -76,7 +76,7 @@ namespace Tango.Touch.Controls public void OnMaxPropertyChanged() { if(_colorPickerNumericUpDown != null) - _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 1, MidpointRounding.AwayFromZero); + _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 2, MidpointRounding.AwayFromZero); if(_colorPickerSlider != null) _colorPickerSlider.Maximum = MaxValue; @@ -203,8 +203,8 @@ namespace Tango.Touch.Controls if (_colorPickerNumericUpDown != null) { _colorPickerNumericUpDown.MinValue = MinValue; - _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 1, MidpointRounding.AwayFromZero); - _colorPickerNumericUpDown.Value = Math.Round( ColorValue, 1, MidpointRounding.AwayFromZero); + _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 2, MidpointRounding.AwayFromZero); + _colorPickerNumericUpDown.Value = Math.Round( ColorValue, 2, MidpointRounding.AwayFromZero); _colorPickerNumericUpDown.ColorNumberChanged += ColorPickerNumber_ValueChanged; } } @@ -222,7 +222,7 @@ namespace Tango.Touch.Controls } public void ColorPickerSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) { - var newvalue = Math.Round(e.NewValue, 0, MidpointRounding.AwayFromZero); + var newvalue = Math.Round(e.NewValue, 2, MidpointRounding.AwayFromZero); if (_colorPickerNumericUpDown != null && _colorPickerNumericUpDown.Value != newvalue) { _colorPickerNumericUpDown.SetValueAnotherControl(newvalue); diff --git a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml index 92cc2be65..503b9188a 100644 --- a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml +++ b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml @@ -23,7 +23,7 @@ - +