diff options
5 files changed, 20 insertions, 18 deletions
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.##}" /> </Grid> @@ -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 @@ <UniformGrid Rows="1" Columns="4" Height="30" > <StackPanel Orientation="Horizontal"> <TextBlock Text="C" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/> - <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42"> - <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Cyan, StringFormat=0.0}" ></TextBlock> + <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="48"> + <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Cyan, StringFormat=0.##}" ></TextBlock> </Border> </StackPanel> <StackPanel Orientation="Horizontal" Margin="0 0 0 0"> <TextBlock Text="M" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/> - <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42"> - <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Magenta, StringFormat=0.0}" ></TextBlock> + <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="48"> + <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Magenta, StringFormat=0.##}" ></TextBlock> </Border> </StackPanel> <StackPanel Orientation="Horizontal" Margin="10 0 0 0"> <TextBlock Text="Y" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/> - <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42"> - <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Yellow, StringFormat=0.0}" ></TextBlock> + <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="48"> + <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Yellow, StringFormat=0.##}" ></TextBlock> </Border> </StackPanel> <StackPanel Orientation="Horizontal" Margin="10 0 0 0"> <TextBlock Text="K" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/> - <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42"> - <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Black, StringFormat=0.0}"></TextBlock> + <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="48"> + <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding Black, StringFormat=0.##}"></TextBlock> </Border> </StackPanel> </UniformGrid> @@ -170,19 +170,19 @@ <UniformGrid Rows="1" Columns="3" Height="30" MinWidth="150"> <StackPanel Orientation="Horizontal"> <TextBlock Text="L" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/> - <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42"> + <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="52"> <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding BestMatchL, StringFormat=0.##}" ></TextBlock> </Border> </StackPanel> <StackPanel Orientation="Horizontal" Margin="5 0 0 0"> <TextBlock Text="a" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/> - <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42"> + <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="52"> <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding BestMatchA, StringFormat=0.##}" ></TextBlock> </Border> </StackPanel> <StackPanel Orientation="Horizontal" Margin="10 0 0 0"> <TextBlock Text="b" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/> - <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42"> + <Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="52"> <TextBlock Style="{StaticResource SliderGreyTextStyle}" Text="{Binding BestMatchB, StringFormat=0.##}" ></TextBlock> </Border> </StackPanel> 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<double> 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 @@ </Grid.ColumnDefinitions> <Grid Grid.Row="0"> <TextBlock FontSize="{StaticResource TangoComboBoxItemFontSize}" TextBlock.Text="{Binding ColorPickerText, RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}}" HorizontalAlignment="Left" Margin="6 0 0 0" FontWeight="SemiBold" VerticalAlignment="Center" /> - <local:TouchNumericUpDownConrol x:Name="PART_ColorPickerNumericUpDown" HorizontalAlignment="Right" BorderThickness="0.8" BorderBrush="{TemplateBinding BorderBrush}" Margin="0 0 5 0" MaxValue="{Binding RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}, Path=MaxValue, StringFormat='0.##'}"/> + <local:TouchNumericUpDownConrol x:Name="PART_ColorPickerNumericUpDown" HorizontalAlignment="Right" BorderThickness="0.8" BorderBrush="{TemplateBinding BorderBrush}" Margin="0 0 5 0" MaxValue="{Binding RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}, Path=MaxValue, StringFormat='0.##'}" NumericPartWidth="68"/> </Grid> <local:TouchColorPickerSlider x:Name="PART_ColorPickerSlider" Grid.Row="1" Margin=" 0 10 0 0" Background="{TemplateBinding Background}" ThumbHeightInside ="{Binding RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}, Path=ThumbHeightInside}" |
