public DocumentSettingsDlg(IDocumentContainer documentContainer) { InitializeComponent(); Icon = Resources.Skyline; DocumentContainer = documentContainer; _annotationsListBoxDriver = new SettingsListBoxDriver<AnnotationDef>( checkedListBoxAnnotations, Settings.Default.AnnotationDefList); _annotationsListBoxDriver.LoadList( DocumentContainer.Document.Settings.DataSettings.AnnotationDefs); _groupComparisonsListBoxDriver = new SettingsListBoxDriver<GroupComparisonDef>( checkedListBoxGroupComparisons, Settings.Default.GroupComparisonDefList); _groupComparisonsListBoxDriver.LoadList( DocumentContainer.Document.Settings.DataSettings.GroupComparisonDefs); var dataSchema = new SkylineDataSchema(documentContainer, DataSchemaLocalizer.INVARIANT); chooseViewsControl.ViewContext = new SkylineViewContext(dataSchema, new RowSourceInfo[0]); chooseViewsControl.ShowCheckboxes = true; chooseViewsControl.CheckedViews = documentContainer.Document.Settings.DataSettings.ViewSpecList.ViewSpecs.Select( viewSpec => PersistedViews.MainGroup.Id.ViewName(viewSpec.Name)); }
public ToolOptionsUI() { InitializeComponent(); checkBoxShowWizard.Checked = Settings.Default.ShowStartupForm; powerOfTenCheckBox.Checked = Settings.Default.UsePowerOfTen; Icon = Resources.Skyline; _driverServers = new SettingsListBoxDriver <Server>(listboxServers, Settings.Default.ServerList); _driverServers.LoadList(); _driverChorusAccounts = new SettingsListBoxDriver <RemoteAccount>(listBoxRemoteAccounts, Settings.Default.RemoteAccountList); _driverChorusAccounts.LoadList(); _driverColorSchemes = new SettingsListComboDriver <ColorScheme>(comboColorScheme, Settings.Default.ColorSchemes, true); _driverColorSchemes.LoadList(Settings.Default.CurrentColorScheme); // Hide ability to turn off live reports //tabControl.TabPages.Remove(tabMisc); // Populate the languages list with the languages that Skyline has been localized to string defaultDisplayName = string.Format(Resources.ToolOptionsUI_ToolOptionsUI_Default___0__, CultureUtil.GetDisplayLanguage(CultureInfo.InstalledUICulture).DisplayName); listBoxLanguages.Items.Add(new DisplayLanguageItem(string.Empty, defaultDisplayName)); foreach (var culture in CultureUtil.AvailableDisplayLanguages()) { listBoxLanguages.Items.Add(new DisplayLanguageItem(culture.Name, culture.DisplayName)); } for (int i = 0; i < listBoxLanguages.Items.Count; i++) { var displayLanguageItem = (DisplayLanguageItem)listBoxLanguages.Items[i]; if (Equals(displayLanguageItem.Key, Settings.Default.DisplayLanguage)) { listBoxLanguages.SelectedIndex = i; } } comboCompactFormatOption.Items.AddRange(CompactFormatOption.ALL_VALUES.ToArray()); comboCompactFormatOption.SelectedItem = CompactFormatOption.FromSettings(); }
public ToolOptionsUI() { InitializeComponent(); checkBoxShowWizard.Checked = Settings.Default.ShowStartupForm; powerOfTenCheckBox.Checked = Settings.Default.UsePowerOfTen; Icon = Resources.Skyline; _driverServers = new SettingsListBoxDriver<Server>(listboxServers, Settings.Default.ServerList); _driverServers.LoadList(); _driverChorusAccounts = new SettingsListBoxDriver<ChorusAccount>(listBoxChorusAccounts, Settings.Default.ChorusAccountList); _driverChorusAccounts.LoadList(); // Hide ability to turn off live reports //tabControl.TabPages.Remove(tabMisc); // Populate the languages list with the languages that Skyline has been localized to string defaultDisplayName = string.Format(Resources.ToolOptionsUI_ToolOptionsUI_Default___0__, CultureUtil.GetDisplayLanguage(CultureInfo.InstalledUICulture).DisplayName); listBoxLanguages.Items.Add(new DisplayLanguageItem(string.Empty, defaultDisplayName)); foreach (var culture in CultureUtil.AvailableDisplayLanguages()) { listBoxLanguages.Items.Add(new DisplayLanguageItem(culture.Name, culture.DisplayName)); } for (int i = 0; i < listBoxLanguages.Items.Count; i++) { var displayLanguageItem = (DisplayLanguageItem) listBoxLanguages.Items[i]; if (Equals(displayLanguageItem.Key, Settings.Default.DisplayLanguage)) { listBoxLanguages.SelectedIndex = i; } } if (!Settings.Default.EnableChorus) { tabControl.TabPages.Remove(tabChorus); } }
public ToolOptionsUI(SrmSettings settings) { InitializeComponent(); checkBoxShowWizard.Checked = Settings.Default.ShowStartupForm; powerOfTenCheckBox.Checked = Settings.Default.UsePowerOfTen; Icon = Resources.Skyline; _driverServers = new SettingsListBoxDriver <Server>(listboxServers, Settings.Default.ServerList); _driverServers.LoadList(); _driverRemoteAccounts = new SettingsListBoxDriver <RemoteAccount>(listBoxRemoteAccounts, Settings.Default.RemoteAccountList); _driverRemoteAccounts.LoadList(); _driverColorSchemes = new SettingsListComboDriver <ColorScheme>(comboColorScheme, Settings.Default.ColorSchemes, true); _driverColorSchemes.LoadList(Settings.Default.CurrentColorScheme); var pingPep = new Peptide(@"PING"); var peptide = new PeptideDocNode(pingPep); var precursor = new TransitionGroupDocNode(new TransitionGroup(pingPep, Adduct.SINGLY_PROTONATED, IsotopeLabelType.light), new TransitionDocNode[0]); _pingInput = new PrositIntensityModel.PeptidePrecursorNCE(peptide, precursor, IsotopeLabelType.light, 32); _settingsNoMod = settings.ChangePeptideModifications( pm => new PeptideModifications(new StaticMod[0], new TypedModifications[0])); // Hide ability to turn off live reports //tabControl.TabPages.Remove(tabMisc); // Populate the languages list with the languages that Skyline has been localized to string defaultDisplayName = string.Format(Resources.ToolOptionsUI_ToolOptionsUI_Default___0__, CultureUtil.GetDisplayLanguage(CultureInfo.InstalledUICulture).DisplayName); listBoxLanguages.Items.Add(new DisplayLanguageItem(string.Empty, defaultDisplayName)); foreach (var culture in CultureUtil.AvailableDisplayLanguages()) { listBoxLanguages.Items.Add(new DisplayLanguageItem(culture.Name, culture.DisplayName)); } for (int i = 0; i < listBoxLanguages.Items.Count; i++) { var displayLanguageItem = (DisplayLanguageItem)listBoxLanguages.Items[i]; if (Equals(displayLanguageItem.Key, Settings.Default.DisplayLanguage)) { listBoxLanguages.SelectedIndex = i; } } comboCompactFormatOption.Items.AddRange(CompactFormatOption.ALL_VALUES.ToArray()); comboCompactFormatOption.SelectedItem = CompactFormatOption.FromSettings(); var iModels = PrositIntensityModel.Models.ToList(); iModels.Insert(0, string.Empty); var rtModels = PrositRetentionTimeModel.Models.ToList(); rtModels.Insert(0, string.Empty); tbxPrositServer.Text = PrositConfig.GetPrositConfig().Server; intensityModelCombo.Items.AddRange(iModels.ToArray()); iRTModelCombo.Items.AddRange(rtModels.ToArray()); prositServerStatusLabel.Text = string.Empty; if (iModels.Contains(Settings.Default.PrositIntensityModel)) { intensityModelCombo.SelectedItem = Settings.Default.PrositIntensityModel; } if (rtModels.Contains(Settings.Default.PrositRetentionTimeModel)) { iRTModelCombo.SelectedItem = Settings.Default.PrositRetentionTimeModel; } ceCombo.Items.AddRange( Enumerable.Range(PrositConstants.MIN_NCE, PrositConstants.MAX_NCE - PrositConstants.MIN_NCE + 1).Select(c => (object)c) .ToArray()); ceCombo.SelectedItem = Settings.Default.PrositNCE; }
public PeptideSettingsUI(SkylineWindow parent, LibraryManager libraryManager) { InitializeComponent(); btnUpdateIonMobilityLibraries.Visible = false; // TODO: ion mobility libraries are more complex than initially thought - put this off until after summer 2014 release _parent = parent; _libraryManager = libraryManager; _peptideSettings = parent.DocumentUI.Settings.PeptideSettings; // Initialize digestion settings _driverEnzyme = new SettingsListComboDriver<Enzyme>(comboEnzyme, Settings.Default.EnzymeList); _driverEnzyme.LoadList(_peptideSettings.Enzyme.GetKey()); for (int i = DigestSettings.MIN_MISSED_CLEAVAGES; i <= DigestSettings.MAX_MISSED_CLEAVAGES; i++) comboMissedCleavages.Items.Add(i.ToString(CultureInfo.InvariantCulture)); comboMissedCleavages.SelectedItem = Digest.MaxMissedCleavages.ToString(LocalizationHelper.CurrentCulture); if (comboMissedCleavages.SelectedIndex < 0) comboMissedCleavages.SelectedIndex = 0; cbRaggedEnds.Checked = Digest.ExcludeRaggedEnds; // Initialize prediction settings _driverRT = new SettingsListComboDriver<RetentionTimeRegression>(comboRetentionTime, Settings.Default.RetentionTimeList); string sel = (Prediction.RetentionTime == null ? null : Prediction.RetentionTime.Name); _driverRT.LoadList(sel); cbUseMeasuredRT.Checked = textMeasureRTWindow.Enabled = Prediction.UseMeasuredRTs; if (Prediction.MeasuredRTWindow.HasValue) textMeasureRTWindow.Text = Prediction.MeasuredRTWindow.Value.ToString(LocalizationHelper.CurrentCulture); _driverDT = new SettingsListComboDriver<DriftTimePredictor>(comboDriftTimePredictor, Settings.Default.DriftTimePredictorList); string selDT = (Prediction.DriftTimePredictor == null ? null : Prediction.DriftTimePredictor.Name); _driverDT.LoadList(selDT); cbUseSpectralLibraryDriftTimes.Checked = textSpectralLibraryDriftTimesResolvingPower.Enabled = Prediction.UseLibraryDriftTimes; if (Prediction.LibraryDriftTimesResolvingPower.HasValue) textSpectralLibraryDriftTimesResolvingPower.Text = Prediction.LibraryDriftTimesResolvingPower.Value.ToString(LocalizationHelper.CurrentCulture); // Initialize filter settings _driverExclusion = new SettingsListBoxDriver<PeptideExcludeRegex>(listboxExclusions, Settings.Default.PeptideExcludeList); _driverExclusion.LoadList(null, Filter.Exclusions); textExcludeAAs.Text = Filter.ExcludeNTermAAs.ToString(LocalizationHelper.CurrentCulture); textMaxLength.Text = Filter.MaxPeptideLength.ToString(LocalizationHelper.CurrentCulture); textMinLength.Text = Filter.MinPeptideLength.ToString(LocalizationHelper.CurrentCulture); cbAutoSelect.Checked = Filter.AutoSelect; // Initialize spectral library settings _driverLibrary = new SettingsListBoxDriver<LibrarySpec>(listLibraries, Settings.Default.SpectralLibraryList); IList<LibrarySpec> listLibrarySpecs = Libraries.LibrarySpecs; _driverLibrary.LoadList(null, listLibrarySpecs); _driverBackgroundProteome = new SettingsListComboDriver<BackgroundProteomeSpec>(comboBackgroundProteome, Settings.Default.BackgroundProteomeList); _driverBackgroundProteome.LoadList(_peptideSettings.BackgroundProteome.Name); panelPick.Visible = listLibrarySpecs.Count > 0; btnExplore.Enabled = listLibraries.Items.Count > 0; comboMatching.SelectedIndex = (int) Libraries.Pick; _lastRankId = Libraries.RankId; _lastPeptideCount = Libraries.PeptideCount.HasValue ? Libraries.PeptideCount.Value.ToString(LocalizationHelper.CurrentCulture) : null; UpdateRanks(null); // Initialize modification settings _driverStaticMod = new SettingsListBoxDriver<StaticMod>(listStaticMods, Settings.Default.StaticModList); _driverStaticMod.LoadList(null, Modifications.StaticModifications); _driverHeavyMod = new SettingsListBoxDriver<StaticMod>(listHeavyMods, Settings.Default.HeavyModList); _driverLabelType = new LabelTypeComboDriver(comboLabelType, Modifications, _driverHeavyMod, labelStandardType, comboStandardType, listStandardTypes); textMaxVariableMods.Text = Modifications.MaxVariableMods.ToString(LocalizationHelper.CurrentCulture); textMaxNeutralLosses.Text = Modifications.MaxNeutralLosses.ToString(LocalizationHelper.CurrentCulture); // Initialize peak scoring settings. _driverPeakScoringModel = new SettingsListComboDriver<PeakScoringModelSpec>(comboPeakScoringModel, Settings.Default.PeakScoringModelList); var peakScoringModel = _peptideSettings.Integration.PeakScoringModel; _driverPeakScoringModel.LoadList(peakScoringModel != null ? peakScoringModel.Name : null); IsShowLibraryExplorer = false; tabControl1.TabPages.Remove(tabIntegration); comboNormalizationMethod.Items.AddRange( NormalizationMethod.ListNormalizationMethods(parent.DocumentUI).ToArray()); comboNormalizationMethod.SelectedItem = _peptideSettings.Quantification.NormalizationMethod; comboWeighting.Items.AddRange(RegressionWeighting.All.Cast<object>().ToArray()); comboWeighting.SelectedItem = _peptideSettings.Quantification.RegressionWeighting; comboRegressionFit.Items.AddRange(RegressionFit.All.Cast<object>().ToArray()); comboRegressionFit.SelectedItem = _peptideSettings.Quantification.RegressionFit; comboQuantMsLevel.SelectedIndex = Math.Max(0, _quantMsLevels.IndexOf(_peptideSettings.Quantification.MsLevel)); tbxQuantUnits.Text = _peptideSettings.Quantification.Units; }
public RefineDlg(IDocumentUIContainer documentContainer) { _document = documentContainer.DocumentUI; _settings = documentContainer.DocumentUI.Settings; DocumentContainer = documentContainer; InitializeComponent(); Icon = Resources.Skyline; // Save text for later use _removeLabelText = labelLabelType.Text; _removeTipText = helpTip.GetToolTip(comboRefineLabelType); // Fill label type comb_o box comboRefineLabelType.Items.Add(string.Empty); comboRefineLabelType.Items.Add(IsotopeLabelType.LIGHT_NAME); foreach (var typedMods in _settings.PeptideSettings.Modifications.GetHeavyModifications()) { comboRefineLabelType.Items.Add(typedMods.LabelType.Name); } comboRefineLabelType.SelectedIndex = 0; comboReplicateUse.SelectedIndex = 0; if (!_settings.HasResults) { FormUtil.RemoveTabPage(tabResults, helpTip); } if (!_settings.HasResults || _settings.MeasuredResults.Chromatograms.Count < 2) { FormUtil.RemoveTabPage(tabConsistency, helpTip); } else { // Consistency tab textQVal.Enabled = _settings.PeptideSettings.Integration.PeakScoringModel.IsTrained; numericUpDownDetections.Enabled = textQVal.Enabled; if (numericUpDownDetections.Enabled) { numericUpDownDetections.Minimum = 1; numericUpDownDetections.Maximum = _document.MeasuredResults.Chromatograms.Count; numericUpDownDetections.Value = 1; } _normalizationMethods.Clear(); _normalizationMethods.Add(NormalizeOption.DEFAULT); _normalizationMethods.AddRange(NormalizeOption.AvailableNormalizeOptions(_document)); _normalizationMethods.Add(NormalizeOption.NONE); comboNormalizeTo.Items.Clear(); comboNormalizeTo.Items.AddRange(_normalizationMethods.Select(option => option.Caption).ToArray()); comboNormalizeTo.SelectedIndex = comboNormalizeTo.Items.Count - 1; comboTransitions.Items.Add(Resources.RefineDlg_RefineDlg_all); comboTransitions.Items.Add(Resources.RefineDlg_RefineDlg_best); comboTransitions.SelectedIndex = 0; var maxTrans = _document.MoleculeTransitionGroups.Select(g => g.TransitionCount).DefaultIfEmpty().Max(); for (int i = 1; i <= maxTrans; i++) { comboTransitions.Items.Add(i); } if (_document.MoleculeTransitions.Any(t => t.IsMs1)) { comboTransType.Items.Add(Resources.RefineDlg_RefineDlg_Precursors); comboTransType.SelectedIndex = comboTransType.Items.Count - 1; } if (_document.MoleculeTransitions.Any(t => !t.IsMs1)) { comboTransType.Items.Add(Resources.RefineDlg_RefineDlg_Products); comboTransType.SelectedIndex = comboTransType.Items.Count - 1; } if (comboTransType.Items.Count == 1) { comboTransType.Enabled = false; } } if (_settings.PeptideSettings.Libraries.HasLibraries) { labelMinDotProduct.Enabled = textMinDotProduct.Enabled = groupLibCorr.Enabled = true; } if (_settings.TransitionSettings.FullScan.IsHighResPrecursor) { labelMinIdotProduct.Enabled = textMinIdotProduct.Enabled = groupLibCorr.Enabled = true; } // Group Comparisons _groupComparisonsListBoxDriver = new SettingsListBoxDriver <GroupComparisonDef>( checkedListBoxGroupComparisons, Settings.Default.GroupComparisonDefList); _groupComparisonsListBoxDriver.LoadList( _document.Settings.DataSettings.GroupComparisonDefs); if (_document.PeptideTransitions.Any(t => t.IsMs1)) { comboMSGroupComparisons.Items.Add(Resources.RefineDlg_MSLevel_1); comboMSGroupComparisons.SelectedIndex = comboMSGroupComparisons.Items.Count - 1; } if (_document.PeptideTransitions.Any(t => !t.IsMs1)) { comboMSGroupComparisons.Items.Add(Resources.RefineDlg_MSLevel_2); comboMSGroupComparisons.SelectedIndex = comboMSGroupComparisons.Items.Count - 1; } if (comboMSGroupComparisons.Items.Count == 1) { comboMSGroupComparisons.Enabled = false; } }
public TransitionSettingsUI(SkylineWindow parent) { InitializeComponent(); // Populate the fragment finder combo boxes foreach (string item in TransitionFilter.GetStartFragmentFinderLabels()) comboRangeFrom.Items.Add(item); foreach (string item in TransitionFilter.GetEndFragmentFinderLabels()) comboRangeTo.Items.Add(item); _parent = parent; _transitionSettings = _parent.DocumentUI.Settings.TransitionSettings; // Initialize prediction settings comboPrecursorMass.SelectedItem = Prediction.PrecursorMassType.GetLocalizedString(); comboIonMass.SelectedItem = Prediction.FragmentMassType.GetLocalizedString(); _driverCE = new SettingsListComboDriver<CollisionEnergyRegression>(comboCollisionEnergy, Settings.Default.CollisionEnergyList); string sel = (Prediction.CollisionEnergy == null ? null : Prediction.CollisionEnergy.Name); _driverCE.LoadList(sel); _driverDP = new SettingsListComboDriver<DeclusteringPotentialRegression>(comboDeclusterPotential, Settings.Default.DeclusterPotentialList); sel = (Prediction.DeclusteringPotential == null ? null : Prediction.DeclusteringPotential.Name); _driverDP.LoadList(sel); _driverCoV = new SettingsListComboDriver<CompensationVoltageParameters>(comboCompensationVoltage, Settings.Default.CompensationVoltageList); _driverCoV.LoadList(Prediction.CompensationVoltage == null ? null : Prediction.CompensationVoltage.Name); _driverOptimizationLibrary = new SettingsListComboDriver<OptimizationLibrary>(comboOptimizationLibrary, Settings.Default.OptimizationLibraryList); _driverOptimizationLibrary.LoadList(Prediction.OptimizedLibrary == null ? null : Prediction.OptimizedLibrary.Name); if (Prediction.OptimizedMethodType == OptimizedMethodType.None) comboOptimizeType.SelectedIndex = 0; else { cbUseOptimized.Checked = true; comboOptimizeType.SelectedItem = Prediction.OptimizedMethodType.GetLocalizedString(); } // Initialize filter settings textPrecursorCharges.Text = Filter.PrecursorCharges.ToArray().ToString(", "); // Not L10N? Internationalization of comma? textIonCharges.Text = Filter.ProductCharges.ToArray().ToString(", "); // Not L10N? Internationalization of comma? textIonTypes.Text = TransitionFilter.ToStringIonTypes(Filter.IonTypes, true); comboRangeFrom.SelectedItem = Filter.FragmentRangeFirst.Label; comboRangeTo.SelectedItem = Filter.FragmentRangeLast.Label; textExclusionWindow.Text = Filter.PrecursorMzWindow != 0 ? Filter.PrecursorMzWindow.ToString(LocalizationHelper.CurrentCulture) : string.Empty; cbExclusionUseDIAWindow.Checked = Filter.ExclusionUseDIAWindow; cbAutoSelect.Checked = Filter.AutoSelect; _driverIons = new MeasuredIonListBoxDriver(listAlwaysAdd, Settings.Default.MeasuredIonList); _driverIons.LoadList(Filter.MeasuredIons); // Initialize library settings cbLibraryPick.Checked = (Libraries.Pick != TransitionLibraryPick.none); panelPick.Visible = cbLibraryPick.Checked; textTolerance.Text = Libraries.IonMatchTolerance.ToString(LocalizationHelper.CurrentCulture); textIonCount.Text = Libraries.IonCount.ToString(LocalizationHelper.CurrentCulture); if (Libraries.Pick == TransitionLibraryPick.filter) radioFiltered.Checked = true; else if (Libraries.Pick == TransitionLibraryPick.all_plus) radioAllAndFiltered.Checked = true; // Initialize instrument settings textMinMz.Text = Instrument.MinMz.ToString(LocalizationHelper.CurrentCulture); textMaxMz.Text = Instrument.MaxMz.ToString(LocalizationHelper.CurrentCulture); cbDynamicMinimum.Checked = Instrument.IsDynamicMin; textMzMatchTolerance.Text = Instrument.MzMatchTolerance.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MaxTransitions.HasValue) textMaxTrans.Text = Instrument.MaxTransitions.Value.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MaxInclusions.HasValue) textMaxInclusions.Text = Instrument.MaxInclusions.Value.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MinTime.HasValue) textMinTime.Text = Instrument.MinTime.Value.ToString(LocalizationHelper.CurrentCulture); if (Instrument.MaxTime.HasValue) textMaxTime.Text = Instrument.MaxTime.Value.ToString(LocalizationHelper.CurrentCulture); // Initialize full-scan settings FullScanSettingsControl = new FullScanSettingsControl(_parent) { Anchor = (AnchorStyles.Top | AnchorStyles.Left), Location = new Point(0, 0), Size = new Size(363, 491) }; FullScanSettingsControl.IsolationSchemeChangedEvent += IsolationSchemeChanged; tabFullScan.Controls.Add(FullScanSettingsControl); // VISUAL: // - Store the distance between the cbExclusionDIAWindow and the lower end of the box (to use as margin later) // - Shift the cbExclusionDIAWindow down (it is only higher in the designer for better manipulation) _lower_margin = groupBox1.Height - textExclusionWindow.Location.Y - textExclusionWindow.Height; int pixelShift = cbExclusionUseDIAWindow.Location.Y - lbPrecursorMzWindow.Location.Y; cbExclusionUseDIAWindow.Location = new Point(cbExclusionUseDIAWindow.Location.X, cbExclusionUseDIAWindow.Location.Y - pixelShift); DoIsolationSchemeChanged(); }