private void findResultsFilesButton_Click(object sender, EventArgs e) { // Ask the user for the directory to search using (var dlg = new FolderBrowserDialog { Description = Resources.ImportResultsControl_findResultsFilesButton_Click_Results_Directory, ShowNewFolderButton = false, SelectedPath = Path.GetDirectoryName(DocumentDirectory) }) { if (dlg.ShowDialog(WizardForm) != DialogResult.OK) { return; } // See if we're still missing any files, and update UI accordingly var dirsToSearch = new List <string> { dlg.SelectedPath }; dirsToSearch.AddRange(ImportPeptideSearch.GetSubdirectories(dlg.SelectedPath)); if (!UpdateResultsFiles(dirsToSearch, true)) { MessageDlg.Show(WizardForm, Resources.ImportResultsControl_findResultsFilesButton_Click_Could_not_find_all_the_missing_results_files_); } } }