示例#1
0
        public ImportIonMobilityFromSpectralLibraryDlg(IEnumerable <LibrarySpec> librarySpecs, CollisionalCrossSectionGridViewDriver gridViewDriver)
        {
            InitializeComponent();

            comboLibrary.Items.AddRange(librarySpecs.Cast <object>().ToArray());
            if ((comboLibrary.Items.Count == 1) && (Source == SpectralLibrarySource.settings))
            {
                comboLibrary.SelectedIndex = 0; // The obvious choice
            }
            ComboHelper.AutoSizeDropDown(comboLibrary);
            _gridViewDriver = gridViewDriver;
        }
        public EditIonMobilityLibraryDlg(IonMobilityLibrary library, IEnumerable <IonMobilityLibrarySpec> existingLibs)
        {
            _existingLibs = existingLibs;

            InitializeComponent();

            Icon = Resources.Skyline;

            _gridViewLibraryDriver = new CollisionalCrossSectionGridViewDriver(gridViewMeasuredPeptides, bindingSourceLibrary,
                                                                               new SortableBindingList <ValidatingIonMobilityPeptide>());

            if (library != null)
            {
                textLibraryName.Text = _editingName = library.Name;
                string databaseStartPath = library.DatabasePath;

                OpenDatabase(databaseStartPath);
            }
        }