[mapguide-commits] r5825 - in trunk/Tools/Maestro: Maestro.Base Maestro.Base/Commands/SiteExplorer Maestro.Base/Editor Maestro.Base/Properties Maestro.Editors Maestro.Editors/FeatureSource Maestro.Editors/Properties OSGeo.MapGuide.MaestroAPI/ObjectModels OSGeo.MapGuide.MaestroAPI/Properties

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri May 20 09:50:13 EDT 2011


Author: jng
Date: 2011-05-20 06:50:13 -0700 (Fri, 20 May 2011)
New Revision: 5825

Added:
   trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/ShowSpatialContextsCommand.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.resx
Modified:
   trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.Designer.cs
   trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.cs
   trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.resx
   trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin
   trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
   trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
   trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/FeatureSource.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx
Log:
#1699: Add show spatial contexts command to the Site Explorer context menu and as an extra command in the Feature Source editor


Added: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/ShowSpatialContextsCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/ShowSpatialContextsCommand.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/ShowSpatialContextsCommand.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -0,0 +1,54 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+using Maestro.Base.Services;
+using Maestro.Editors.FeatureSource;
+
+namespace Maestro.Base.Commands.SiteExplorer
+{
+    internal class ShowSpatialContextsCommand : AbstractMenuCommand
+    {
+        public override void Run()
+        {
+            var wb = Workbench.Instance;
+            if (wb != null)
+            {
+                if (wb.ActiveSiteExplorer != null)
+                {
+                    var items = wb.ActiveSiteExplorer.SelectedItems;
+                    if (items.Length == 1)
+                    {
+                        var it = items[0];
+                        if (it.ResourceType == "FeatureSource")
+                        {
+                            var connMgr = ServiceRegistry.GetService<ServerConnectionManager>();
+                            var conn = connMgr.GetConnection(wb.ActiveSiteExplorer.ConnectionName);
+
+                            new SpatialContextsDialog(it.ResourceId, conn.FeatureService).ShowDialog();
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.Designer.cs	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.Designer.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -31,11 +31,13 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FsEditorOptionPanel));
             this.btnLocalPreview = new System.Windows.Forms.Button();
             this.btnEditConfiguration = new System.Windows.Forms.Button();
+            this.btnSpatialContexts = new System.Windows.Forms.Button();
             this.contentPanel.SuspendLayout();
             this.SuspendLayout();
             // 
             // contentPanel
             // 
+            this.contentPanel.Controls.Add(this.btnSpatialContexts);
             this.contentPanel.Controls.Add(this.btnEditConfiguration);
             this.contentPanel.Controls.Add(this.btnLocalPreview);
             resources.ApplyResources(this.contentPanel, "contentPanel");
@@ -54,6 +56,13 @@
             this.btnEditConfiguration.UseVisualStyleBackColor = true;
             this.btnEditConfiguration.Click += new System.EventHandler(this.btnEditConfiguration_Click);
             // 
+            // btnSpatialContexts
+            // 
+            resources.ApplyResources(this.btnSpatialContexts, "btnSpatialContexts");
+            this.btnSpatialContexts.Name = "btnSpatialContexts";
+            this.btnSpatialContexts.UseVisualStyleBackColor = true;
+            this.btnSpatialContexts.Click += new System.EventHandler(this.btnSpatialContexts_Click);
+            // 
             // FsEditorOptionPanel
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -69,5 +78,6 @@
 
         private System.Windows.Forms.Button btnEditConfiguration;
         private System.Windows.Forms.Button btnLocalPreview;
+        private System.Windows.Forms.Button btnSpatialContexts;
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.cs	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -35,6 +35,7 @@
 using System.IO;
 using System.Diagnostics;
 using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.FeatureSource;
 
 namespace Maestro.Base.Editor
 {
@@ -128,5 +129,10 @@
                 OnResourceChanged();
             }
         }
+
+        private void btnSpatialContexts_Click(object sender, EventArgs e)
+        {
+            new SpatialContextsDialog(_fs).ShowDialog();
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.resx	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/FsEditorOptionPanel.resx	2011-05-20 13:50:13 UTC (rev 5825)
@@ -118,13 +118,37 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnSpatialContexts.Location" type="System.Drawing.Point, System.Drawing">
+    <value>323, 17</value>
+  </data>
+  <data name="btnSpatialContexts.Size" type="System.Drawing.Size, System.Drawing">
+    <value>112, 23</value>
+  </data>
+  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="btnSpatialContexts.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="btnSpatialContexts.Text" xml:space="preserve">
+    <value>Spatial Contexts</value>
+  </data>
+  <data name="&gt;&gt;btnSpatialContexts.Name" xml:space="preserve">
+    <value>btnSpatialContexts</value>
+  </data>
+  <data name="&gt;&gt;btnSpatialContexts.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;btnSpatialContexts.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;btnSpatialContexts.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
   <data name="btnEditConfiguration.Location" type="System.Drawing.Point, System.Drawing">
     <value>149, 17</value>
   </data>
   <data name="btnEditConfiguration.Size" type="System.Drawing.Size, System.Drawing">
     <value>168, 23</value>
   </data>
-  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="btnEditConfiguration.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
   </data>
@@ -141,7 +165,7 @@
     <value>contentPanel</value>
   </data>
   <data name="&gt;&gt;btnEditConfiguration.ZOrder" xml:space="preserve">
-    <value>0</value>
+    <value>1</value>
   </data>
   <data name="btnLocalPreview.Location" type="System.Drawing.Point, System.Drawing">
     <value>21, 17</value>
@@ -165,7 +189,7 @@
     <value>contentPanel</value>
   </data>
   <data name="&gt;&gt;btnLocalPreview.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>2</value>
   </data>
   <data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
     <value>449, 59</value>
@@ -192,6 +216,6 @@
     <value>FsEditorOptionPanel</value>
   </data>
   <data name="&gt;&gt;$this.Type" xml:space="preserve">
-    <value>Maestro.Editors.Common.EditorBindableCollapsiblePanel, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.Common.EditorBindableCollapsiblePanel, Maestro.Editors, Version=3.0.0.5728, Culture=neutral, PublicKeyToken=null</value>
   </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin	2011-05-20 13:50:13 UTC (rev 5825)
@@ -512,12 +512,18 @@
             <MenuItem id="FindReplaceXml"
                       label="${res:SiteExplorer_FindReplaceXml}"
                       class="Maestro.Base.Commands.SiteExplorer.FindReplaceXmlContentCommand" />
+            <MenuItem type="Separator" />
             <Condition action="Disable" name="ResourceType" types="FeatureSource,LayerDefinition">
                 <MenuItem id="PurgeFsCache"
                           label="${res:SiteExplorer_PurgeFsCache}"
                           icon="arrow_circle_double"
                           class="Maestro.Base.Commands.SiteExplorer.PurgeFeatureSourceCacheCommand" />
             </Condition>
+            <Condition action="Disable" name="ResourceType" types="FeatureSource">
+                <MenuItem id="ShowSpatialContexts"
+                          label="${res:SiteExplorer_ShowSpatialContexts}"
+                          class="Maestro.Base.Commands.SiteExplorer.ShowSpatialContextsCommand" />
+            </Condition>
             <MenuItem type="Separator" />
             <Condition action="Disable" name="CanCutOrCopy">
                 <MenuItem id="Copy"

Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj	2011-05-20 13:50:13 UTC (rev 5825)
@@ -118,6 +118,7 @@
     <Compile Include="Commands\SiteExplorer\RenameCommand.cs" />
     <Compile Include="Commands\SiteExplorer\RepointCommand.cs" />
     <Compile Include="Commands\SiteExplorer\ResourcePropertiesCommand.cs" />
+    <Compile Include="Commands\SiteExplorer\ShowSpatialContextsCommand.cs" />
     <Compile Include="Commands\SiteExplorer\ValidateCommand.cs" />
     <Compile Include="Commands\StartupCommand.cs" />
     <Compile Include="Commands\Test\OpenCoordinateSystemPickerCommand.cs" />

Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -2002,6 +2002,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Show Spatial Contexts.
+        /// </summary>
+        internal static string SiteExplorer_ShowSpatialContexts {
+            get {
+                return ResourceManager.GetString("SiteExplorer_ShowSpatialContexts", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Validate.
         /// </summary>
         internal static string SiteExplorer_ValidateResources {

Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx	2011-05-20 13:50:13 UTC (rev 5825)
@@ -1019,4 +1019,7 @@
   <data name="Menu_Help_UserGuide" xml:space="preserve">
     <value>User Guide</value>
   </data>
+  <data name="SiteExplorer_ShowSpatialContexts" xml:space="preserve">
+    <value>Show Spatial Contexts</value>
+  </data>
 </root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.Designer.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -0,0 +1,96 @@
+namespace Maestro.Editors.FeatureSource
+{
+    partial class SpatialContextsDialog
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SpatialContextsDialog));
+            this.btnClose = new System.Windows.Forms.Button();
+            this.grdSpatialContexts = new System.Windows.Forms.DataGridView();
+            this.lblCount = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.lblFeatureSource = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.grdSpatialContexts)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // btnClose
+            // 
+            resources.ApplyResources(this.btnClose, "btnClose");
+            this.btnClose.Name = "btnClose";
+            this.btnClose.UseVisualStyleBackColor = true;
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // grdSpatialContexts
+            // 
+            this.grdSpatialContexts.AllowUserToAddRows = false;
+            this.grdSpatialContexts.AllowUserToDeleteRows = false;
+            resources.ApplyResources(this.grdSpatialContexts, "grdSpatialContexts");
+            this.grdSpatialContexts.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdSpatialContexts.Name = "grdSpatialContexts";
+            this.grdSpatialContexts.ReadOnly = true;
+            // 
+            // lblCount
+            // 
+            resources.ApplyResources(this.lblCount, "lblCount");
+            this.lblCount.Name = "lblCount";
+            // 
+            // label1
+            // 
+            resources.ApplyResources(this.label1, "label1");
+            this.label1.Name = "label1";
+            // 
+            // lblFeatureSource
+            // 
+            resources.ApplyResources(this.lblFeatureSource, "lblFeatureSource");
+            this.lblFeatureSource.Name = "lblFeatureSource";
+            // 
+            // SpatialContextsDialog
+            // 
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            resources.ApplyResources(this, "$this");
+            this.ControlBox = false;
+            this.Controls.Add(this.lblFeatureSource);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.lblCount);
+            this.Controls.Add(this.grdSpatialContexts);
+            this.Controls.Add(this.btnClose);
+            this.Name = "SpatialContextsDialog";
+            ((System.ComponentModel.ISupportInitialize)(this.grdSpatialContexts)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnClose;
+        private System.Windows.Forms.DataGridView grdSpatialContexts;
+        private System.Windows.Forms.Label lblCount;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label lblFeatureSource;
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -0,0 +1,61 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+using OSGeo.MapGuide.MaestroAPI.Services;
+
+namespace Maestro.Editors.FeatureSource
+{
+    public partial class SpatialContextsDialog : Form
+    {
+        private SpatialContextsDialog()
+        {
+            InitializeComponent();
+        }
+
+        public SpatialContextsDialog(IFeatureSource fs)
+            : this()
+        {
+            lblFeatureSource.Text = fs.ResourceID;
+            grdSpatialContexts.DataSource = fs.GetSpatialInfo(false).SpatialContext;
+            lblCount.Text = string.Format(Properties.Resources.SpatialContextsFound, grdSpatialContexts.Rows.Count);
+        }
+
+        public SpatialContextsDialog(string fsId, IFeatureService featSvc)
+            : this()
+        {
+            lblFeatureSource.Text = fsId;
+            grdSpatialContexts.DataSource = featSvc.GetSpatialContextInfo(fsId, false).SpatialContext;
+            lblCount.Text = string.Format(Properties.Resources.SpatialContextsFound, grdSpatialContexts.Rows.Count);
+        }
+
+        private void btnClose_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/SpatialContextsDialog.resx	2011-05-20 13:50:13 UTC (rev 5825)
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="btnClose.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
+    <value>546, 198</value>
+  </data>
+  <data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
+    <value>75, 23</value>
+  </data>
+  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="btnClose.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="btnClose.Text" xml:space="preserve">
+    <value>Close</value>
+  </data>
+  <data name="&gt;&gt;btnClose.Name" xml:space="preserve">
+    <value>btnClose</value>
+  </data>
+  <data name="&gt;&gt;btnClose.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="grdSpatialContexts.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Bottom, Left, Right</value>
+  </data>
+  <data name="grdSpatialContexts.Location" type="System.Drawing.Point, System.Drawing">
+    <value>13, 39</value>
+  </data>
+  <data name="grdSpatialContexts.Size" type="System.Drawing.Size, System.Drawing">
+    <value>608, 153</value>
+  </data>
+  <data name="grdSpatialContexts.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="&gt;&gt;grdSpatialContexts.Name" xml:space="preserve">
+    <value>grdSpatialContexts</value>
+  </data>
+  <data name="&gt;&gt;grdSpatialContexts.Type" xml:space="preserve">
+    <value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;grdSpatialContexts.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;grdSpatialContexts.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="lblCount.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Left</value>
+  </data>
+  <data name="lblCount.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="lblCount.Location" type="System.Drawing.Point, System.Drawing">
+    <value>12, 203</value>
+  </data>
+  <data name="lblCount.Size" type="System.Drawing.Size, System.Drawing">
+    <value>0, 13</value>
+  </data>
+  <data name="lblCount.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="&gt;&gt;lblCount.Name" xml:space="preserve">
+    <value>lblCount</value>
+  </data>
+  <data name="&gt;&gt;lblCount.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;lblCount.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;lblCount.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="label1.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>13, 13</value>
+  </data>
+  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>83, 13</value>
+  </data>
+  <data name="label1.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="label1.Text" xml:space="preserve">
+    <value>Feature Source:</value>
+  </data>
+  <data name="&gt;&gt;label1.Name" xml:space="preserve">
+    <value>label1</value>
+  </data>
+  <data name="&gt;&gt;label1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label1.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="lblFeatureSource.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="lblFeatureSource.Location" type="System.Drawing.Point, System.Drawing">
+    <value>102, 13</value>
+  </data>
+  <data name="lblFeatureSource.Size" type="System.Drawing.Size, System.Drawing">
+    <value>0, 13</value>
+  </data>
+  <data name="lblFeatureSource.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="&gt;&gt;lblFeatureSource.Name" xml:space="preserve">
+    <value>lblFeatureSource</value>
+  </data>
+  <data name="&gt;&gt;lblFeatureSource.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;lblFeatureSource.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;lblFeatureSource.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
+    <value>633, 233</value>
+  </data>
+  <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
+    <value>CenterParent</value>
+  </data>
+  <data name="$this.Text" xml:space="preserve">
+    <value>Spatial Contexts</value>
+  </data>
+  <data name="&gt;&gt;$this.Name" xml:space="preserve">
+    <value>SpatialContextsDialog</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+</root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-05-20 13:50:13 UTC (rev 5825)
@@ -365,6 +365,12 @@
     <Compile Include="FeatureSource\Providers\Wms\WmsProviderCtrl.Designer.cs">
       <DependentUpon>WmsProviderCtrl.cs</DependentUpon>
     </Compile>
+    <Compile Include="FeatureSource\SpatialContextsDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FeatureSource\SpatialContextsDialog.Designer.cs">
+      <DependentUpon>SpatialContextsDialog.cs</DependentUpon>
+    </Compile>
     <Compile Include="Fusion\FlexibleLayoutEditor.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -1120,6 +1126,9 @@
     <EmbeddedResource Include="FeatureSource\Providers\Wms\WmsProviderCtrl.resx">
       <DependentUpon>WmsProviderCtrl.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSource\SpatialContextsDialog.resx">
+      <DependentUpon>SpatialContextsDialog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Fusion\FlexibleLayoutEditor.resx">
       <DependentUpon>FlexibleLayoutEditor.cs</DependentUpon>
     </EmbeddedResource>

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.4959
+//     Runtime Version:2.0.50727.4952
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -2398,6 +2398,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to {0} spatial contexts found.
+        /// </summary>
+        internal static string SpatialContextsFound {
+            get {
+                return ResourceManager.GetString("SpatialContextsFound", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Specify a map for this web layout.
         /// </summary>
         internal static string SpecifyMapForWebLayout {

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-05-20 13:50:13 UTC (rev 5825)
@@ -1178,4 +1178,7 @@
   <data name="WarningMapExtentCalculation" xml:space="preserve">
     <value>Could not transform extents of one or more layers in this Map Definition. These extents have not been factored into the computed result.</value>
   </data>
+  <data name="SpatialContextsFound" xml:space="preserve">
+    <value>{0} spatial contexts found</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/FeatureSource.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/FeatureSource.cs	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/FeatureSource.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -442,3 +442,23 @@
 
     partial class RelatePropertyType : IRelateProperty { }
 }
+
+namespace OSGeo.MapGuide.ObjectModels.Common
+{
+    using System.Threading;
+
+    partial class FdoSpatialContextListSpatialContextExtent
+    {
+        public override string ToString()
+        {
+            if (this.LowerLeftCoordinate == null || this.UpperRightCoordinate == null)
+                return OSGeo.MapGuide.MaestroAPI.Properties.Resources.NullString;
+
+            return string.Format(Thread.CurrentThread.CurrentUICulture, "({0},{1},{2},{3})",
+                this.LowerLeftCoordinate.X,
+                this.LowerLeftCoordinate.Y,
+                this.UpperRightCoordinate.X,
+                this.UpperRightCoordinate.Y);
+        }
+    }
+}
\ No newline at end of file

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs	2011-05-20 13:50:13 UTC (rev 5825)
@@ -890,6 +890,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to (null).
+        /// </summary>
+        internal static string NullString {
+            get {
+                return ResourceManager.GetString("NullString", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Precondition failure: .
         /// </summary>
         internal static string PrecondFailure {

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx	2011-05-20 12:29:34 UTC (rev 5824)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx	2011-05-20 13:50:13 UTC (rev 5825)
@@ -497,4 +497,7 @@
   <data name="ERR_SERVICE_NOT_SUPPORTED" xml:space="preserve">
     <value>Service Type not supported: {0}</value>
   </data>
+  <data name="NullString" xml:space="preserve">
+    <value>(null)</value>
+  </data>
 </root>
\ No newline at end of file



More information about the mapguide-commits mailing list