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

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue May 24 12:27:01 EDT 2011


Author: jng
Date: 2011-05-24 09:27:00 -0700 (Tue, 24 May 2011)
New Revision: 5848

Modified:
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
Log:
#1688: When a .mdb or .xls extension is found in the data path, ask if the user wants to use Office 2010 ODBC drivers which are 64-bit compatible. Also implement file browsing and aliased browsing.


Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs	2011-05-24 16:08:24 UTC (rev 5847)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs	2011-05-24 16:27:00 UTC (rev 5848)
@@ -66,9 +66,15 @@
                 case ".ACCDB":
                     return Properties.Resources.OdbcDriverAccess64;
                 case ".MDB":
-                    return Properties.Resources.OdbcDriverAccess;
+                    if (MessageBox.Show(Properties.Resources.PromptUseOffice2010Drivers, Properties.Resources.TitleQuestion, MessageBoxButtons.YesNo) == DialogResult.Yes)
+                        return Properties.Resources.OdbcDriverAccess64;
+                    else
+                        return Properties.Resources.OdbcDriverAccess;
                 case ".XLS":
-                    return Properties.Resources.OdbcDriverExcel;
+                    if (MessageBox.Show(Properties.Resources.PromptUseOffice2010Drivers, Properties.Resources.TitleQuestion, MessageBoxButtons.YesNo) == DialogResult.Yes)
+                        return Properties.Resources.OdbcDriverExcel64;
+                    else
+                        return Properties.Resources.OdbcDriverExcel;
                 case ".XLSX":
                 case ".XLSM":
                 case ".XLSB":
@@ -116,9 +122,9 @@
             using (var open = new OpenFileDialog())
             {
                 open.Filter = Properties.Resources.OdbcDriverAccess + "|*.mdb|" +
-                              Properties.Resources.OdbcDriverAccess64 + "|*.accdb|" + 
+                              Properties.Resources.OdbcDriverAccess64 + "|*.accdb,*.mdb|" + 
                               Properties.Resources.OdbcDriverExcel + "|*.xls|" +
-                              Properties.Resources.OdbcDriverExcel64 + "|*.xlsx, *.xlsm, *.xlsb";
+                              Properties.Resources.OdbcDriverExcel64 + "|*.xlsx,*.xlsm,*.xlsb";
 
                 if (open.ShowDialog() == DialogResult.OK)
                 {

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-05-24 16:08:24 UTC (rev 5847)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-05-24 16:27:00 UTC (rev 5848)
@@ -2156,6 +2156,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Use Office 2010 Drivers? (these are 64-bit compatible).
+        /// </summary>
+        internal static string PromptUseOffice2010Drivers {
+            get {
+                return ResourceManager.GetString("PromptUseOffice2010Drivers", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Could not find possible values for enumerable property.
         /// </summary>
         internal static string PropEnumNoValues {

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-05-24 16:08:24 UTC (rev 5847)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-05-24 16:27:00 UTC (rev 5848)
@@ -1190,4 +1190,7 @@
   <data name="ruler1" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\ruler1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="PromptUseOffice2010Drivers" xml:space="preserve">
+    <value>Use Office 2010 Drivers? (these are 64-bit compatible)</value>
+  </data>
 </root>
\ No newline at end of file



More information about the mapguide-commits mailing list