private void RefreshMatchesButton_Click(object sender, EventArgs e) { MatchedFileView.Text = FileHandling.GetMatchList(_directoryLocation, new Patterns() { Directory = DirectoryPatternBox.Text, File = FilePatternBox.Text }).Join(Environment.NewLine); }
private void DirectorySelectButton_Click(object sender, EventArgs e) { var directorySelector = new FolderBrowserDialog(); directorySelector.Description = "Select the directory that holds your source code that you want to clean."; directorySelector.ShowNewFolderButton = false; var directoryResult = directorySelector.ShowDialog(); if (directoryResult == DialogResult.OK) { // let's process this _directoryLocation = new DirectoryInfo(directorySelector.SelectedPath); DirectoryLabel.Text = directorySelector.SelectedPath; // Process matches & show them MatchedFileView.Text = FileHandling.GetMatchList(_directoryLocation, new Patterns() { Directory = DirectoryPatternBox.Text, File = FilePatternBox.Text }).Join(Environment.NewLine); } }