[mapguide-commits] r5934 - in trunk/Tools/Maestro: Maestro.Editors/FeatureSource/Preview Maestro.Editors/Properties OSGeo.MapGuide.MaestroAPI/Schema

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Jun 17 14:04:47 EDT 2011


Author: jng
Date: 2011-06-17 11:04:47 -0700 (Fri, 17 Jun 2011)
New Revision: 5934

Modified:
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.resx
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs
Log:
#1713: Show tooltip information for class and property nodes in Local Feature Source Preview


Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.Designer.cs	2011-06-17 17:44:56 UTC (rev 5933)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.Designer.cs	2011-06-17 18:04:47 UTC (rev 5934)
@@ -38,8 +38,8 @@
             this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
             this.btnSql = new System.Windows.Forms.ToolStripButton();
             this.btnStandard = new System.Windows.Forms.ToolStripButton();
+            this.btnClose = new System.Windows.Forms.ToolStripButton();
             this.tabPreviews = new System.Windows.Forms.TabControl();
-            this.btnClose = new System.Windows.Forms.ToolStripButton();
             this.splitContainer1.Panel1.SuspendLayout();
             this.splitContainer1.Panel2.SuspendLayout();
             this.splitContainer1.SuspendLayout();
@@ -65,6 +65,7 @@
             resources.ApplyResources(this.trvSchema, "trvSchema");
             this.trvSchema.ImageList = this.schemaImageList;
             this.trvSchema.Name = "trvSchema";
+            this.trvSchema.ShowNodeToolTips = true;
             this.trvSchema.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.trvSchema_AfterSelect);
             // 
             // schemaImageList
@@ -117,12 +118,6 @@
             this.btnStandard.Name = "btnStandard";
             this.btnStandard.Click += new System.EventHandler(this.btnStandard_Click);
             // 
-            // tabPreviews
-            // 
-            resources.ApplyResources(this.tabPreviews, "tabPreviews");
-            this.tabPreviews.Name = "tabPreviews";
-            this.tabPreviews.SelectedIndex = 0;
-            // 
             // btnClose
             // 
             this.btnClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
@@ -132,6 +127,12 @@
             this.btnClose.Name = "btnClose";
             this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
             // 
+            // tabPreviews
+            // 
+            resources.ApplyResources(this.tabPreviews, "tabPreviews");
+            this.tabPreviews.Name = "tabPreviews";
+            this.tabPreviews.SelectedIndex = 0;
+            // 
             // LocalFeatureSourcePreviewCtrl
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs	2011-06-17 17:44:56 UTC (rev 5933)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs	2011-06-17 18:04:47 UTC (rev 5934)
@@ -118,6 +118,12 @@
                         classNode.Tag = cls;
                         classNode.ImageIndex = classNode.SelectedImageIndex = IDX_CLASS;
 
+                        classNode.ToolTipText = string.Format(Properties.Resources.FsPreview_ClassNodeTooltip,
+                            cls.Name,
+                            cls.Description,
+                            cls.DefaultGeometryPropertyName,
+                            Environment.NewLine);
+
                         foreach (var prop in cls.Properties)
                         {
                             var propNode = new TreeNode(prop.Name);
@@ -125,11 +131,56 @@
                             propNode.Tag = prop;
 
                             if (prop.Type == PropertyDefinitionType.Geometry)
+                            {
+                                var g = (GeometricPropertyDefinition)prop;
                                 propNode.ImageIndex = propNode.SelectedImageIndex = IDX_GEOMETRY;
-                            else if (prop.Type == PropertyDefinitionType.Data && cls.IdentityProperties.Contains((DataPropertyDefinition)prop))
-                                propNode.ImageIndex = propNode.SelectedImageIndex = IDX_IDENTITY;
+                                propNode.ToolTipText = string.Format(Properties.Resources.FsPreview_GeometryPropertyNodeTooltip,
+                                    g.Name,
+                                    g.Description,
+                                    g.GeometryTypesToString(),
+                                    g.IsReadOnly,
+                                    g.HasElevation,
+                                    g.HasMeasure,
+                                    g.SpatialContextAssociation,
+                                    Environment.NewLine);
+                            }
+                            else if (prop.Type == PropertyDefinitionType.Data)
+                            {
+                                var d = (DataPropertyDefinition)prop;
+                                if (cls.IdentityProperties.Contains((DataPropertyDefinition)prop))
+                                    propNode.ImageIndex = propNode.SelectedImageIndex = IDX_IDENTITY;
+                                else
+                                    propNode.ImageIndex = propNode.SelectedImageIndex = IDX_PROP;
+
+                                propNode.ToolTipText = string.Format(Properties.Resources.FsPreview_DataPropertyNodeTooltip,
+                                    d.Name,
+                                    d.Description,
+                                    d.DataType.ToString(),
+                                    d.IsNullable,
+                                    d.IsReadOnly,
+                                    d.Length,
+                                    d.Precision,
+                                    d.Scale,
+                                    Environment.NewLine);
+                            }
+                            else if (prop.Type == PropertyDefinitionType.Raster)
+                            {
+                                var r = (RasterPropertyDefinition)prop;
+                                propNode.ImageIndex = propNode.SelectedImageIndex = IDX_RASTER;
+
+                                propNode.ToolTipText = string.Format(Properties.Resources.FsPreview_RasterPropertyNodeTooltip,
+                                    r.Name,
+                                    r.Description,
+                                    r.IsNullable,
+                                    r.DefaultImageXSize,
+                                    r.DefaultImageYSize,
+                                    r.SpatialContextAssociation,
+                                    Environment.NewLine);
+                            }
                             else
+                            {
                                 propNode.ImageIndex = propNode.SelectedImageIndex = IDX_PROP;
+                            }
 
                             classNode.Nodes.Add(propNode);
                         }

Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.resx	2011-06-17 17:44:56 UTC (rev 5933)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.resx	2011-06-17 18:04:47 UTC (rev 5934)
@@ -140,7 +140,7 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAw
-        DQAAAk1TRnQBSQFMAgEBBgEAASQBAAEkAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+        DQAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
         AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
         AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
         AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-06-17 17:44:56 UTC (rev 5933)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-06-17 18:04:47 UTC (rev 5934)
@@ -869,6 +869,42 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Name: {0}{3}Description: {1}{3}Geometry Property: {2}.
+        /// </summary>
+        internal static string FsPreview_ClassNodeTooltip {
+            get {
+                return ResourceManager.GetString("FsPreview_ClassNodeTooltip", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Name: {0}{8}Description: {1}{8}Data Type: {2}{8}Nullable: {3}{8}Read Only: {4}{8}Length: {5}{8}Precision: {6}{8}Scale: {7}.
+        /// </summary>
+        internal static string FsPreview_DataPropertyNodeTooltip {
+            get {
+                return ResourceManager.GetString("FsPreview_DataPropertyNodeTooltip", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Name: {0}{7}Description: {1}{7}Geometry Types: {2}{7}Read Only: {3}{7}Has Elevation: {4}{7}Has Measure: {5}{7}Spatial Context: {6}.
+        /// </summary>
+        internal static string FsPreview_GeometryPropertyNodeTooltip {
+            get {
+                return ResourceManager.GetString("FsPreview_GeometryPropertyNodeTooltip", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Name: {0}{6}Description: {1}{6}Nullable: {2}{6}Image X Size: {3}{6}Image Y Size: {4}{6}Spatial Context: {5}.
+        /// </summary>
+        internal static string FsPreview_RasterPropertyNodeTooltip {
+            get {
+                return ResourceManager.GetString("FsPreview_RasterPropertyNodeTooltip", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to SQL Server Spatial Feature Source.
         /// </summary>
         internal static string FsSqlServerSpatial {

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-06-17 17:44:56 UTC (rev 5933)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-06-17 18:04:47 UTC (rev 5934)
@@ -1226,4 +1226,16 @@
   <data name="ResourceDoesntExist" xml:space="preserve">
     <value>Resource doesn't exist</value>
   </data>
+  <data name="FsPreview_ClassNodeTooltip" xml:space="preserve">
+    <value>Name: {0}{3}Description: {1}{3}Geometry Property: {2}</value>
+  </data>
+  <data name="FsPreview_DataPropertyNodeTooltip" xml:space="preserve">
+    <value>Name: {0}{8}Description: {1}{8}Data Type: {2}{8}Nullable: {3}{8}Read Only: {4}{8}Length: {5}{8}Precision: {6}{8}Scale: {7}</value>
+  </data>
+  <data name="FsPreview_GeometryPropertyNodeTooltip" xml:space="preserve">
+    <value>Name: {0}{7}Description: {1}{7}Geometry Types: {2}{7}Read Only: {3}{7}Has Elevation: {4}{7}Has Measure: {5}{7}Spatial Context: {6}</value>
+  </data>
+  <data name="FsPreview_RasterPropertyNodeTooltip" xml:space="preserve">
+    <value>Name: {0}{6}Description: {1}{6}Nullable: {2}{6}Image X Size: {3}{6}Image Y Size: {4}{6}Spatial Context: {5}</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs	2011-06-17 17:44:56 UTC (rev 5933)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs	2011-06-17 18:04:47 UTC (rev 5934)
@@ -243,7 +243,7 @@
             this.SpatialContextAssociation = (srs != null ? srs.Value : string.Empty);
         }
 
-        private string GeometryTypesToString()
+        public string GeometryTypesToString()
         {
             List<string> values = new List<string>();
             var gts = GetIndividualGeometricTypes();



More information about the mapguide-commits mailing list