private void UpdateChromatogramData() { ChromatogramTraceSettings traceSettings; MassOptions tolerance = null; string msFilter; if (ChroMsLevelComboBox.Text == "MS1" | ChroMsLevelComboBox.SelectedIndex == -1) { msFilter = "ms"; } else if (ChroMsLevelComboBox.Text == "MS2") { msFilter = "ms2"; } else if (ChroMsLevelComboBox.Text == "MS3") { msFilter = "ms3"; } else { msFilter = String.Empty; } if (ChroTICRadioButton.Checked) { traceSettings = new ChromatogramTraceSettings(TraceType.TIC); } else if (ChroBPRadioButton.Checked) { traceSettings = new ChromatogramTraceSettings(TraceType.BasePeak); } else { if (ChroXICmzTextBox.Text.IsNullOrEmpty() || ChroXICmzTextBox.BackColor == Color.Red || ChroXICmzTextBox.Text == "") { traceSettings = new ChromatogramTraceSettings(TraceType.TIC); } else { double da = Convert.ToDouble(ChroXICmzTextBox.Text); traceSettings = new ChromatogramTraceSettings(TraceType.MassRange) { MassRanges = new[] { new Range(da, da) }, }; if (!chroXICToleranceTextBox.Text.IsNullOrEmpty() && !(chroXICToleranceTextBox.BackColor == Color.Red) && !(chroXICToleranceTextBox.Text == "")) { tolerance = new MassOptions() { Tolerance = Convert.ToDouble(chroXICToleranceTextBox.Text) }; if (chroMassTolPPM.Checked) { tolerance.ToleranceUnits = ToleranceUnits.ppm; } else if (chroMassTolDa.Checked) { tolerance.ToleranceUnits = ToleranceUnits.amu; } else { tolerance.ToleranceUnits = ToleranceUnits.mmu; } } } } traceSettings.Filter = msFilter; IChromatogramSettingsEx[] allSettings = { traceSettings }; ChromatogramData = RawData.GetChromatogramDataEx(allSettings, -1, -1, tolerance); }