123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- namespace OINA.Extender.WPF.Testharness
- {
- using System.Windows;
- using System.Windows.Media;
- using OINA.Extender.Controls.Styles;
- /// <summary>
- /// Interaction logic for ElementComboVisualSettings.xaml
- /// </summary>
- public partial class BCDialogVisualSettings
- {
- /// <summary>
- /// Gets or sets the header font color
- /// </summary>
- public Color HeaderFontColor
- {
- get { return BrightnessContrastDialogStyle.HeaderFontColor; }
- set { BrightnessContrastDialogStyle.HeaderFontColor = value; }
- }
- /// <summary>
- /// Gets or sets the header font size
- /// </summary>
- public double HeaderFontSize
- {
- get { return BrightnessContrastDialogStyle.HeaderFontSize; }
- set { BrightnessContrastDialogStyle.HeaderFontSize = value; }
- }
- /// <summary>
- /// Gets or sets the header font family
- /// </summary>
- public FontFamily HeaderFontFamily
- {
- get { return BrightnessContrastDialogStyle.HeaderFontFamily; }
- set { BrightnessContrastDialogStyle.HeaderFontFamily = value; }
- }
- /// <summary>
- /// Gets or sets the header font style
- /// </summary>
- public FontStyle HeaderFontStyle
- {
- get { return BrightnessContrastDialogStyle.HeaderFontStyle; }
- set { BrightnessContrastDialogStyle.HeaderFontStyle = value; }
- }
- /// <summary>
- /// Gets or sets the color of the generic control background.
- /// </summary>
- public Color GenericControlBackgroundColor
- {
- get { return BrightnessContrastDialogStyle.GenericControlBackgroundColor; }
- set { BrightnessContrastDialogStyle.GenericControlBackgroundColor = value; }
- }
- /// <summary>
- /// Gets or sets the color of the dialog background.
- /// </summary>
- public Color BackgroundColor
- {
- get { return BrightnessContrastDialogStyle.BrightnessContrastDialogBackgroundColor; }
- set { BrightnessContrastDialogStyle.BrightnessContrastDialogBackgroundColor = value; }
- }
- /// <summary>
- /// Gets or sets the color of the lines in the BC Combo
- /// </summary>
- public Color AxisTicksColor
- {
- get { return BrightnessContrastDialogStyle.AxisTicksColor; }
- set { BrightnessContrastDialogStyle.AxisTicksColor = value; }
- }
- /// <summary>
- /// Gets or sets the color of the lines in the BC Combo
- /// </summary>
- public Color PlotterLineColor
- {
- get { return BrightnessContrastDialogStyle.PlotterLineColor; }
- set { BrightnessContrastDialogStyle.PlotterLineColor = value; }
- }
- /// <summary>
- /// Gets or sets the color of the plotter background.
- /// </summary>
- public Color PlotterBackgroundColor
- {
- get { return BrightnessContrastDialogStyle.PlotterBackgroundColor; }
- set { BrightnessContrastDialogStyle.PlotterBackgroundColor = value; }
- }
- /// <summary>
- /// Gets or sets the color of the lines in the BC Combo
- /// </summary>
- public Color ComboLineColor
- {
- get { return BrightnessContrastDialogStyle.ComboLineColor; }
- set { BrightnessContrastDialogStyle.ComboLineColor = value; }
- }
- /// <summary>
- /// Gets or sets the color of the axes of the plotter
- /// </summary>
- /// <value>
- /// The color of the axes of the plotter
- /// </value>
- public Color AxisMarkersColor
- {
- get { return BrightnessContrastDialogStyle.AxisMarkersColor; }
- set { BrightnessContrastDialogStyle.AxisMarkersColor = value; }
- }
- /// <summary>
- /// Initializes a new instance of the <see cref="BCDialogVisualSettings"/> class.
- /// </summary>
- public BCDialogVisualSettings()
- {
- this.InitializeComponent();
- this.DataContext = this;
- this.UpdateComboBoxes();
- }
- /// <summary>
- /// Handles the Click event of the ResetStylesButton control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
- private void ResetStyleButton_Click(object sender, RoutedEventArgs e)
- {
- BrightnessContrastDialogStyle.ResetStyles();
- this.UpdateComboBoxes();
- }
- /// <summary>
- /// Sets the combo boxes to have the values from the dictionary
- /// </summary>
- private void UpdateComboBoxes()
- {
- this.HeaderFontColorCombo.SelectedColor = this.HeaderFontColor;
- this.HeaderFontSizeCombo.SelectedValue = this.HeaderFontSize;
- this.HeaderFontFamilyCombo.SelectedValue = this.HeaderFontFamily;
- this.HeaderFontStyleCombo.SelectedValue = this.HeaderFontStyle;
- this.BackgroundColorCombo.SelectedColor = this.BackgroundColor;
- this.ControlBackgroundColorCombo.SelectedColor = this.GenericControlBackgroundColor;
- this.PlotterBackgroundColorCombo.SelectedColor = this.PlotterBackgroundColor;
- this.ComboLineColorCombo.SelectedColor = this.ComboLineColor;
- this.PlotterAxisColorCombo.SelectedColor = this.AxisMarkersColor;
- this.PlotterAxisTicksColorCombo.SelectedColor = this.AxisTicksColor;
- this.PlotterLineColorCombo.SelectedColor = this.PlotterLineColor;
- }
- }
- }
|