From 79df003c548d3a228ae9b1922c145149430d8ff3 Mon Sep 17 00:00:00 2001 From: Markus Palme Date: Sat, 23 Sep 2006 10:46:23 +0000 Subject: [PATCH] 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 --- src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs b/src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs index 5e9c9c075c..5170606eeb 100644 --- a/src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs +++ b/src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs @@ -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 { 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 { 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; }