[mapguide-commits] r5674 - in trunk/Tools/Maestro/Maestro.Editors: FeatureSource/Providers/Odbc Properties

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Apr 4 10:30:25 EDT 2011


Author: jng
Date: 2011-04-04 07:30:25 -0700 (Mon, 04 Apr 2011)
New Revision: 5674

Modified:
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/OdbcProviderCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
Log:
#1640: Ensure that a valid connection is set (via testing) before configuring the schema or resetting the configuration document.


Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/OdbcProviderCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/OdbcProviderCtrl.cs	2011-04-04 14:12:34 UTC (rev 5673)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/OdbcProviderCtrl.cs	2011-04-04 14:30:25 UTC (rev 5674)
@@ -208,6 +208,12 @@
 
         private void btnEditSchema_Click(object sender, EventArgs e)
         {
+            if (string.IsNullOrEmpty(_fs.ConnectionString))
+            {
+                MessageBox.Show(Properties.Resources.NoConnectionSet);
+                return;
+            }
+
             if (string.IsNullOrEmpty(_defaultSchemaName))
             {
                 var names = _fs.GetSchemaNames();
@@ -274,6 +280,12 @@
 
         private void btnReset_Click(object sender, EventArgs e)
         {
+            if (string.IsNullOrEmpty(_fs.ConnectionString))
+            {
+                MessageBox.Show(Properties.Resources.NoConnectionSet);
+                return;
+            }
+
             _fs.SetConfigurationContent(null);
             _fs.ConfigurationDocument = null;
             _service.SyncSessionCopy();

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-04-04 14:12:34 UTC (rev 5673)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-04-04 14:30:25 UTC (rev 5674)
@@ -1852,6 +1852,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Could not determine the validity of this feature source. Please test the connection first to ensure a valid connection..
+        /// </summary>
+        internal static string NoConnectionSet {
+            get {
+                return ResourceManager.GetString("NoConnectionSet", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to You have not selected a starting folder, do you want to back up the entire site?.
         /// </summary>
         internal static string NoFolderSelected {

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-04-04 14:12:34 UTC (rev 5673)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-04-04 14:30:25 UTC (rev 5674)
@@ -1154,4 +1154,7 @@
   <data name="TitleNewFeatureClass" xml:space="preserve">
     <value>New Feature Class</value>
   </data>
+  <data name="NoConnectionSet" xml:space="preserve">
+    <value>Could not determine the validity of this feature source. Please test the connection first to ensure a valid connection.</value>
+  </data>
 </root>
\ No newline at end of file



More information about the mapguide-commits mailing list