public ImportPeptideSearchDlg(SkylineWindow skylineWindow, LibraryManager libraryManager)
        {
            SkylineWindow       = skylineWindow;
            ImportPeptideSearch = new ImportPeptideSearch();

            InitializeComponent();

            Icon = Resources.Skyline;

            CurrentPage     = Pages.spectra_page;
            btnNext.Text    = Resources.ImportPeptideSearchDlg_ImportPeptideSearchDlg_Next;
            AcceptButton    = btnNext;
            btnNext.Enabled = HasUnmatchedLibraryRuns(SkylineWindow.DocumentUI);

            // Create and add wizard pages
            BuildPepSearchLibControl = new BuildPeptideSearchLibraryControl(SkylineWindow, ImportPeptideSearch, libraryManager)
            {
                Anchor   = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 50)
            };
            BuildPepSearchLibControl.InputFilesChanged += BuildPepSearchLibForm_OnInputFilesChanged;
            buildSearchSpecLibPage.Controls.Add(BuildPepSearchLibControl);

            ImportFastaControl = new ImportFastaControl(SkylineWindow)
            {
                Anchor   = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 60)
            };
            importFastaPage.Controls.Add(ImportFastaControl);

            MatchModificationsControl = new MatchModificationsControl(SkylineWindow, ImportPeptideSearch)
            {
                Anchor   = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 60)
            };
            matchModificationsPage.Controls.Add(MatchModificationsControl);

            TransitionSettingsControl = new TransitionSettingsControl(SkylineWindow)
            {
                Anchor   = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(18, 60)
            };
            transitionSettingsUiPage.Controls.Add(TransitionSettingsControl);

            FullScanSettingsControl = new FullScanSettingsControl(SkylineWindow)
            {
                Anchor   = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(18, 50)
            };
            ms1FullScanSettingsPage.Controls.Add(FullScanSettingsControl);

            ImportResultsControl = new ImportResultsControl(ImportPeptideSearch, SkylineWindow.DocumentFilePath)
            {
                Anchor   = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 60)
            };
            getChromatogramsPage.Controls.Add((Control)ImportResultsControl);

            _pagesToSkip = new HashSet <Pages>();
        }
        public ImportPeptideSearchDlg(SkylineWindow skylineWindow, LibraryManager libraryManager)
        {
            SkylineWindow = skylineWindow;
            ImportPeptideSearch = new ImportPeptideSearch();

            InitializeComponent();

            Icon = Resources.Skyline;

            CurrentPage = Pages.spectra_page;
            btnNext.Text = Resources.ImportPeptideSearchDlg_ImportPeptideSearchDlg_Next;
            AcceptButton = btnNext;
            btnNext.Enabled = HasUnmatchedLibraryRuns(SkylineWindow.DocumentUI);

            // Create and add wizard pages
            BuildPepSearchLibControl = new BuildPeptideSearchLibraryControl(SkylineWindow, ImportPeptideSearch, libraryManager)
            {
                Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 50)
            };
            BuildPepSearchLibControl.InputFilesChanged += BuildPepSearchLibForm_OnInputFilesChanged;
            buildSearchSpecLibPage.Controls.Add(BuildPepSearchLibControl);

            ImportFastaControl = new ImportFastaControl(SkylineWindow)
            {
                Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 60)
            };
            importFastaPage.Controls.Add(ImportFastaControl);

            MatchModificationsControl = new MatchModificationsControl(SkylineWindow, ImportPeptideSearch)
            {
                Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 60)
            };
            matchModificationsPage.Controls.Add(MatchModificationsControl);

            TransitionSettingsControl = new TransitionSettingsControl(SkylineWindow)
            {
                Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(18, 60)
            };
            transitionSettingsUiPage.Controls.Add(TransitionSettingsControl);

            FullScanSettingsControl = new FullScanSettingsControl(SkylineWindow)
            {
                Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(18, 50)
            };
            ms1FullScanSettingsPage.Controls.Add(FullScanSettingsControl);

            ImportResultsControl = new ImportResultsControl(ImportPeptideSearch, SkylineWindow.DocumentFilePath)
            {
                Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right),
                Location = new Point(2, 60)
            };
            getChromatogramsPage.Controls.Add((Control) ImportResultsControl);

            _pagesToSkip = new HashSet<Pages>();
        }
 private void ImportResultsControl_OnResultsFilesChanged(object sender,
     ImportResultsControl.ResultsFilesEventArgs e)
 {
     btnNext.Enabled = e.NumFoundFiles > 0;
 }
        public ImportPeptideSearchDlg(SkylineWindow skylineWindow, LibraryManager libraryManager)
        {
            SkylineWindow = skylineWindow;
            _documents    = new Stack <SrmDocument>();
            SetDocument(skylineWindow.Document, null);

            ImportPeptideSearch = new ImportPeptideSearch();

            InitializeComponent();

            Icon = Resources.Skyline;

            btnEarlyFinish.Location = btnBack.Location;

            CurrentPage     = Pages.spectra_page;
            btnNext.Text    = Resources.ImportPeptideSearchDlg_ImportPeptideSearchDlg_Next;
            AcceptButton    = btnNext;
            btnNext.Enabled = HasUnmatchedLibraryRuns(Document);

            // Create and add wizard pages
            BuildPepSearchLibControl = new BuildPeptideSearchLibraryControl(this, ImportPeptideSearch, libraryManager)
            {
                Dock = DockStyle.Fill,
            };
            BuildPepSearchLibControl.InputFilesChanged += BuildPepSearchLibForm_OnInputFilesChanged;

            buildLibraryPanel.Controls.Add(BuildPepSearchLibControl);

            ImportFastaControl = new ImportFastaControl(this, SkylineWindow.SequenceTree)
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Location = new Point(2, 60)
            };
            importFastaPage.Controls.Add(ImportFastaControl);

            MatchModificationsControl = new MatchModificationsControl(this, ImportPeptideSearch)
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Location = new Point(2, 60)
            };
            matchModificationsPage.Controls.Add(MatchModificationsControl);

            TransitionSettingsControl = new TransitionSettingsControl(this)
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Location = new Point(18, 60)
            };
            transitionSettingsUiPage.Controls.Add(TransitionSettingsControl);

            FullScanSettingsControl = new FullScanSettingsControl(this)
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Location = new Point(18, 50)
            };
            ms1FullScanSettingsPage.Controls.Add(FullScanSettingsControl);
            FullScanSettingsControl.FullScanEnabledChanged += OnFullScanEnabledChanged; // Adjusts ion settings when full scan settings change

            ImportResultsControl = new ImportResultsControl(ImportPeptideSearch, DocumentFilePath)
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Location = new Point(2, 60)
            };
            getChromatogramsPage.Controls.Add((Control)ImportResultsControl);

            _pagesToSkip = new HashSet <Pages>();
        }