Browse Source

SD2-835: Creating a regex assembly with an invalid filename throws an error

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1844 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 19 years ago
parent
commit
79df003c54
  1. 7
      src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs

7
src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs

@ -183,8 +183,6 @@ namespace Plugins.RegExpTk { @@ -183,8 +183,6 @@ namespace Plugins.RegExpTk {
error = true;
}
string file_ = ((TextBox)ControlDictionary["AssemblyFileCompileFileTextBox"]).Text;
if(! FileUtility.IsValidFileName(((TextBox)ControlDictionary["AssemblyFileCompileFileTextBox"]).Text)) {
@ -223,7 +221,7 @@ namespace Plugins.RegExpTk { @@ -223,7 +221,7 @@ namespace Plugins.RegExpTk {
return;
}
RegexCompilationInfo rci = new RegexCompilationInfo(((TextBox)ControlDictionary["RegularExpressionCompileTextBox"]).Text,
RegexCompilationInfo rci = new RegexCompilationInfo(((TextBox)ControlDictionary["RegularExpressionCompileTextBox"]).Text,
options,
((TextBox)ControlDictionary["ClassNameCompileTextBox"]).Text,
((TextBox)ControlDictionary["NamespaceCompileTextBox"]).Text,
@ -238,9 +236,10 @@ namespace Plugins.RegExpTk { @@ -238,9 +236,10 @@ namespace Plugins.RegExpTk {
Regex.CompileToAssembly(rciArray, asmName);
} catch (ArgumentException ae) {
MessageService.ShowError(ResourceService.GetString("RegExpTk.Messages.CompilationError") + " " + ae.Message);
return;
}
string aboluteFileName = Path.GetFullPath(((TextBox)ControlDictionary["AssemblyFileCompileFileTextBox"]).Text);
string aboluteFileName = Path.GetFullPath(((TextBox)ControlDictionary["AssemblyFileCompileFileTextBox"]).Text);
((StatusBar)ControlDictionary["StatusBar"]).Text = ResourceService.GetString("RegExpTk.Messages.FileCreated") + " " + aboluteFileName;
}

Loading…
Cancel
Save