public DocumentSettingsDlg(IDocumentUIContainer 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 listDataList = new ListDefList(); listDataList.AddRange(Settings.Default.ListDefList); listDataList.AddRange(documentContainer.Document.Settings.DataSettings.Lists); _listsListBoxDriver = new SettingsListBoxDriver <ListData>( checkedListBoxLists, listDataList); _listsListBoxDriver.LoadList(documentContainer.Document.Settings.DataSettings.Lists); 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)); }
private void btnAddAnnotation_Click(object sender, System.EventArgs e) { using (var editDlg = new DefineAnnotationDlg(Settings.Default.AnnotationDefList)) { if (editDlg.ShowDialog(this) == DialogResult.OK) { var chosen = _annotationsListBoxDriver.Chosen.ToList(); var annotationDef = editDlg.GetAnnotationDef(); chosen.Add(annotationDef); Settings.Default.AnnotationDefList.Add(annotationDef); _annotationsListBoxDriver.LoadList(chosen); } } }
public void AddList() { using (var editDlg = new ListDesigner(ListData.EMPTY, _listsListBoxDriver.List)) { if (editDlg.ShowDialog(this) == DialogResult.OK) { var chosen = _listsListBoxDriver.Chosen.ToList(); var listDef = editDlg.GetListDef(); chosen.Add(listDef); _listsListBoxDriver.List.Add(editDlg.GetListDef()); _listsListBoxDriver.LoadList(chosen); } } }
public void AddAnnotation() { using (var editDlg = new DefineAnnotationDlg(Settings.Default.AnnotationDefList)) { if (editDlg.ShowDialog(this) == DialogResult.OK) { var chosen = _annotationsListBoxDriver.Chosen.ToList(); var annotationDef = editDlg.GetAnnotationDef(); chosen.Add(annotationDef); Settings.Default.AnnotationDefList.Add(annotationDef); _annotationsListBoxDriver.LoadList(chosen); } } }
public void AddMetadataRule() { using (var editDlg = new MetadataRuleSetEditor(DocumentContainer, new MetadataRuleSet(typeof(ResultFile)), Settings.Default.MetadataRuleSets)) { if (editDlg.ShowDialog(this) == DialogResult.OK) { var chosen = _metadataRuleSetsListBoxDriver.Chosen.ToList(); Settings.Default.MetadataRuleSets.Add(editDlg.MetadataRuleSet); chosen.Add(editDlg.MetadataRuleSet); _metadataRuleSetsListBoxDriver.LoadList(chosen); } } }
public void AddGroupComparison() { using (var editDlg = new EditGroupComparisonDlg( DocumentContainer, GroupComparisonDef.EMPTY, Settings.Default.GroupComparisonDefList)) { if (editDlg.ShowDialog(this) == DialogResult.OK) { var chosen = _groupComparisonsListBoxDriver.Chosen.ToList(); Settings.Default.GroupComparisonDefList.Add(editDlg.GroupComparisonDef); chosen.Add(editDlg.GroupComparisonDef); _groupComparisonsListBoxDriver.LoadList(chosen); } } }
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(); }