123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557 |
- namespace OINA.Extender.Testharness
- {
- using System;
- using System.Drawing;
- using System.Windows;
- using System.Windows.Forms;
- using OINA.Extender.Controls;
- using OINA.Extender.Controls.Styles;
- /// <summary>
- /// SpectrumViewer Visual Settings form
- /// </summary>
- public partial class SpectrumViewerVisualSettings : Form
- {
- /// <summary>
- /// Gets or sets the color of the included element.
- /// </summary>
- private static Color SpectrumBackgroundColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.SpectrumBackgroundColor); }
- set { SpectrumViewerStyle.SpectrumBackgroundColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of the spectrum text.
- /// </summary>
- private static Color SpectrumTextColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.SpectrumLabelTextColor); }
- set { SpectrumViewerStyle.SpectrumLabelTextColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of Axis Foreground Color.
- /// </summary>
- private static Color AxisTextColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.AxisTextColor); }
- set { SpectrumViewerStyle.AxisTextColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets a value indicating whether axis lines are shown.
- /// </summary>
- private static bool IsAxisLinesShown
- {
- get { return SpectrumViewerStyle.IsAxisLineVisible; }
- set { SpectrumViewerStyle.IsAxisLineVisible = value; }
- }
- /// <summary>
- /// Gets or sets the color of Axis Tick Brush Color.
- /// </summary>
- private static Color AxisColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.AxisColor); }
- set { SpectrumViewerStyle.AxisColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Visual Fill Color.
- /// </summary>
- private static Color SpectrumVisualFillColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.SpectrumVisualFillColor); }
- set { SpectrumViewerStyle.SpectrumVisualFillColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Label Chrome Border Brush Color.
- /// </summary>
- private static Color PeakLabelBorderColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.SpectrumPeakLabelBorderColor); }
- set { SpectrumViewerStyle.SpectrumPeakLabelBorderColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Label Chrome Background Color.
- /// </summary>
- private static Color PeakLabelBackgroundColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.SpectrumPeakLabelBackgroundColor); }
- set { SpectrumViewerStyle.SpectrumPeakLabelBackgroundColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of Spectrum Label View Foreground Color.
- /// </summary>
- private static Color PeakLabelTextColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.SpectrumPeakLabelTextColor); }
- set { SpectrumViewerStyle.SpectrumPeakLabelTextColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of Main Spectrum Label BackgroundColor.
- /// </summary>
- private static Color AlternatePeakLabelBackgroundColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.AlternatePeakLabelBackground); }
- set { SpectrumViewerStyle.AlternatePeakLabelBackground = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of Main Spectrum Label ForegroundColor.
- /// </summary>
- private static Color AlternatePeakLabelTextColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.AlternatePeakLabelTextColor); }
- set { SpectrumViewerStyle.AlternatePeakLabelTextColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets the color of the quant results background.
- /// </summary>
- private static Color QuantResultsBackgroundColor
- {
- get { return ColorConverter.Convert(SpectrumViewerStyle.QuantResultsBackgroundColor); }
- set { SpectrumViewerStyle.QuantResultsBackgroundColor = ColorConverter.Convert(value); }
- }
- /// <summary>
- /// Gets or sets a value indicating whether the quant results is shown.
- /// </summary>
- private static bool ShowQuantResults
- {
- get { return SpectrumViewerStyle.ShowQuantResults; }
- set { SpectrumViewerStyle.ShowQuantResults = value; }
- }
- /// <summary>
- /// Initializes a new instance of the <see cref="SpectrumViewerVisualSettings"/> class.
- /// </summary>
- public SpectrumViewerVisualSettings()
- {
- this.InitializeComponent();
- this.InitializeComboBoxes();
- this.UpdateCombos();
- this.UpdatePanels();
- // *** Wire up events here manually or they all get fired when the combos are set with their initial values
- this.cbSpectrumBackgroundColor.SelectedValueChanged += this.CbSpectrumBackgroundColor_SelectedValueChanged;
- this.cbSpectrumTextColor.SelectedValueChanged += this.CbSpectrumForegroundColor_SelectedValueChanged;
- this.cbSpectrumVisualFillColor.SelectedValueChanged += this.CbSpectrumVisualFillColor_SelectedValueChanged;
- this.cbPeakLabelBorderColor.SelectedValueChanged += this.CbSpectrumLabelChromeBoderBrushColor_SelectedValueChanged;
- this.cbPeakLabelBackgroundColor.SelectedValueChanged += this.CbSpectrumLabelChromeBackgroundColor_SelectedValueChanged;
- this.cbPeakLabelTextColor.SelectedValueChanged += this.CbSpectrumLabelViewForegroundColor_SelectedValueChanged;
- this.cbAlternatePeakLabelBackgroundColor.SelectedValueChanged += this.CbAlternatePeakLabelBackgroundColor_SelectedValueChanged;
- this.cbAlternatePeakLabelTextColor.SelectedValueChanged += this.CbAlternatePeakLabelTextColor_SelectedValueChanged;
- this.cbAxisMinorTickLength.SelectedValueChanged += this.CbAxisMinorTickLength_SelectedValueChanged;
- this.cbAxisMajorThickLength.SelectedValueChanged += this.CbAxisMajorThickLength_SelectedValueChanged;
- this.cbAxisFontSize.SelectedValueChanged += this.CbAxisFontSize_SelectedValueChanged;
- this.cbAxisLabelMargin.SelectedValueChanged += this.CbAxisLabelMargin_SelectedValueChanged;
- this.cbAxisLineThickness.SelectedValueChanged += this.CbAxisLineThickness_SelectedValueChanged;
- this.cbAxisSubMinorTickLength.SelectedValueChanged += this.CbAxisSubMinorTickLength_SelectedValueChanged;
- this.cbAxisColor.SelectedValueChanged += this.CbAxisTickBrushColor_SelectedValueChanged;
- this.cbShowAxisLines.CheckedChanged += this.CbShowAxisLines_CheckedChanged;
- this.cbAxisTextColor.SelectedValueChanged += this.CbAxisForegroundColor_SelectedValueChanged;
- this.cbQuantResultsBackgroundColor.SelectedValueChanged += this.CbQuantResultsBackgroundColor_SelectedValueChanged;
- this.cbQuantResultsBackgroundOpacity.SelectedValueChanged += this.CbQuantResultsBackgroundOpacity_SelectedValueChanged;
- this.cbQuantResultsFormat.SelectedValueChanged += this.CbQuantResultsFormat_SelectedValueChanged;
- this.cbQuantResultsCategory.SelectedValueChanged += this.CbQuantResultsCategory_SelectedValueChanged;
- this.cbShowQuantResults.CheckedChanged += this.CbShowQuantResults_CheckedChanged;
- }
- /// <summary>
- /// Update combo boxs
- /// </summary>
- public void InitializeComboBoxes()
- {
- this.cbSpectrumBackgroundColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbSpectrumTextColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbSpectrumVisualFillColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbPeakLabelBorderColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbPeakLabelBackgroundColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbPeakLabelTextColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbAlternatePeakLabelBackgroundColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbAlternatePeakLabelTextColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbAxisTextColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbAxisColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbAxisFontSize.DataSource = new[] { 8d, 10d, 12d, 14d, 16d };
- this.cbAxisLabelMargin.DataSource = new[] { new Thickness(1, 0, 1, 0), new Thickness(2, 0, 2, 0), new Thickness(3, 0, 3, 0) };
- this.cbAxisMajorThickLength.DataSource = new[] { 4d, 6d, 8d };
- this.cbAxisLineThickness.DataSource = new[] { 0.5d, 1d, 2d };
- this.cbAxisSubMinorTickLength.DataSource = new[] { 1d, 3d, 5d };
- this.cbAxisMinorTickLength.DataSource = new[] { 3d, 4.5d, 6d };
- this.cbShowAxisLines.Checked = IsAxisLinesShown;
- this.cbQuantResultsBackgroundColor.DataSource = ColorConverter.GetSystemDrawingColors();
- this.cbQuantResultsBackgroundOpacity.DataSource = new[] { 0.25, 0.5, 0.75, 1.0 };
- this.cbQuantResultsFormat.DataSource = new[] { QuantResultFormat.Table, QuantResultFormat.Histogram };
- this.cbQuantResultsCategory.DataSource = new[] { QuantResultCategory.WeightPercent, QuantResultCategory.AtomicPercent, QuantResultCategory.OxidePercent };
- this.cbShowQuantResults.Checked = ShowQuantResults;
- }
- /// <summary>
- /// Updates the colour panels
- /// </summary>
- private void UpdatePanels()
- {
- this.spectrumBackgroundColorPanel.BackColor = SpectrumBackgroundColor;
- this.spectrumTextColorPanel.BackColor = SpectrumTextColor;
- this.axisForegroundColorPanel.BackColor = AxisTextColor;
- this.axisTickBrushColorPanel.BackColor = AxisColor;
- this.spectrumVisualFillColorPanel.BackColor = SpectrumVisualFillColor;
- this.spectrumLabelChromeBorderBrushColorPanel.BackColor = PeakLabelBorderColor;
- this.spectrumLabelChromeBackgroundColorPanel.BackColor = PeakLabelBackgroundColor;
- this.spectrumLabelViewForegroundColorPanel.BackColor = PeakLabelTextColor;
- this.alternatePeakLabelBackgroundColorPanel.BackColor = AlternatePeakLabelBackgroundColor;
- this.alternatePeakLabelTextColorPanel.BackColor = AlternatePeakLabelTextColor;
- this.quantResultsBackgroundColorPanel.BackColor = QuantResultsBackgroundColor;
- }
- /// <summary>
- /// Updates the combos to the set values
- /// </summary>
- private void UpdateCombos()
- {
- ColorConverter.PickColourComboItem(this.cbSpectrumBackgroundColor, SpectrumBackgroundColor);
- ColorConverter.PickColourComboItem(this.cbSpectrumTextColor, SpectrumTextColor);
- ColorConverter.PickColourComboItem(this.cbSpectrumVisualFillColor, SpectrumVisualFillColor);
- ColorConverter.PickColourComboItem(this.cbPeakLabelBorderColor, PeakLabelBorderColor);
- ColorConverter.PickColourComboItem(this.cbPeakLabelBackgroundColor, PeakLabelBackgroundColor);
- ColorConverter.PickColourComboItem(this.cbPeakLabelTextColor, PeakLabelTextColor);
- ColorConverter.PickColourComboItem(this.cbAlternatePeakLabelBackgroundColor, AlternatePeakLabelBackgroundColor);
- ColorConverter.PickColourComboItem(this.cbAlternatePeakLabelTextColor, AlternatePeakLabelTextColor);
- ColorConverter.PickColourComboItem(this.cbAxisTextColor, AxisTextColor);
- ColorConverter.PickColourComboItem(this.cbAxisColor, AxisColor);
-
- ColorConverter.PickColourComboItem(this.cbQuantResultsBackgroundColor, QuantResultsBackgroundColor);
- this.cbAxisMajorThickLength.SelectedItem = SpectrumViewerStyle.AxisMajorTickLength;
- this.cbAxisMinorTickLength.SelectedItem = SpectrumViewerStyle.AxisMinorTickLength;
- this.cbAxisSubMinorTickLength.SelectedItem = SpectrumViewerStyle.AxisSubMinorTickLength;
- this.cbAxisFontSize.SelectedItem = SpectrumViewerStyle.AxisFontSize;
- this.cbAxisLabelMargin.SelectedItem = SpectrumViewerStyle.AxisLabelMargin;
- this.cbAxisLineThickness.SelectedItem = SpectrumViewerStyle.AxisLineThickness;
- this.cbShowAxisLines.Checked = SpectrumViewerStyle.IsAxisLineVisible;
- this.cbQuantResultsBackgroundOpacity.SelectedItem = SpectrumViewerStyle.QuantResultsBackgroundOpacity;
- this.cbQuantResultsFormat.SelectedItem = SpectrumViewerStyle.QuantResultsFormat;
- this.cbQuantResultsCategory.SelectedItem = SpectrumViewerStyle.QuantResultsCategory;
- this.cbShowQuantResults.Checked = SpectrumViewerStyle.ShowQuantResults;
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbSpectrumBackgroundColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbSpectrumBackgroundColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbSpectrumBackgroundColor.SelectedValue != null)
- {
- SpectrumBackgroundColor = (Color)this.cbSpectrumBackgroundColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbSpectrumForegroundColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbSpectrumForegroundColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbSpectrumTextColor.SelectedValue != null)
- {
- SpectrumTextColor = (Color)this.cbSpectrumTextColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbAxisForegroundColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisForegroundColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisTextColor.SelectedValue != null)
- {
- AxisTextColor = (Color)this.cbAxisTextColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbAxisTickBrushColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisTickBrushColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisColor.SelectedValue != null)
- {
- AxisColor = (Color)this.cbAxisColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbSpectrumVisualFillColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbSpectrumVisualFillColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbSpectrumVisualFillColor.SelectedValue != null)
- {
- SpectrumVisualFillColor = (Color)this.cbSpectrumVisualFillColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbSpectrumLabelChromeBoderBrushColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbSpectrumLabelChromeBoderBrushColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbPeakLabelBorderColor.SelectedValue != null)
- {
- PeakLabelBorderColor = (Color)this.cbPeakLabelBorderColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbSpectrumLabelChromeBackgroundColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbSpectrumLabelChromeBackgroundColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbPeakLabelBackgroundColor.SelectedValue != null)
- {
- PeakLabelBackgroundColor = (Color)this.cbPeakLabelBackgroundColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbSpectrumLabelViewForegroundColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbSpectrumLabelViewForegroundColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbPeakLabelTextColor.SelectedValue != null)
- {
- PeakLabelTextColor = (Color)this.cbPeakLabelTextColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbAlternatePeakLabelBackgroundColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAlternatePeakLabelBackgroundColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAlternatePeakLabelBackgroundColor.SelectedValue != null)
- {
- AlternatePeakLabelBackgroundColor = (Color)this.cbAlternatePeakLabelBackgroundColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbAlternatePeakLabelTextColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAlternatePeakLabelTextColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAlternatePeakLabelTextColor.SelectedValue != null)
- {
- AlternatePeakLabelTextColor = (Color)this.cbAlternatePeakLabelTextColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbComparisonSpectrum14Color control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisFontSize_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisFontSize.SelectedValue != null)
- {
- SpectrumViewerStyle.AxisFontSize = (double)this.cbAxisFontSize.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the btResetStyle button event.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void BtResetStyle_Click(object sender, EventArgs e)
- {
- SpectrumViewerStyle.ResetStyles();
- this.UpdatePanels();
- this.UpdateCombos();
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbComparisonSpectrum14Color control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisLabelMargin_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisLabelMargin.SelectedValue != null)
- {
- SpectrumViewerStyle.AxisLabelMargin = (Thickness)this.cbAxisLabelMargin.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbComparisonSpectrum14Color control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisMajorThickLength_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisMajorThickLength.SelectedValue != null)
- {
- SpectrumViewerStyle.AxisMajorTickLength = (double)this.cbAxisMajorThickLength.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbComparisonSpectrum14Color control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisMinorTickLength_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisMinorTickLength.SelectedValue != null)
- {
- SpectrumViewerStyle.AxisMinorTickLength = (double)this.cbAxisMinorTickLength.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbComparisonSpectrum14Color control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisSubMinorTickLength_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisSubMinorTickLength.SelectedValue != null)
- {
- SpectrumViewerStyle.AxisSubMinorTickLength = (double)this.cbAxisSubMinorTickLength.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbComparisonSpectrum14Color control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbAxisLineThickness_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbAxisLineThickness.SelectedValue != null)
- {
- SpectrumViewerStyle.AxisLineThickness = (double)this.cbAxisLineThickness.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the CheckedChanged event of the cbShowAxisLines control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbShowAxisLines_CheckedChanged(object sender, EventArgs e)
- {
- IsAxisLinesShown = this.cbShowAxisLines.Checked;
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbQuantResultsBackgroundColor control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbQuantResultsBackgroundColor_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbQuantResultsBackgroundColor.SelectedValue != null)
- {
- QuantResultsBackgroundColor = (Color)this.cbQuantResultsBackgroundColor.SelectedValue;
- this.UpdatePanels();
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbQuantResultsBackgroundOpacity control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbQuantResultsBackgroundOpacity_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbQuantResultsBackgroundOpacity.SelectedValue != null)
- {
- SpectrumViewerStyle.QuantResultsBackgroundOpacity = (double)this.cbQuantResultsBackgroundOpacity.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbQuantResultsFormat control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbQuantResultsFormat_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbQuantResultsFormat.SelectedValue != null)
- {
- SpectrumViewerStyle.QuantResultsFormat = (QuantResultFormat)this.cbQuantResultsFormat.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the SelectedValueChanged event of the CbQuantResultsCategory control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbQuantResultsCategory_SelectedValueChanged(object sender, EventArgs e)
- {
- if (this.cbQuantResultsCategory.SelectedValue != null)
- {
- SpectrumViewerStyle.QuantResultsCategory = (QuantResultCategory)this.cbQuantResultsCategory.SelectedValue;
- }
- }
- /// <summary>
- /// Handles the CheckedChanged event of the CbShowQuantResults control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
- private void CbShowQuantResults_CheckedChanged(object sender, EventArgs e)
- {
- ShowQuantResults = this.cbShowQuantResults.Checked;
- }
- }
- }
|