private void ExportIsolationList( string csvFilename, string instrumentType, FullScanAcquisitionMethod acquisitionMethod, ExportMethodType methodType, params string[] checkStrings) { // Set acquisition method, mass analyzer type, resolution, etc. if (Equals(instrumentType, ExportInstrumentType.AGILENT_TOF)) { RunUI(() => SkylineWindow.ModifyDocument("Set TOF full-scan settings", doc => doc.ChangeSettings(doc.Settings.ChangeTransitionFullScan(fs => fs .ChangePrecursorResolution(FullScanMassAnalyzerType.tof, 10000, null) .ChangeProductResolution(FullScanMassAnalyzerType.tof, 10000, null) .ChangeAcquisitionMethod(acquisitionMethod, null))))); } else { RunUI(() => SkylineWindow.ModifyDocument("Set Orbitrap full-scan settings", doc => doc.ChangeSettings(doc.Settings.ChangeTransitionFullScan(fs => fs .ChangePrecursorResolution(FullScanMassAnalyzerType.orbitrap, 60000, 400) .ChangeProductResolution(FullScanMassAnalyzerType.orbitrap, 60000, 400) .ChangeAcquisitionMethod(acquisitionMethod, null))))); } // Open Export Method dialog, and set method to scheduled or standard. string csvPath = TestContext.GetTestPath(csvFilename); var exportMethodDlg = ShowDialog <ExportMethodDlg>(() => SkylineWindow.ShowExportMethodDialog(ExportFileType.IsolationList)); RunUI(() => { exportMethodDlg.InstrumentType = instrumentType; exportMethodDlg.MethodType = methodType; exportMethodDlg.UseSlens = WithSLens; Assert.IsFalse(exportMethodDlg.IsOptimizeTypeEnabled); Assert.IsTrue(exportMethodDlg.IsTargetTypeEnabled); Assert.IsFalse(exportMethodDlg.IsDwellTimeVisible); Assert.IsFalse(exportMethodDlg.IsMaxTransitionsEnabled); }); if (methodType == ExportMethodType.Standard) { // Simply close the dialog. OkDialog(exportMethodDlg, () => exportMethodDlg.OkDialog(csvPath)); } else { // Close the SchedulingOptionsDlg, then wait for export dialog to close. RunDlg <SchedulingOptionsDlg>(() => exportMethodDlg.OkDialog(csvPath), schedulingOptionsDlg => schedulingOptionsDlg.OkDialog()); WaitForClosedForm(exportMethodDlg); } // Check for expected output. string csvOut = File.ReadAllText(csvPath); AssertEx.Contains(csvOut, checkStrings); }
private void ExportIsolationList( string csvFilename, string instrumentType, FullScanAcquisitionMethod acquisitionMethod, ExportMethodType methodType, params string[] checkStrings) { // Set acquisition method, mass analyzer type, resolution, etc. if (Equals(instrumentType, ExportInstrumentType.AGILENT_TOF)) { RunUI(() => SkylineWindow.ModifyDocument("Set TOF full-scan settings", doc => doc.ChangeSettings(doc.Settings.ChangeTransitionFullScan(fs => fs .ChangePrecursorResolution(FullScanMassAnalyzerType.tof, 10000, null) .ChangeProductResolution(FullScanMassAnalyzerType.tof, 10000, null) .ChangeAcquisitionMethod(acquisitionMethod, null))))); } else { RunUI(() => SkylineWindow.ModifyDocument("Set Orbitrap full-scan settings", doc => doc.ChangeSettings(doc.Settings.ChangeTransitionFullScan(fs => fs .ChangePrecursorResolution(FullScanMassAnalyzerType.orbitrap, 60000, 400) .ChangeProductResolution(FullScanMassAnalyzerType.orbitrap, 60000, 400) .ChangeAcquisitionMethod(acquisitionMethod, null))))); } // Open Export Method dialog, and set method to scheduled or standard. string csvPath = TestFilesDirs[0].GetTestPath(csvFilename); var exportMethodDlg = ShowDialog <ExportMethodDlg>(() => SkylineWindow.ShowExportMethodDialog(ExportFileType.IsolationList)); var exportPolarityFilter = AsSmallMoleculesNegativeMode != RefinementSettings.ConvertToSmallMoleculesChargesMode.none && SkylineWindow.Document.IsMixedPolarity() ? ExportPolarity.separate : ExportPolarity.all; RunUI(() => { exportMethodDlg.InstrumentType = instrumentType; exportMethodDlg.MethodType = methodType; exportMethodDlg.UseSlens = WithSLens; exportMethodDlg.PolarityFilter = exportPolarityFilter; Assert.IsFalse(exportMethodDlg.IsOptimizeTypeEnabled); Assert.IsTrue(exportMethodDlg.IsTargetTypeEnabled); Assert.IsFalse(exportMethodDlg.IsDwellTimeVisible); Assert.IsFalse(exportMethodDlg.IsMaxTransitionsEnabled); }); if (methodType == ExportMethodType.Standard) { // Simply close the dialog. OkDialog(exportMethodDlg, () => exportMethodDlg.OkDialog(csvPath)); } else { // Close the SchedulingOptionsDlg, then wait for export dialog to close. RunDlg <SchedulingOptionsDlg>(() => exportMethodDlg.OkDialog(csvPath), schedulingOptionsDlg => schedulingOptionsDlg.OkDialog()); WaitForClosedForm(exportMethodDlg); } // Check for expected output. var csvResult = csvPath; if (exportPolarityFilter == ExportPolarity.separate) { // We will have emitted two docs, one for pos and one for neg var ext = csvPath.Substring(csvPath.LastIndexOf('.')); csvResult = csvPath.Replace(ext, string.Format("_{0}_0001{1}", ExportPolarity.negative, ext)); var csvPos = File.ReadAllText(csvPath.Replace(ext, string.Format("_{0}_0001{1}", ExportPolarity.positive, ext))); var csvNeg = File.ReadAllText(csvResult); Assert.IsFalse(csvNeg.Equals(csvPos)); } string csvOut = File.ReadAllText(csvResult); AssertEx.Contains(csvOut, checkStrings); }
private void UpdateTriggerControls(ExportMethodType targetType) { panelTriggered.Visible = (targetType == ExportMethodType.Triggered); }
private void UpdateThermoSLensControl(ExportMethodType targetType) { cbSlens.Visible = cbSlens.Enabled = InstrumentType == ExportInstrumentType.THERMO_QUANTIVA || InstrumentType == ExportInstrumentType.THERMO; // TODO bspratt is this specific enough? }
private void UpdateThermoRtControls(ExportMethodType targetType) { panelThermoRt.Visible = InstrumentType == ExportInstrumentType.THERMO_QUANTIVA || (targetType != ExportMethodType.Standard && InstrumentType == ExportInstrumentType.THERMO); if (panelThermoColumns.Visible) { panelThermoRt.Top = panelThermoColumns.Top - (int)(panelThermoRt.Height * 0.8); } else { panelThermoRt.Top = labelDwellTime.Visible ? labelDwellTime.Top - panelThermoRt.Height : labelDwellTime.Top + (panelThermoRt.Height / 2); } }
private void UpdateThermoColumns(ExportMethodType targetType) { panelThermoColumns.Visible = targetType == ExportMethodType.Scheduled && InstrumentType == ExportInstrumentType.THERMO; }
private void UpdateInstrumentControls(ExportMethodType targetType) { bool standard = (targetType == ExportMethodType.Standard); bool triggered = (targetType == ExportMethodType.Triggered); if (triggered && !(InstrumentType == ExportInstrumentType.ABI || InstrumentType == ExportInstrumentType.ABI_QTRAP)) { comboOptimizing.Enabled = false; } else { comboOptimizing.Enabled = !IsFullScanInstrument; } if (!comboOptimizing.Enabled) { OptimizeType = ExportOptimize.NONE; } UpdateTriggerControls(targetType); UpdateDwellControls(standard); UpdateThermoColumns(targetType); UpdateAbSciexControls(); UpdateWatersControls(); UpdateThermoRtControls(targetType); UpdateThermoSLensControl(targetType); UpdateMaxLabel(standard); }
public void SetMethodType(ExportMethodType type) { comboTargetType.SelectedItem = type == ExportMethodType.Standard ? Resources.ExportMethodDlg_SetMethodType_Standard : Resources.ExportMethodDlg_SetMethodType_Scheduled; }
private void ExportIsolationList( string csvFilename, string instrumentType, FullScanAcquisitionMethod acquisitionMethod, ExportMethodType methodType, params string[] checkStrings) { // Set acquisition method, mass analyzer type, resolution, etc. if (Equals(instrumentType, ExportInstrumentType.AGILENT_TOF)) { RunUI(() => SkylineWindow.ModifyDocument("Set TOF full-scan settings", doc => doc.ChangeSettings(doc.Settings.ChangeTransitionFullScan(fs => fs .ChangePrecursorResolution(FullScanMassAnalyzerType.tof, 10000, null) .ChangeProductResolution(FullScanMassAnalyzerType.tof, 10000, null) .ChangeAcquisitionMethod(acquisitionMethod, null))))); } else { RunUI(() => SkylineWindow.ModifyDocument("Set Orbitrap full-scan settings", doc => doc.ChangeSettings(doc.Settings.ChangeTransitionFullScan(fs => fs .ChangePrecursorResolution(FullScanMassAnalyzerType.orbitrap, 60000, 400) .ChangeProductResolution(FullScanMassAnalyzerType.orbitrap, 60000, 400) .ChangeAcquisitionMethod(acquisitionMethod, null))))); } // Open Export Method dialog, and set method to scheduled or standard. string csvPath = TestContext.GetTestPath(csvFilename); var exportMethodDlg = ShowDialog<ExportMethodDlg>(() => SkylineWindow.ShowExportMethodDialog(ExportFileType.IsolationList)); RunUI(() => { exportMethodDlg.InstrumentType = instrumentType; exportMethodDlg.MethodType = methodType; exportMethodDlg.UseSlens = WithSLens; Assert.IsFalse(exportMethodDlg.IsOptimizeTypeEnabled); Assert.IsTrue(exportMethodDlg.IsTargetTypeEnabled); Assert.IsFalse(exportMethodDlg.IsDwellTimeVisible); Assert.IsFalse(exportMethodDlg.IsMaxTransitionsEnabled); }); if (methodType == ExportMethodType.Standard) { // Simply close the dialog. OkDialog(exportMethodDlg, ()=> exportMethodDlg.OkDialog(csvPath)); } else { // Close the SchedulingOptionsDlg, then wait for export dialog to close. RunDlg<SchedulingOptionsDlg>(() => exportMethodDlg.OkDialog(csvPath), schedulingOptionsDlg => schedulingOptionsDlg.OkDialog()); WaitForClosedForm(exportMethodDlg); } // Check for expected output. string csvOut = File.ReadAllText(csvPath); AssertEx.Contains(csvOut, checkStrings); }