namespace OINA.Extender.WPF.Testharness { using System.Windows; using System.Windows.Media; using OINA.Extender.Controls; using OINA.Extender.Controls.Styles; /// /// Interaction logic for SpectrumViewerVisualSettings.xaml /// public partial class SpectrumViewerVisualSettings : Window { /// /// Gets or sets the color of the included element. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color SpectrumBackgroundColor { get { return SpectrumViewerStyle.SpectrumBackgroundColor; } set { SpectrumViewerStyle.SpectrumBackgroundColor = value; } } /// /// Gets or sets the color of Spectrum Foreground Color. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color SpectrumLabelTextColor { get { return SpectrumViewerStyle.SpectrumLabelTextColor; } set { SpectrumViewerStyle.SpectrumLabelTextColor = value; } } /// /// Gets or sets the color of Axis Foreground Color. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color AxisTextColor { get { return SpectrumViewerStyle.AxisTextColor; } set { SpectrumViewerStyle.AxisTextColor = value; } } /// /// Gets or sets a value indicating whether the axis lines are visible. /// /// /// true if the axis lines are visible; otherwise, false. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public bool IsAxisLinesVisible { get { return SpectrumViewerStyle.IsAxisLineVisible; } set { SpectrumViewerStyle.IsAxisLineVisible = value; } } /// /// Gets or sets the color of Axis Tick Brush Color. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color AxisColor { get { return SpectrumViewerStyle.AxisColor; } set { SpectrumViewerStyle.AxisColor = value; } } /// /// Gets or sets the color of Spectrum Visual Fill Color. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color SpectrumVisualFillColor { get { return SpectrumViewerStyle.SpectrumVisualFillColor; } set { SpectrumViewerStyle.SpectrumVisualFillColor = value; } } /// /// Gets or sets the color of Spectrum Label Chrome Border Brush Color. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color SpectrumPeakLabelBorderColor { get { return SpectrumViewerStyle.SpectrumPeakLabelBorderColor; } set { SpectrumViewerStyle.SpectrumPeakLabelBorderColor = value; } } /// /// Gets or sets the color of Spectrum Label Chrome Background Color. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color SpectrumPeakLabelBackgroundColor { get { return SpectrumViewerStyle.SpectrumPeakLabelBackgroundColor; } set { SpectrumViewerStyle.SpectrumPeakLabelBackgroundColor = value; } } /// /// Gets or sets the color of Spectrum Label View Foreground Color. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color SpectrumPeakLabelTextColor { get { return SpectrumViewerStyle.SpectrumPeakLabelTextColor; } set { SpectrumViewerStyle.SpectrumPeakLabelTextColor = value; } } /// /// Gets or sets the color of Main Spectrum Label BackgroundColor. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color AlternatePeakLabelBackgroundColor { get { return SpectrumViewerStyle.AlternatePeakLabelBackground; } set { SpectrumViewerStyle.AlternatePeakLabelBackground = value; } } /// /// Gets or sets the color of Main Spectrum Label ForegroundColor. /// /// /// The color of the included element. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")] public Color AlternatePeakLabelTextColor { get { return SpectrumViewerStyle.AlternatePeakLabelTextColor; } set { SpectrumViewerStyle.AlternatePeakLabelTextColor = value; } } /// /// Gets or sets the FontSizes of Axis. /// /// /// The FontSize of Axis. /// public double AxisFontSizes { get { return SpectrumViewerStyle.AxisFontSize; } set { SpectrumViewerStyle.AxisFontSize = value; } } /// /// Gets or sets the Label Margin of Axis. /// /// /// The Label Margin of Axis. /// public Thickness AxisLabelMargin { get { return SpectrumViewerStyle.AxisLabelMargin; } set { SpectrumViewerStyle.AxisLabelMargin = value; } } /// /// Gets or sets the Major Tick Length of Axis. /// /// /// The Major Tick Length of Axis. /// public double AxisMajorTickLength { get { return SpectrumViewerStyle.AxisMajorTickLength; } set { SpectrumViewerStyle.AxisMajorTickLength = value; } } /// /// Gets or sets the Minor Tick Length of Axis. /// /// /// The Minor Tick Length of Axis. /// public double AxisMinorTickLength { get { return SpectrumViewerStyle.AxisMinorTickLength; } set { SpectrumViewerStyle.AxisMinorTickLength = value; } } /// /// Gets or sets the SubMinor Tick Length of Axis. /// /// /// The SubMinor Tick Length of Axis. /// public double AxisSubMinorTickLength { get { return SpectrumViewerStyle.AxisSubMinorTickLength; } set { SpectrumViewerStyle.AxisSubMinorTickLength = value; } } /// /// Gets or sets the line thickness of Axis. /// /// /// The line thickness of Axis. /// public double AxisLineThickness { get { return SpectrumViewerStyle.AxisLineThickness; } set { SpectrumViewerStyle.AxisLineThickness = value; } } /// /// Gets or sets the color of the quant results background. /// /// /// The color of the quant results background. /// public Color QuantResultsBackgroundColor { get { return SpectrumViewerStyle.QuantResultsBackgroundColor; } set { SpectrumViewerStyle.QuantResultsBackgroundColor = value; } } /// /// Gets or sets the quant results background opacity. /// /// /// The quant results background opacity. /// public double QuantResultsBackgroundOpacity { get { return SpectrumViewerStyle.QuantResultsBackgroundOpacity; } set { SpectrumViewerStyle.QuantResultsBackgroundOpacity = value; } } /// /// Gets or sets a value indicating whether to show the quant results. /// /// /// true if showing the quant results; otherwise, false. /// public bool ShowQuantResults { get { return SpectrumViewerStyle.ShowQuantResults; } set { SpectrumViewerStyle.ShowQuantResults = value; } } /// /// Gets or sets the quant results format. /// /// /// The quant results format. /// public QuantResultFormat QuantResultsFormat { get { return SpectrumViewerStyle.QuantResultsFormat; } set { SpectrumViewerStyle.QuantResultsFormat = value; } } /// /// Gets or sets the quant results category. /// /// /// The quant results category. /// public QuantResultCategory QuantResultsCategory { get { return SpectrumViewerStyle.QuantResultsCategory; } set { SpectrumViewerStyle.QuantResultsCategory = value; } } /// /// SpectrumViewerVisualSettings /// public SpectrumViewerVisualSettings() { this.InitializeComponent(); this.DataContext = this; this.UpdateComboBoxes(); } /// /// Handles the Click event of the ResetStyle Button. /// /// The source of the event. /// The instance containing the event data. private void ResetStyle_click(object sender, RoutedEventArgs e) { SpectrumViewerStyle.ResetStyles(); this.UpdateComboBoxes(); } /// /// UpdateComboBoxes /// private void UpdateComboBoxes() { this.cbSpectrumBackgroundColor.SelectedColor = SpectrumViewerStyle.SpectrumBackgroundColor; this.cbSpectrumForegroundColor.SelectedColor = SpectrumViewerStyle.SpectrumLabelTextColor; this.cbAxisTextColor.SelectedColor = SpectrumViewerStyle.AxisTextColor; this.cbAxisLinesVisible.IsChecked = SpectrumViewerStyle.IsAxisLineVisible; this.cbAxisColor.SelectedColor = SpectrumViewerStyle.AxisColor; this.cbSpectrumVisualFillColor.SelectedColor = SpectrumViewerStyle.SpectrumVisualFillColor; this.cbSpectrumLabelChromeBorderBrushColor.SelectedColor = SpectrumViewerStyle.SpectrumPeakLabelBorderColor; this.cbSpectrumLabelChromeBackgroundColor.SelectedColor = SpectrumViewerStyle.SpectrumPeakLabelBackgroundColor; this.cbSpectrumLabelViewForegroundColor.SelectedColor = SpectrumViewerStyle.SpectrumPeakLabelTextColor; this.cbMainSpectrumLabelBackgroundColor.SelectedColor = SpectrumViewerStyle.AlternatePeakLabelBackground; this.cbMainSpectrumLabelForegroundColor.SelectedColor = SpectrumViewerStyle.AlternatePeakLabelTextColor; this.cbAxisFontSize.SelectedValue = SpectrumViewerStyle.AxisFontSize; this.cbAxisLabelMargin.SelectedValue = SpectrumViewerStyle.AxisLabelMargin; this.cbAxisMajorTickLength.SelectedValue = SpectrumViewerStyle.AxisMajorTickLength; this.cbAxisMinorTickLength.SelectedValue = SpectrumViewerStyle.AxisMinorTickLength; this.cbAxisSubMinorTickLength.SelectedValue = SpectrumViewerStyle.AxisSubMinorTickLength; this.cbAxisLineThickness.SelectedValue = SpectrumViewerStyle.AxisLineThickness; this.cbQuantResultsBackgroundColor.SelectedColor = SpectrumViewerStyle.QuantResultsBackgroundColor; this.cbQuantResultsBackgroundOpacity.SelectedValue = SpectrumViewerStyle.QuantResultsBackgroundOpacity; this.cbQuantResultsFormat.SelectedValue = SpectrumViewerStyle.QuantResultsFormat; this.cbQuantResultsCategory.SelectedValue = SpectrumViewerStyle.QuantResultsCategory; this.cbQuantResultsVisible.IsChecked = SpectrumViewerStyle.ShowQuantResults; } } }