123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492 |
- namespace OINA.Extender.WPF.Testharness
- {
- using System.Windows;
- using System.Windows.Media;
- using OINA.Extender.Controls;
- using OINA.Extender.Controls.Styles;
- /// <summary>
- /// Interaction logic for SpectrumViewerVisualSettings.xaml
- /// </summary>
- public partial class SpectrumViewerVisualSettings : Window
- {
- /// <summary>
- /// Gets or sets the color of the included element.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color SpectrumBackgroundColor
- {
- get
- {
- return SpectrumViewerStyle.SpectrumBackgroundColor;
- }
- set
- {
- SpectrumViewerStyle.SpectrumBackgroundColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Foreground Color.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color SpectrumLabelTextColor
- {
- get
- {
- return SpectrumViewerStyle.SpectrumLabelTextColor;
- }
- set
- {
- SpectrumViewerStyle.SpectrumLabelTextColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Axis Foreground Color.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color AxisTextColor
- {
- get
- {
- return SpectrumViewerStyle.AxisTextColor;
- }
- set
- {
- SpectrumViewerStyle.AxisTextColor = value;
- }
- }
- /// <summary>
- /// Gets or sets a value indicating whether the axis lines are visible.
- /// </summary>
- /// <value>
- /// <c>true</c> if the axis lines are visible; otherwise, <c>false</c>.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public bool IsAxisLinesVisible
- {
- get
- {
- return SpectrumViewerStyle.IsAxisLineVisible;
- }
- set
- {
- SpectrumViewerStyle.IsAxisLineVisible = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Axis Tick Brush Color.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color AxisColor
- {
- get
- {
- return SpectrumViewerStyle.AxisColor;
- }
- set
- {
- SpectrumViewerStyle.AxisColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Visual Fill Color.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color SpectrumVisualFillColor
- {
- get
- {
- return SpectrumViewerStyle.SpectrumVisualFillColor;
- }
- set
- {
- SpectrumViewerStyle.SpectrumVisualFillColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Label Chrome Border Brush Color.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color SpectrumPeakLabelBorderColor
- {
- get
- {
- return SpectrumViewerStyle.SpectrumPeakLabelBorderColor;
- }
- set
- {
- SpectrumViewerStyle.SpectrumPeakLabelBorderColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Label Chrome Background Color.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color SpectrumPeakLabelBackgroundColor
- {
- get
- {
- return SpectrumViewerStyle.SpectrumPeakLabelBackgroundColor;
- }
- set
- {
- SpectrumViewerStyle.SpectrumPeakLabelBackgroundColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Label View Foreground Color.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color SpectrumPeakLabelTextColor
- {
- get
- {
- return SpectrumViewerStyle.SpectrumPeakLabelTextColor;
- }
- set
- {
- SpectrumViewerStyle.SpectrumPeakLabelTextColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Main Spectrum Label BackgroundColor.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color AlternatePeakLabelBackgroundColor
- {
- get
- {
- return SpectrumViewerStyle.AlternatePeakLabelBackground;
- }
- set
- {
- SpectrumViewerStyle.AlternatePeakLabelBackground = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of Main Spectrum Label ForegroundColor.
- /// </summary>
- /// <value>
- /// The color of the included element.
- /// </value>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Ingore")]
- public Color AlternatePeakLabelTextColor
- {
- get
- {
- return SpectrumViewerStyle.AlternatePeakLabelTextColor;
- }
- set
- {
- SpectrumViewerStyle.AlternatePeakLabelTextColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the FontSizes of Axis.
- /// </summary>
- /// <value>
- /// The FontSize of Axis.
- /// </value>
- public double AxisFontSizes
- {
- get
- {
- return SpectrumViewerStyle.AxisFontSize;
- }
- set
- {
- SpectrumViewerStyle.AxisFontSize = value;
- }
- }
- /// <summary>
- /// Gets or sets the Label Margin of Axis.
- /// </summary>
- /// <value>
- /// The Label Margin of Axis.
- /// </value>
- public Thickness AxisLabelMargin
- {
- get
- {
- return SpectrumViewerStyle.AxisLabelMargin;
- }
- set
- {
- SpectrumViewerStyle.AxisLabelMargin = value;
- }
- }
- /// <summary>
- /// Gets or sets the Major Tick Length of Axis.
- /// </summary>
- /// <value>
- /// The Major Tick Length of Axis.
- /// </value>
- public double AxisMajorTickLength
- {
- get
- {
- return SpectrumViewerStyle.AxisMajorTickLength;
- }
- set
- {
- SpectrumViewerStyle.AxisMajorTickLength = value;
- }
- }
- /// <summary>
- /// Gets or sets the Minor Tick Length of Axis.
- /// </summary>
- /// <value>
- /// The Minor Tick Length of Axis.
- /// </value>
- public double AxisMinorTickLength
- {
- get
- {
- return SpectrumViewerStyle.AxisMinorTickLength;
- }
- set
- {
- SpectrumViewerStyle.AxisMinorTickLength = value;
- }
- }
- /// <summary>
- /// Gets or sets the SubMinor Tick Length of Axis.
- /// </summary>
- /// <value>
- /// The SubMinor Tick Length of Axis.
- /// </value>
- public double AxisSubMinorTickLength
- {
- get
- {
- return SpectrumViewerStyle.AxisSubMinorTickLength;
- }
- set
- {
- SpectrumViewerStyle.AxisSubMinorTickLength = value;
- }
- }
- /// <summary>
- /// Gets or sets the line thickness of Axis.
- /// </summary>
- /// <value>
- /// The line thickness of Axis.
- /// </value>
- public double AxisLineThickness
- {
- get
- {
- return SpectrumViewerStyle.AxisLineThickness;
- }
- set
- {
- SpectrumViewerStyle.AxisLineThickness = value;
- }
- }
- /// <summary>
- /// Gets or sets the color of the quant results background.
- /// </summary>
- /// <value>
- /// The color of the quant results background.
- /// </value>
- public Color QuantResultsBackgroundColor
- {
- get
- {
- return SpectrumViewerStyle.QuantResultsBackgroundColor;
- }
- set
- {
- SpectrumViewerStyle.QuantResultsBackgroundColor = value;
- }
- }
- /// <summary>
- /// Gets or sets the quant results background opacity.
- /// </summary>
- /// <value>
- /// The quant results background opacity.
- /// </value>
- public double QuantResultsBackgroundOpacity
- {
- get
- {
- return SpectrumViewerStyle.QuantResultsBackgroundOpacity;
- }
- set
- {
- SpectrumViewerStyle.QuantResultsBackgroundOpacity = value;
- }
- }
- /// <summary>
- /// Gets or sets a value indicating whether to show the quant results.
- /// </summary>
- /// <value>
- /// <c>true</c> if showing the quant results; otherwise, <c>false</c>.
- /// </value>
- public bool ShowQuantResults
- {
- get
- {
- return SpectrumViewerStyle.ShowQuantResults;
- }
- set
- {
- SpectrumViewerStyle.ShowQuantResults = value;
- }
- }
- /// <summary>
- /// Gets or sets the quant results format.
- /// </summary>
- /// <value>
- /// The quant results format.
- /// </value>
- public QuantResultFormat QuantResultsFormat
- {
- get
- {
- return SpectrumViewerStyle.QuantResultsFormat;
- }
- set
- {
- SpectrumViewerStyle.QuantResultsFormat = value;
- }
- }
- /// <summary>
- /// Gets or sets the quant results category.
- /// </summary>
- /// <value>
- /// The quant results category.
- /// </value>
- public QuantResultCategory QuantResultsCategory
- {
- get
- {
- return SpectrumViewerStyle.QuantResultsCategory;
- }
- set
- {
- SpectrumViewerStyle.QuantResultsCategory = value;
- }
- }
- /// <summary>
- /// SpectrumViewerVisualSettings
- /// </summary>
- public SpectrumViewerVisualSettings()
- {
- this.InitializeComponent();
- this.DataContext = this;
- this.UpdateComboBoxes();
- }
- /// <summary>
- /// Handles the Click event of the ResetStyle Button.
- /// </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 ResetStyle_click(object sender, RoutedEventArgs e)
- {
- SpectrumViewerStyle.ResetStyles();
- this.UpdateComboBoxes();
- }
- /// <summary>
- /// UpdateComboBoxes
- /// </summary>
- 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;
- }
- }
- }
|