Пример #1
0
        public void OkDialog()
        {
            var helper = new MessageBoxHelper(this);

            if (rbQValue01.Checked)
            {
                Settings.QValueCutoff = 0.01f;
            }
            if (rbQValueCustom.Checked)
            {
                var qValueCutoff = double.NaN;
                if (!string.IsNullOrEmpty(txtQValueCustom.Text) &&
                    !helper.ValidateDecimalTextBox(txtQValueCustom, 0, 1, out qValueCutoff))
                {
                    return;
                }
                else
                {
                    Settings.QValueCutoff = (float)qValueCutoff;
                }
            }

            Settings.YScaleFactor = IntLabeledValue.GetValue(cmbCountMultiple, Settings.YScaleFactor);
            Settings.TargetType   = IntLabeledValue.GetValue(cmbTargetType, Settings.TargetType);

            Settings.ShowAtLeastN  = cbShowAtLeastN.Checked;
            Settings.ShowSelection = cbShowSelection.Checked;
            Settings.ShowMean      = cbShowMeanStd.Checked;
            Settings.ShowLegend    = cbShowLegend.Checked;

            Settings.RepCount = tbAtLeastN.Value;
            Settings.FontSize = GraphFontSize.GetFontSize(cmbFontSize).PointSize;

            DialogResult = DialogResult.OK;
        }
Пример #2
0
 public void cbLevel_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbLevel.Items.Count == 2)
     {
         Settings.TargetType = IntLabeledValue.GetValue(cbLevel, Settings.TargetType);
         _timer.Stop();
         _timer.Start();
     }
 }
Пример #3
0
        private void DetectionToolbarProperties_Load(object sender, EventArgs e)
        {
            IntLabeledValue.PopulateCombo(cmbTargetType, Settings.TargetType);
            IntLabeledValue.PopulateCombo(cmbCountMultiple, Settings.YScaleFactor);

            txtQValueCustom.Text = Settings.QValueCutoff.ToString(LocalizationHelper.CurrentCulture);
            switch (Settings.QValueCutoff)
            {
            case 0.01f:
                rbQValue01.Select();
                break;

            default:
                rbQValueCustom.Select();
                break;
            }

            cbShowAtLeastN.Checked  = Settings.ShowAtLeastN;
            cbShowSelection.Checked = Settings.ShowSelection;
            cbShowMeanStd.Checked   = Settings.ShowMean;
            cbShowLegend.Checked    = Settings.ShowLegend;
            GraphFontSize.PopulateCombo(cmbFontSize, Settings.FontSize);

            if (_graphSummary.DocumentUIContainer.DocumentUI.IsLoaded &&
                _graphSummary.DocumentUIContainer.DocumentUI.MeasuredResults.Chromatograms.Count > 0)
            {
                tbAtLeastN.Maximum = _graphSummary.DocumentUIContainer.DocumentUI.MeasuredResults.Chromatograms.Count;
                if (Settings.RepCount < tbAtLeastN.Maximum && Settings.RepCount > tbAtLeastN.Minimum)
                {
                    tbAtLeastN.Value = Settings.RepCount;
                }
                else
                {
                    tbAtLeastN.Value = tbAtLeastN.Maximum / 2;
                }
            }
            cmbTargetType.Focus();
        }
Пример #4
0
 public override void UpdateUI()
 {
     IntLabeledValue.PopulateCombo(cbLevel, Settings.TargetType);
     if (!_graphSummary.TryGetGraphPane(out DetectionsPlotPane pane))
     {
         return;
     }
     if (pane.CurrentData.IsValid &&
         DetectionPlotData.GetDataCache().Status != DetectionPlotData.DetectionDataCache.CacheStatus.error)
     {
         EnableControls(true);
         IntLabeledValue.PopulateCombo(cbLevel, Settings.TargetType);
         toolStripAtLeastN.NumericUpDownControl.Minimum = 0;
         toolStripAtLeastN.NumericUpDownControl.Maximum =
             _graphSummary.DocumentUIContainer.DocumentUI.MeasuredResults.Chromatograms.Count;
         toolStripAtLeastN.NumericUpDownControl.Value         = Settings.RepCount;
         toolStripAtLeastN.NumericUpDownControl.ValueChanged += toolStripAtLeastN_ValueChanged;
     }
     else
     {
         toolStripAtLeastN.NumericUpDownControl.Value = 0;
         EnableControls(false);
     }
 }
Пример #5
0
 private void cmbTargetType_SelectedIndexChanged(object sender, EventArgs e)
 {
     Settings.TargetType = IntLabeledValue.GetValue(cmbTargetType, Settings.TargetType);
     IntLabeledValue.PopulateCombo(cmbCountMultiple, Settings.YScaleFactor);
 }