Example #1
0
        public void SetRetentionTimeFilter(RetentionTimeFilterType retentionTimeFilterType, double length)
        {
            switch (retentionTimeFilterType)
            {
            case RetentionTimeFilterType.none:
                radioKeepAllTime.Checked = true;
                break;

            case RetentionTimeFilterType.scheduling_windows:
                radioUseSchedulingWindow.Checked = true;
                tbxTimeAroundPrediction.Text     = length.ToString(CultureInfo.CurrentCulture);
                break;

            case RetentionTimeFilterType.ms2_ids:
                radioTimeAroundMs2Ids.Checked = true;
                tbxTimeAroundMs2Ids.Text      = length.ToString(CultureInfo.CurrentCulture);
                break;

            default:
                // ReSharper disable LocalizableElement
                throw new ArgumentException("Invalid RetentionTimeFilterType", nameof(retentionTimeFilterType));     // Not L10N
                // ReSharper restore LocalizableElement
            }
        }
Example #2
0
        public bool ValidateFullScanSettings(MessageBoxHelper helper, out TransitionFullScan fullScanSettings, TabControl tabControl = null, int tabIndex = -1)
        {
            fullScanSettings = null;

            double?precursorIsotopeFilter;

            if (!ValidatePrecursorIsotopeFilter(helper, out precursorIsotopeFilter, tabControl, tabIndex))
            {
                return(false);
            }

            double?precursorRes;

            if (!ValidatePrecursorRes(helper, precursorIsotopeFilter, out precursorRes, tabControl, tabIndex))
            {
                return(false);
            }

            double?precursorResMz;

            if (!ValidatePrecursorResMz(helper, out precursorResMz, tabControl, tabIndex))
            {
                return(false);
            }

            double?productRes;

            if (!ValidateProductRes(helper, out productRes, tabControl, tabIndex))
            {
                return(false);
            }

            double?productResMz;

            if (!ValidateProductResMz(helper, out productResMz, tabControl, tabIndex))
            {
                return(false);
            }

            RetentionTimeFilterType retentionTimeFilterType = RetentionTimeFilterType;
            double retentionTimeFilterLength;

            if (!ValidateRetentionTimeFilterLength(out retentionTimeFilterLength))
            {
                return(false);
            }

            fullScanSettings = new TransitionFullScan(AcquisitionMethod,
                                                      IsolationScheme,
                                                      ProductMassAnalyzer,
                                                      productRes,
                                                      productResMz,
                                                      PrecursorIsotopesCurrent,
                                                      precursorIsotopeFilter,
                                                      PrecursorMassAnalyzer,
                                                      precursorRes,
                                                      precursorResMz,
                                                      UseSelectiveExtraction,
                                                      Enrichments,
                                                      retentionTimeFilterType,
                                                      retentionTimeFilterLength);
            return(true);
        }
 public void SetRetentionTimeFilter(RetentionTimeFilterType retentionTimeFilterType, double length)
 {
     switch (retentionTimeFilterType)
     {
         case RetentionTimeFilterType.none:
             radioKeepAllTime.Checked = true;
             break;
         case RetentionTimeFilterType.scheduling_windows:
             radioUseSchedulingWindow.Checked = true;
             tbxTimeAroundPrediction.Text = length.ToString(CultureInfo.CurrentCulture);
             break;
         case RetentionTimeFilterType.ms2_ids:
             radioTimeAroundMs2Ids.Checked = true;
             tbxTimeAroundMs2Ids.Text = length.ToString(CultureInfo.CurrentCulture);
             break;
         default:
             // ReSharper disable LocalizableElement
             throw new ArgumentException("Invalid RetentionTimeFilterType", "retentionTimeFilterType"); // Not L10N
             // ReSharper restore LocalizableElement
     }
 }
Example #4
0
 public void SetRetentionTimeFilter(RetentionTimeFilterType retentionTimeFilterType, double length)
 {
     FullScanSettingsControl.SetRetentionTimeFilter(retentionTimeFilterType, length);
 }
 public void SetRetentionTimeFilter(RetentionTimeFilterType retentionTimeFilterType, double length)
 {
     FullScanSettingsControl.SetRetentionTimeFilter(retentionTimeFilterType, length);
 }