[commit] r2166 - trunk/SDK/DotNet/CSharpComponentWizard

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Fri Mar 22 10:25:11 CDT 2013


Author: ksmyth
Date: Fri Mar 22 10:25:10 2013
New Revision: 2166

Log:
Fix invalid path chars and Generate/Back buttons after clicking Generate

Modified:
   trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs

Modified: trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs
==============================================================================
--- trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs	Fri Mar 22 10:24:47 2013	(r2165)
+++ trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs	Fri Mar 22 10:25:10 2013	(r2166)
@@ -8,6 +8,7 @@
 using System.ComponentModel;
 using System.Windows.Media;
 using System.Reflection;
+using System.Linq;
 
 
 namespace CSharpComponentWizard
@@ -176,7 +177,12 @@
             {
                 return false;
             }
-            if (this.txb_SolutionName.Text.Contains(" ") || txb_SolutionName.Text == String.Empty)
+
+            List<char> invalidPathChars = Path.GetInvalidPathChars().ToList();
+            invalidPathChars.Add('\\');
+            invalidPathChars.Add(' ');
+
+            if (this.txb_SolutionName.Text.Any(x => invalidPathChars.Contains(x)) || txb_SolutionName.Text == String.Empty)
             {
                 return false;
             }
@@ -322,6 +328,8 @@
             }
             else if (button.Name == "btn_Generate")
             {
+                button.IsEnabled = false;
+                this.btn_Back6.IsEnabled = false;
                 Generate();
             }
         }
@@ -335,6 +343,8 @@
         {
             this.lbl_Step.Content = txb_GenerationResultSummary.Text;
             this.tbc_WizardTab.SelectedIndex = 6;
+            this.btn_Generate.IsEnabled = true;
+            this.btn_Back6.IsEnabled = true;
         }
 
         private void btn_Back_Click(object sender, RoutedEventArgs e)


More information about the gme-commit mailing list