void FindStyleCopPathClick(object sender, EventArgs e) { using (OpenFileDialog dlg = new OpenFileDialog()) { dlg.DefaultExt = "dll"; dlg.Filter = StringParser.Parse("StyleCop|Microsoft.StyleCop.dll|${res:SharpDevelop.FileFilter.AllFiles}|*.*"); if (dlg.ShowDialog() == DialogResult.OK) { string path = Path.GetDirectoryName(dlg.FileName); if (StyleCopWrapper.IsStyleCopPath(path)) { StyleCopPath = path; } else { MessageService.ShowError("Directory does not contain StyleCop."); } } } ShowStatus(); }
void FindStyleCopPathClick(object sender, EventArgs e) { using (OpenFileDialog dlg = new OpenFileDialog()) { dlg.DefaultExt = "dll"; dlg.Filter = StringParser.Parse("StyleCop|*" + StyleCopWrapper.STYLE_COP_FILE + "|${res:SharpDevelop.FileFilter.AllFiles}|*.*"); if (dlg.ShowDialog() == DialogResult.OK) { string path = dlg.FileName; if (StyleCopWrapper.IsStyleCopPath(path)) { StyleCopPath = path; } else { MessageService.ShowError(string.Format("Directory does not contain StyleCop (*{0}).", StyleCopWrapper.STYLE_COP_FILE)); } } } ShowStatus(); }