[mapguide-commits] r5952 - in trunk/Tools/Maestro: Maestro.AddIn.ExtendedObjectModels Maestro.AddIn.ExtendedObjectModels/Properties Maestro.AddIn.ExtendedObjectModels/Resources Maestro.AddIn.ExtendedObjectModels/Templates Maestro.Base/Templates Maestro.Editors Maestro.Editors/LayerDefinition Maestro.Editors/LayerDefinition/Vector Maestro.Editors/LayerDefinition/Vector/Scales Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors Maestro.Editors/Properties Maestro.Editors/SymbolDefinition OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/ObjectModels

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jun 28 11:57:51 EDT 2011


Author: jng
Date: 2011-06-28 08:57:51 -0700 (Tue, 28 Jun 2011)
New Revision: 5952

Added:
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Resources/marker.png
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.resx
Modified:
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx
   trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/SymbolDefinition110ItemTemplate.cs
   trunk/Tools/Maestro/Maestro.Base/Templates/SymbolDefinitionItemTemplate.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.resx
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.resx
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs
   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/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/CommonTypes.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerFactory.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefFactory.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs
Log:
#1714: Submit further work on editor support for symbol definitions. Many symbol-related interfaces had to be changed. Also fix serialization problems with CompoundSymbolDefinition relating to attributes attached to inline SymbolDefinition elements messing up the DBXML content model


Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj	2011-06-28 15:57:51 UTC (rev 5952)
@@ -112,6 +112,7 @@
     <Content Include="Manifest.addin">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <None Include="Resources\marker.png" />
     <None Include="Resources\application-browser.png" />
     <None Include="Resources\map.png" />
     <None Include="Resources\layer.png" />

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -129,6 +129,13 @@
             }
         }
         
+        internal static System.Drawing.Bitmap marker {
+            get {
+                object obj = ResourceManager.GetObject("marker", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to MapGuide Open Source 1.2 / MapGuide Enterprise 2008.
         /// </summary>

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx	2011-06-28 15:57:51 UTC (rev 5952)
@@ -199,4 +199,7 @@
   <data name="DefaultSymbolName" xml:space="preserve">
     <value>MySymbol</value>
   </data>
+  <data name="marker" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\marker.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Resources/marker.png
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Resources/marker.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/SymbolDefinition110ItemTemplate.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/SymbolDefinition110ItemTemplate.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Templates/SymbolDefinition110ItemTemplate.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -34,7 +34,7 @@
         public SimpleSymbolDefinitionItem110Template()
         {
             Category = Res.TPL_CATEGORY_MGOS20;
-            Icon = Res.images_stack;
+            Icon = Res.marker;
             Description = Res.TPL_SSD_DESC;
             Name = Res.TPL_SSD_NAME;
             ResourceType = ResourceTypes.SymbolDefinition.ToString();
@@ -59,7 +59,7 @@
         public CompoundSymbolDefinition110ItemTemplate()
         {
             Category = Res.TPL_CATEGORY_MGOS20;
-            Icon = Res.images_stack;
+            Icon = Res.marker;
             Description = Res.TPL_CSD_DESC;
             Name = Res.TPL_CSD_NAME;
             ResourceType = ResourceTypes.SymbolDefinition.ToString();

Modified: trunk/Tools/Maestro/Maestro.Base/Templates/SymbolDefinitionItemTemplate.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Templates/SymbolDefinitionItemTemplate.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Base/Templates/SymbolDefinitionItemTemplate.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -33,7 +33,7 @@
         public SimpleSymbolDefinitionItemTemplate()
         {
             Category = Res.TPL_CATEGORY_DEFAULT;
-            Icon = Res.images_stack;
+            Icon = Res.marker;
             Description = Res.TPL_SSD_DESC;
             Name = Res.TPL_SSD_NAME;
             ResourceType = ResourceTypes.SymbolDefinition.ToString();
@@ -58,7 +58,7 @@
         public CompoundSymbolDefinitionItemTemplate()
         {
             Category = Res.TPL_CATEGORY_DEFAULT;
-            Icon = Res.images_stack;
+            Icon = Res.marker;
             Description = Res.TPL_CSD_DESC;
             Name = Res.TPL_CSD_NAME;
             ResourceType = ResourceTypes.SymbolDefinition.ToString();

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -208,6 +208,8 @@
                 m_lrt.LegendLabel = LegendLabel.Text;
             else if (m_art != null)
                 m_art.LegendLabel = LegendLabel.Text;
+            else if (m_comp != null)
+                m_comp.LegendLabel = LegendLabel.Text;
 
             SignalChanged();
         }
@@ -232,6 +234,11 @@
                 if (ItemChanged != null)
                     ItemChanged(m_art, null);
             }
+            else if (m_comp != null)
+            {
+                if (ItemChanged != null)
+                    ItemChanged(m_comp, null);
+            }
         }
 
         private void LabelStyle_ItemChanged(object sender, EventArgs e)

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -178,7 +178,7 @@
                 ThemeCreator dlg = new ThemeCreator(
                     m_owner.Editor, 
                     layer,
-                    m_owner.Schema, 
+                    m_owner.SelectedClass, 
                     owner);
                 if (dlg.ShowDialog(this) == DialogResult.OK)
                 {

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -164,32 +164,32 @@
             UserControl uc = null;
             if (isLabel)
             {
-                uc = new FontStyleEditor(m_owner.Editor, m_owner.Schema, m_owner.FeatureSourceId);
+                uc = new FontStyleEditor(m_owner.Editor, m_owner.SelectedClass, m_owner.FeatureSourceId);
                 ((FontStyleEditor)uc).Item = m_label == null ? null : (ITextSymbol)m_label.Clone(); //(ITextSymbol)Utility.DeepCopy(m_label);
             }
             else if (isW2dSymbol)
             {
-                uc = new PointFeatureStyleEditor(m_owner.Editor, m_owner.Schema, m_owner.FeatureSourceId, m_w2dsymbol);
+                uc = new PointFeatureStyleEditor(m_owner.Editor, m_owner.SelectedClass, m_owner.FeatureSourceId, m_w2dsymbol);
                 ((PointFeatureStyleEditor)uc).Item = m_point == null ? null : (IPointSymbolization2D)m_point.Clone(); //(IPointSymbolization2D)Utility.XmlDeepCopy(m_point);
             }
             else if (isPoint)
             {
-                uc = new PointFeatureStyleEditor(m_owner.Editor, m_owner.Schema, m_owner.FeatureSourceId);
+                uc = new PointFeatureStyleEditor(m_owner.Editor, m_owner.SelectedClass, m_owner.FeatureSourceId);
                 ((PointFeatureStyleEditor)uc).Item = m_point == null ? null : (IPointSymbolization2D)m_point.Clone(); //(IPointSymbolization2D)Utility.XmlDeepCopy(m_point);
             }
             else if (isLine)
             {
-                uc = new LineFeatureStyleEditor(m_owner.Editor, m_owner.Schema, m_owner.FeatureSourceId, _factory);
+                uc = new LineFeatureStyleEditor(m_owner.Editor, m_owner.SelectedClass, m_owner.FeatureSourceId, _factory);
                 ((LineFeatureStyleEditor)uc).Item = m_line == null ? null : LayerElementCloningUtil.CloneStrokes(m_line);//(IList<IStroke>)Utility.XmlDeepCopy(m_line);
             }
             else if (isArea)
             {
-                uc = new AreaFeatureStyleEditor(m_owner.Editor, m_owner.Schema, m_owner.FeatureSourceId);
+                uc = new AreaFeatureStyleEditor(m_owner.Editor, m_owner.SelectedClass, m_owner.FeatureSourceId);
                 ((AreaFeatureStyleEditor)uc).Item = m_area == null ? null : (IAreaSymbolizationFill)m_area.Clone(); //(IAreaSymbolizationFill)Utility.XmlDeepCopy(m_area);
             }
             else if (isComp)
             {
-                var diag = new SymbolInstancesDialog(m_owner.Editor, m_comp);
+                var diag = new SymbolInstancesDialog(m_owner.Editor, m_comp, m_owner.SelectedClass, m_owner.GetFdoProvider(), m_owner.FeatureSourceId);
                 diag.ShowDialog();
                 return;
             }

Added: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.Designer.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -0,0 +1,74 @@
+namespace Maestro.Editors.LayerDefinition.Vector.Scales.SymbolInstanceEditors
+{
+    partial class ReferenceCtrl
+    {
+        /// <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 Component 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(ReferenceCtrl));
+            this.label1 = new System.Windows.Forms.Label();
+            this.txtResourceId = new System.Windows.Forms.TextBox();
+            this.btnBrowse = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            resources.ApplyResources(this.label1, "label1");
+            this.label1.Name = "label1";
+            // 
+            // txtResourceId
+            // 
+            resources.ApplyResources(this.txtResourceId, "txtResourceId");
+            this.txtResourceId.Name = "txtResourceId";
+            this.txtResourceId.ReadOnly = true;
+            // 
+            // btnBrowse
+            // 
+            resources.ApplyResources(this.btnBrowse, "btnBrowse");
+            this.btnBrowse.Name = "btnBrowse";
+            this.btnBrowse.UseVisualStyleBackColor = true;
+            this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
+            // 
+            // ReferenceCtrl
+            // 
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            this.Controls.Add(this.btnBrowse);
+            this.Controls.Add(this.txtResourceId);
+            this.Controls.Add(this.label1);
+            this.Name = "ReferenceCtrl";
+            resources.ApplyResources(this, "$this");
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox txtResourceId;
+        private System.Windows.Forms.Button btnBrowse;
+    }
+}

Added: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -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.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+using Maestro.Shared.UI;
+using OSGeo.MapGuide.MaestroAPI.Services;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace Maestro.Editors.LayerDefinition.Vector.Scales.SymbolInstanceEditors
+{
+    internal partial class ReferenceCtrl : UserControl
+    {
+        private IResourceService _resSvc;
+        private ISymbolInstanceReferenceLibrary _libRef;
+
+        public ReferenceCtrl(ISymbolInstanceReferenceLibrary libRef, IResourceService resSvc)
+        {
+            InitializeComponent();
+            _libRef = libRef;
+            _resSvc = resSvc;
+            TextBoxBinder.BindText(txtResourceId, _libRef, "ResourceId");
+        }
+
+        private void btnBrowse_Click(object sender, EventArgs e)
+        {
+            using (var picker = new ResourcePicker(_resSvc, 
+                                                   ResourceTypes.SymbolDefinition, 
+                                                   ResourcePickerMode.OpenResource))
+            {
+                if (picker.ShowDialog() == DialogResult.OK)
+                {
+                    txtResourceId.Text = picker.ResourceID;
+                }
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceEditors/ReferenceCtrl.resx	2011-06-28 15:57:51 UTC (rev 5952)
@@ -0,0 +1,213 @@
+<?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="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="label1.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>13, 16</value>
+  </data>
+  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>102, 13</value>
+  </data>
+  <data name="label1.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="label1.Text" xml:space="preserve">
+    <value>Symbol Definition ID</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>2</value>
+  </data>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="txtResourceId.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Left, Right</value>
+  </data>
+  <data name="txtResourceId.Location" type="System.Drawing.Point, System.Drawing">
+    <value>16, 32</value>
+  </data>
+  <data name="txtResourceId.Size" type="System.Drawing.Size, System.Drawing">
+    <value>398, 20</value>
+  </data>
+  <data name="txtResourceId.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="&gt;&gt;txtResourceId.Name" xml:space="preserve">
+    <value>txtResourceId</value>
+  </data>
+  <data name="&gt;&gt;txtResourceId.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;txtResourceId.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;txtResourceId.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="btnBrowse.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Right</value>
+  </data>
+  <data name="btnBrowse.Location" type="System.Drawing.Point, System.Drawing">
+    <value>420, 30</value>
+  </data>
+  <data name="btnBrowse.Size" type="System.Drawing.Size, System.Drawing">
+    <value>28, 23</value>
+  </data>
+  <data name="btnBrowse.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="btnBrowse.Text" xml:space="preserve">
+    <value>...</value>
+  </data>
+  <data name="&gt;&gt;btnBrowse.Name" xml:space="preserve">
+    <value>btnBrowse</value>
+  </data>
+  <data name="&gt;&gt;btnBrowse.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;btnBrowse.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;btnBrowse.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.Size" type="System.Drawing.Size, System.Drawing">
+    <value>460, 72</value>
+  </data>
+  <data name="&gt;&gt;$this.Name" xml:space="preserve">
+    <value>ReferenceCtrl</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>System.Windows.Forms.UserControl, 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/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.Designer.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.Designer.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -30,41 +30,39 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymbolInstanceSettingsCtrl));
             this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            this.grdOverrides = new System.Windows.Forms.DataGridView();
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();
-            this.btnAdd = new System.Windows.Forms.ToolStripButton();
+            this.btnAdd = new System.Windows.Forms.ToolStripDropDownButton();
             this.btnEdit = new System.Windows.Forms.ToolStripButton();
             this.btnDelete = new System.Windows.Forms.ToolStripButton();
-            this.btnRefresh = new System.Windows.Forms.ToolStripButton();
             this.grpSettings = new System.Windows.Forms.GroupBox();
             this.groupBox1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdOverrides)).BeginInit();
             this.toolStrip1.SuspendLayout();
             this.SuspendLayout();
             // 
             // groupBox1
             // 
-            this.groupBox1.Controls.Add(this.dataGridView1);
+            this.groupBox1.Controls.Add(this.grdOverrides);
             this.groupBox1.Controls.Add(this.toolStrip1);
             resources.ApplyResources(this.groupBox1, "groupBox1");
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.TabStop = false;
             // 
-            // dataGridView1
+            // grdOverrides
             // 
-            this.dataGridView1.AllowUserToAddRows = false;
-            this.dataGridView1.AllowUserToDeleteRows = false;
-            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            resources.ApplyResources(this.dataGridView1, "dataGridView1");
-            this.dataGridView1.Name = "dataGridView1";
+            this.grdOverrides.AllowUserToAddRows = false;
+            this.grdOverrides.AllowUserToDeleteRows = false;
+            this.grdOverrides.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            resources.ApplyResources(this.grdOverrides, "grdOverrides");
+            this.grdOverrides.Name = "grdOverrides";
             // 
             // toolStrip1
             // 
             this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.btnAdd,
             this.btnEdit,
-            this.btnDelete,
-            this.btnRefresh});
+            this.btnDelete});
             resources.ApplyResources(this.toolStrip1, "toolStrip1");
             this.toolStrip1.Name = "toolStrip1";
             // 
@@ -79,19 +77,15 @@
             this.btnEdit.Image = global::Maestro.Editors.Properties.Resources.document__pencil;
             resources.ApplyResources(this.btnEdit, "btnEdit");
             this.btnEdit.Name = "btnEdit";
+            this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
             // 
             // btnDelete
             // 
             this.btnDelete.Image = global::Maestro.Editors.Properties.Resources.cross_script;
             resources.ApplyResources(this.btnDelete, "btnDelete");
             this.btnDelete.Name = "btnDelete";
+            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
             // 
-            // btnRefresh
-            // 
-            this.btnRefresh.Image = global::Maestro.Editors.Properties.Resources.arrow_circle_135;
-            resources.ApplyResources(this.btnRefresh, "btnRefresh");
-            this.btnRefresh.Name = "btnRefresh";
-            // 
             // grpSettings
             // 
             resources.ApplyResources(this.grpSettings, "grpSettings");
@@ -107,7 +101,7 @@
             resources.ApplyResources(this, "$this");
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdOverrides)).EndInit();
             this.toolStrip1.ResumeLayout(false);
             this.toolStrip1.PerformLayout();
             this.ResumeLayout(false);
@@ -117,12 +111,11 @@
         #endregion
 
         private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.DataGridView dataGridView1;
+        private System.Windows.Forms.DataGridView grdOverrides;
         private System.Windows.Forms.ToolStrip toolStrip1;
         private System.Windows.Forms.GroupBox grpSettings;
-        private System.Windows.Forms.ToolStripButton btnAdd;
         private System.Windows.Forms.ToolStripButton btnEdit;
         private System.Windows.Forms.ToolStripButton btnDelete;
-        private System.Windows.Forms.ToolStripButton btnRefresh;
+        private System.Windows.Forms.ToolStripDropDownButton btnAdd;
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -24,21 +24,152 @@
 using System.Data;
 using System.Text;
 using System.Windows.Forms;
+using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+using OSGeo.MapGuide.MaestroAPI;
 
 namespace Maestro.Editors.LayerDefinition.Vector.Scales
 {
-    public partial class SymbolInstanceSettingsCtrl : UserControl
+    using SymbolInstanceEditors;
+using OSGeo.MapGuide.MaestroAPI.Services;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+using OSGeo.MapGuide.MaestroAPI.Schema;
+
+    internal partial class SymbolInstanceSettingsCtrl : UserControl
     {
         public SymbolInstanceSettingsCtrl()
         {
             InitializeComponent();
+            grdOverrides.DataSource = _params;
         }
 
-        public void SetContent(Control c)
+        private BindingList<IParameterOverride> _params = new BindingList<IParameterOverride>();
+        private ISymbolInstance _symRef;
+        private IEditorService _edSvc;
+
+        private ClassDefinition _cls;
+        private string _provider;
+        private string _featureSourceId;
+
+        public void SetContent(ISymbolInstance symRef, IEditorService edSvc, ClassDefinition cls, string provider, string featureSourceId)
         {
+            _symRef = symRef;
+            _edSvc = edSvc;
+
+            _cls = cls;
+            _provider = provider;
+            _featureSourceId = featureSourceId;
+
+            _params.Clear();
+            //Add existing overrides
+            foreach (var p in symRef.ParameterOverrides.Override)
+            {
+                _params.Add(p);
+            }
+            //Now add available parameters
+            PopulateAvailableParameters();
             grpSettings.Controls.Clear();
+            Control c = CreateEditor(symRef, edSvc.ResourceService);
             c.Dock = DockStyle.Fill;
             grpSettings.Controls.Add(c);
         }
+
+        private void PopulateAvailableParameters()
+        {
+            btnAdd.DropDown.Items.Clear();
+            if (_symRef.Reference.Type == SymbolInstanceType.Reference)
+            {
+                var sym = (ISymbolDefinitionBase)_edSvc.ResourceService.GetResource(((ISymbolInstanceReferenceLibrary)_symRef.Reference).ResourceId);
+                foreach (var p in sym.GetParameters())
+                {
+                    var param = p;
+                    var btn = btnAdd.DropDown.Items.Add(p.Name, null, (s, e) =>
+                    {
+                        AddParameterOverride(sym, param);
+                    });
+                }
+            }
+            else
+            {
+                throw new NotImplementedException();
+            }
+        }
+
+        private void AddParameterOverride(ISymbolDefinitionBase sym, IParameter param)
+        {
+            foreach (var p in _params)
+            {
+                if (p.ParameterIdentifier == param.Name)
+                {
+                    MessageBox.Show(Properties.Resources.ParameterOverrideExists);
+                    return;
+                }
+            }
+
+            var ov = _symRef.ParameterOverrides.CreateParameterOverride(sym.Name, param.Name);
+            ov.SymbolName = sym.Name;
+
+            _params.Add(ov);
+            _symRef.ParameterOverrides.AddOverride(ov);
+            this.RaiseDirty();
+        }
+
+        private void RaiseDirty()
+        {
+            var handler = this.Dirty;
+            if (handler != null)
+                handler(this, EventArgs.Empty);
+        }
+
+        public event EventHandler Dirty;
+
+        private Control CreateEditor(ISymbolInstance symRef, IResourceService resSvc)
+        {
+            Check.NotNull(symRef, "symRef");
+            var ed = new SymbolInstanceSettingsCtrl();
+            if (symRef.Reference.Type == SymbolInstanceType.Reference)
+            {
+                return new ReferenceCtrl((ISymbolInstanceReferenceLibrary)symRef.Reference, resSvc);
+            }
+            else
+            {
+                throw new NotImplementedException();
+
+                var inline = (ISymbolInstanceReferenceInline)symRef.Reference;
+                if (inline.SymbolDefinition.Type == SymbolDefinitionType.Simple)
+                {
+
+                }
+                else
+                {
+
+                }
+            }
+            return ed;
+        }
+
+        private void btnEdit_Click(object sender, EventArgs e)
+        {
+            if (grdOverrides.SelectedRows.Count == 1)
+            {
+                var ov = (IParameterOverride)grdOverrides.SelectedRows[0].DataBoundItem;
+                string expr = _edSvc.EditExpression(ov.ParameterValue, _cls, _provider, _featureSourceId);
+                if (expr != null)
+                {
+                    ov.ParameterValue = expr;
+                    this.RaiseDirty();
+                }
+            }
+        }
+
+        private void btnDelete_Click(object sender, EventArgs e)
+        {
+            if (grdOverrides.SelectedRows.Count == 1)
+            {
+                var ov = (IParameterOverride)grdOverrides.SelectedRows[0].DataBoundItem;
+                _params.Remove(ov);
+                _symRef.ParameterOverrides.RemoveOverride(ov);
+                this.RaiseDirty();
+            }
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.resx	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstanceSettingsCtrl.resx	2011-06-28 15:57:51 UTC (rev 5952)
@@ -118,30 +118,30 @@
     <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="dataGridView1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <data name="grdOverrides.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="dataGridView1.Location" type="System.Drawing.Point, System.Drawing">
+  <data name="grdOverrides.Location" type="System.Drawing.Point, System.Drawing">
     <value>3, 41</value>
   </data>
-  <data name="dataGridView1.Size" type="System.Drawing.Size, System.Drawing">
+  <data name="grdOverrides.Size" type="System.Drawing.Size, System.Drawing">
     <value>557, 112</value>
   </data>
   <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="dataGridView1.TabIndex" type="System.Int32, mscorlib">
+  <data name="grdOverrides.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
   </data>
-  <data name="&gt;&gt;dataGridView1.Name" xml:space="preserve">
-    <value>dataGridView1</value>
+  <data name="&gt;&gt;grdOverrides.Name" xml:space="preserve">
+    <value>grdOverrides</value>
   </data>
-  <data name="&gt;&gt;dataGridView1.Type" xml:space="preserve">
+  <data name="&gt;&gt;grdOverrides.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;dataGridView1.Parent" xml:space="preserve">
+  <data name="&gt;&gt;grdOverrides.Parent" xml:space="preserve">
     <value>groupBox1</value>
   </data>
-  <data name="&gt;&gt;dataGridView1.ZOrder" xml:space="preserve">
+  <data name="&gt;&gt;grdOverrides.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@@ -151,7 +151,7 @@
     <value>Magenta</value>
   </data>
   <data name="btnAdd.Size" type="System.Drawing.Size, System.Drawing">
-    <value>49, 22</value>
+    <value>58, 22</value>
   </data>
   <data name="btnAdd.Text" xml:space="preserve">
     <value>Add</value>
@@ -160,10 +160,10 @@
     <value>Magenta</value>
   </data>
   <data name="btnEdit.Size" type="System.Drawing.Size, System.Drawing">
-    <value>47, 22</value>
+    <value>79, 22</value>
   </data>
   <data name="btnEdit.Text" xml:space="preserve">
-    <value>Edit</value>
+    <value>Edit Value</value>
   </data>
   <data name="btnDelete.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
     <value>Magenta</value>
@@ -174,18 +174,6 @@
   <data name="btnDelete.Text" xml:space="preserve">
     <value>Delete</value>
   </data>
-  <data name="btnRefresh.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
-    <value>Magenta</value>
-  </data>
-  <data name="btnRefresh.Size" type="System.Drawing.Size, System.Drawing">
-    <value>66, 22</value>
-  </data>
-  <data name="btnRefresh.Text" xml:space="preserve">
-    <value>Refresh</value>
-  </data>
-  <data name="btnRefresh.Visible" type="System.Boolean, mscorlib">
-    <value>False</value>
-  </data>
   <data name="toolStrip1.Location" type="System.Drawing.Point, System.Drawing">
     <value>3, 16</value>
   </data>
@@ -268,7 +256,7 @@
     <value>btnAdd</value>
   </data>
   <data name="&gt;&gt;btnAdd.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;btnEdit.Name" xml:space="preserve">
     <value>btnEdit</value>
@@ -282,12 +270,6 @@
   <data name="&gt;&gt;btnDelete.Type" xml:space="preserve">
     <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;btnRefresh.Name" xml:space="preserve">
-    <value>btnRefresh</value>
-  </data>
-  <data name="&gt;&gt;btnRefresh.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>SymbolInstanceSettingsCtrl</value>
   </data>

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.Designer.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.Designer.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -28,11 +28,13 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymbolInstancesDialog));
             this.btnClose = new System.Windows.Forms.Button();
             this.splitContainer1 = new System.Windows.Forms.SplitContainer();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.listView1 = new System.Windows.Forms.ListView();
+            this.lstInstances = new System.Windows.Forms.ListView();
+            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();
             this.btnAdd = new System.Windows.Forms.ToolStripDropDownButton();
             this.referenceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -64,18 +66,29 @@
             // 
             // groupBox1
             // 
-            this.groupBox1.Controls.Add(this.listView1);
+            this.groupBox1.Controls.Add(this.lstInstances);
             this.groupBox1.Controls.Add(this.toolStrip1);
             resources.ApplyResources(this.groupBox1, "groupBox1");
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.TabStop = false;
             // 
-            // listView1
+            // lstInstances
             // 
-            resources.ApplyResources(this.listView1, "listView1");
-            this.listView1.Name = "listView1";
-            this.listView1.UseCompatibleStateImageBehavior = false;
+            resources.ApplyResources(this.lstInstances, "lstInstances");
+            this.lstInstances.LargeImageList = this.imageList1;
+            this.lstInstances.Name = "lstInstances";
+            this.lstInstances.SmallImageList = this.imageList1;
+            this.lstInstances.UseCompatibleStateImageBehavior = false;
+            this.lstInstances.View = System.Windows.Forms.View.List;
+            this.lstInstances.SelectedIndexChanged += new System.EventHandler(this.lstInstances_SelectedIndexChanged);
             // 
+            // imageList1
+            // 
+            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
+            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
+            this.imageList1.Images.SetKeyName(0, "arrow.png");
+            this.imageList1.Images.SetKeyName(1, "marker.png");
+            // 
             // toolStrip1
             // 
             this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -145,12 +158,13 @@
         private System.Windows.Forms.Button btnClose;
         private System.Windows.Forms.SplitContainer splitContainer1;
         private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.ListView listView1;
+        private System.Windows.Forms.ListView lstInstances;
         private System.Windows.Forms.ToolStrip toolStrip1;
         private System.Windows.Forms.ToolStripDropDownButton btnAdd;
         private System.Windows.Forms.ToolStripMenuItem referenceToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem inlineSimpleSymbolToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem inlineCompoundSymbolToolStripMenuItem;
         private System.Windows.Forms.ToolStripButton btnDelete;
+        private System.Windows.Forms.ImageList imageList1;
     }
 }
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -28,6 +28,9 @@
 using Maestro.Editors.SymbolDefinition;
 using Maestro.Editors.Generic;
 using OSGeo.MapGuide.MaestroAPI;
+using OSGeo.MapGuide.ObjectModels.SymbolDefinition;
+using Maestro.Editors.LayerDefinition.Vector.Scales.SymbolInstanceEditors;
+using OSGeo.MapGuide.MaestroAPI.Schema;
 
 namespace Maestro.Editors.LayerDefinition.Vector.Scales
 {
@@ -36,11 +39,19 @@
         private IEditorService _edSvc;
         private ICompositeSymbolization _comp;
 
-        public SymbolInstancesDialog(IEditorService edSvc, ICompositeSymbolization comp)
+        private ClassDefinition _cls;
+        private string _provider;
+        private string _featureSourceId;
+
+        public SymbolInstancesDialog(IEditorService edSvc, ICompositeSymbolization comp, ClassDefinition cls, string provider, string featureSourceId)
         {
             InitializeComponent();
             _edSvc = edSvc;
             _comp = comp;
+
+            _cls = cls;
+            _provider = provider;
+            _featureSourceId = featureSourceId;
         }
 
         private void btnClose_Click(object sender, EventArgs e)
@@ -56,26 +67,59 @@
                 if (picker.ShowDialog() == DialogResult.OK)
                 {
                     var symRef = _comp.CreateSymbolReference(picker.ResourceID);
-                    //var ctrl = new SimpleSymbolReferenceCtrl(_edSvc.ResourceService, symRef);
-                    
-                    //var ctrl2 = new SymbolInstanceSettingsCtrl(
+                    AddInstance(symRef);
                 }
             }
         }
 
-        private void inlineSimpleSymbolToolStripMenuItem_Click(object sender, EventArgs e)
+        private void AddInstance(ISymbolInstance symRef)
         {
+            var li = new ListViewItem();
+            li.ImageIndex = (symRef.Reference.Type == SymbolInstanceType.Reference) ? 0 : 1;
+            li.Tag = symRef;
+            if (li.ImageIndex == 0)
+                li.Text = ((ISymbolInstanceReferenceLibrary)symRef.Reference).ResourceId;
+            else
+                li.Text = Properties.Resources.InlineSymbolDefinition;
 
+            lstInstances.Items.Add(li);
+            _comp.AddSymbolInstance(symRef);
+            li.Selected = (lstInstances.Items.Count == 1);
         }
 
+        private void inlineSimpleSymbolToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            throw new NotImplementedException();
+        }
+
         private void inlineCompoundSymbolToolStripMenuItem_Click(object sender, EventArgs e)
         {
-
+            throw new NotImplementedException();
         }
 
         private void btnDelete_Click(object sender, EventArgs e)
         {
+            if (lstInstances.SelectedItems.Count == 1)
+            {
+                var it = lstInstances.SelectedItems[0];
+                ISymbolInstance symRef = (ISymbolInstance)it.Tag;
+                _comp.RemoveSymbolInstance(symRef);
+                lstInstances.Items.Remove(it);
+            }
+        }
 
+        private void lstInstances_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (lstInstances.SelectedItems.Count == 1)
+            {
+                var it = lstInstances.SelectedItems[0];
+                ISymbolInstance symRef = (ISymbolInstance)it.Tag;
+                var c = new SymbolInstanceSettingsCtrl();
+                c.SetContent(symRef, _edSvc, _cls, _provider, _featureSourceId);
+                c.Dock = DockStyle.Fill;
+                splitContainer1.Panel2.Controls.Clear();
+                splitContainer1.Panel2.Controls.Add(c);
+            }
         }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.resx	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/SymbolInstancesDialog.resx	2011-06-28 15:57:51 UTC (rev 5952)
@@ -117,6 +117,10 @@
   <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>658, 430</value>
@@ -143,35 +147,83 @@
   <data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
     <value>1</value>
   </data>
-  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="splitContainer1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Bottom, Left, Right</value>
   </data>
   <data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
     <value>12, 12</value>
   </data>
-  <data name="listView1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <data name="lstInstances.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
-  <data name="listView1.Location" type="System.Drawing.Point, System.Drawing">
+  <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
+        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
+        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
+        CAAAAk1TRnQBSQFMAgEBAgEAARgBAAEYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+        AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
+        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
+        AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
+        AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
+        AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
+        AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
+        ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
+        AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
+        AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
+        AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
+        AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
+        AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
+        AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
+        AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
+        AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
+        ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
+        Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
+        AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
+        AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
+        AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
+        ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
+        Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
+        AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
+        AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
+        AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
+        AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
+        AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
+        AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/xQAAv8B9AEHAW8BBwHz
+        Av8lAA7/BAAD/wFvARcBbwP/JQAD/wH0A/MBtQG8AfMC9AL/BwABbwHjAW8vAAK0AfELAAFvAeMBby8A
+        AbQB2gG0AfEJAAH/AW8B4wFvAf8uAAG0AdkB2gG0AfIIAAEaAW8B4wFvARonAAEJB7QB2gHTAdoBtAHy
+        BgAB/wJvAeMCbwH/JgABtAHcA9sB2gWzAdoBtAHyBQABGgFvA+MBbwEaJgABtATbAdUBtAWzAdsBtAQA
+        Af8BbwEWA+MBFgFvAf8lAAG0AdwJ2wHcAbQB8gQAARoCFgPjAhYBGiUAAQkHtAHcAdsB3AG0AfIFAAGT
+        ARYB4wFuARQBbgHjARYBkywAAboC3AG6AfMGAAEWAZQBFgMTARYBlAEWLAABugHcAboB8wcAApQBFgFu
+        ARIBbgEWApQsAAK6AfMIAAEaBxYBGiwAAQkB8wkAAf8BlAEWA5QBFgGUAf84AAH/ARoBlAEWAZQBGgH/
+        JQABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEAAv8B4AEPBAABgAEBAeABDwQA
+        AYABAQH8AX8EAAH/AR8B/AF/BAAB/wEPAfgBPwQAAf8BBwH4AT8EAAGAAQMB8AEfBAABgAEBAfABHwQA
+        AYABAQHgAQ8EAAGAAQEB4AEPBAABgAEDAeABDwQAAf8BBwHgAQ8EAAH/AQ8B4AEPBAAB/wEfAeABDwQA
+        Af8BPwHgAQ8EAAL/AfABHwQACw==
+</value>
+  </data>
+  <data name="lstInstances.Location" type="System.Drawing.Point, System.Drawing">
     <value>3, 41</value>
   </data>
-  <data name="listView1.Size" type="System.Drawing.Size, System.Drawing">
+  <data name="lstInstances.Size" type="System.Drawing.Size, System.Drawing">
     <value>212, 354</value>
   </data>
-  <data name="listView1.TabIndex" type="System.Int32, mscorlib">
+  <data name="lstInstances.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
   </data>
-  <data name="&gt;&gt;listView1.Name" xml:space="preserve">
-    <value>listView1</value>
+  <data name="&gt;&gt;lstInstances.Name" xml:space="preserve">
+    <value>lstInstances</value>
   </data>
-  <data name="&gt;&gt;listView1.Type" xml:space="preserve">
+  <data name="&gt;&gt;lstInstances.Type" xml:space="preserve">
     <value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;listView1.Parent" xml:space="preserve">
+  <data name="&gt;&gt;lstInstances.Parent" xml:space="preserve">
     <value>groupBox1</value>
   </data>
-  <data name="&gt;&gt;listView1.ZOrder" xml:space="preserve">
+  <data name="&gt;&gt;lstInstances.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@@ -315,12 +367,21 @@
   <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
     <value>745, 465</value>
   </data>
+  <data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</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>Symbol Instances</value>
   </data>
+  <data name="&gt;&gt;imageList1.Name" xml:space="preserve">
+    <value>imageList1</value>
+  </data>
+  <data name="&gt;&gt;imageList1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
   <data name="&gt;&gt;btnAdd.Name" xml:space="preserve">
     <value>btnAdd</value>
   </data>

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -362,7 +362,7 @@
             var vsc = lstScaleRanges.SelectedItem as VectorScaleRange;
             if (vsc != null && vsc.SupportsElevation)
             {
-                if (new ElevationDialog(_edsvc, (IVectorScaleRange2)vsc.Item, Owner.FeatureSourceId, Owner.Schema, Owner.GetFdoProvider()).ShowDialog() == DialogResult.OK)
+                if (new ElevationDialog(_edsvc, (IVectorScaleRange2)vsc.Item, Owner.FeatureSourceId, Owner.SelectedClass, Owner.GetFdoProvider()).ShowDialog() == DialogResult.OK)
                 {
                     OnResourceChanged();
                 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -101,7 +101,7 @@
             return fs.Provider;
         }
 
-        internal ClassDefinition Schema
+        internal ClassDefinition SelectedClass
         {
             get { return resSettings.GetSelectedClass(); }
         }

Modified: trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-06-28 15:57:51 UTC (rev 5952)
@@ -686,6 +686,12 @@
     <Compile Include="LayerDefinition\Vector\Scales\ItemStyle.designer.cs">
       <DependentUpon>ItemStyle.cs</DependentUpon>
     </Compile>
+    <Compile Include="LayerDefinition\Vector\Scales\SymbolInstanceEditors\ReferenceCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="LayerDefinition\Vector\Scales\SymbolInstanceEditors\ReferenceCtrl.Designer.cs">
+      <DependentUpon>ReferenceCtrl.cs</DependentUpon>
+    </Compile>
     <Compile Include="LayerDefinition\Vector\Scales\SymbolInstancesDialog.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1442,6 +1448,9 @@
     <EmbeddedResource Include="LayerDefinition\Vector\Scales\ItemStyle.resx">
       <DependentUpon>ItemStyle.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="LayerDefinition\Vector\Scales\SymbolInstanceEditors\ReferenceCtrl.resx">
+      <DependentUpon>ReferenceCtrl.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="LayerDefinition\Vector\Scales\SymbolInstancesDialog.resx">
       <DependentUpon>SymbolInstancesDialog.cs</DependentUpon>
     </EmbeddedResource>

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -1632,6 +1632,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Inline Symbol Definition.
+        /// </summary>
+        internal static string InlineSymbolDefinition {
+            get {
+                return ResourceManager.GetString("InlineSymbolDefinition", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to You have entered a non-numeric value in the Reference Y field. Due to a bug in MapGuide, this will likely give an error when saving..
         /// </summary>
         internal static string InsertionPointYError {
@@ -2192,6 +2201,15 @@
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Parameter Override already specified.
+        /// </summary>
+        internal static string ParameterOverrideExists {
+            get {
+                return ResourceManager.GetString("ParameterOverrideExists", resourceCulture);
+            }
+        }
+        
         internal static System.Drawing.Bitmap plus_circle {
             get {
                 object obj = ResourceManager.GetObject("plus-circle", resourceCulture);

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-06-28 15:57:51 UTC (rev 5952)
@@ -1241,4 +1241,10 @@
   <data name="ScaleRange" xml:space="preserve">
     <value>Scale Range</value>
   </data>
+  <data name="InlineSymbolDefinition" xml:space="preserve">
+    <value>Inline Symbol Definition</value>
+  </data>
+  <data name="ParameterOverrideExists" xml:space="preserve">
+    <value>Parameter Override already specified</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/Maestro.Editors/SymbolDefinition/CompoundSymbolDefinitionEditorCtrl.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -28,6 +28,7 @@
 using OSGeo.MapGuide.ObjectModels;
 using Maestro.Editors.Generic;
 using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Shared.UI;
 
 namespace Maestro.Editors.SymbolDefinition
 {
@@ -49,7 +50,11 @@
             service.RegisterCustomNotifier(this);
             _edSvc = service;
             _compSym = (ICompoundSymbolDefinition)_edSvc.GetEditedResource();
+            _compSym.PurgeSimpleSymbolAttributes();
 
+            TextBoxBinder.BindText(txtName, _compSym, "Name");
+            TextBoxBinder.BindText(txtDescription, _compSym, "Description");
+
             foreach (var symRef in _compSym.SimpleSymbol)
             {
                 AddSymbolReference(symRef);
@@ -90,6 +95,11 @@
             {
                 var inline = (ISimpleSymbolInlineReference)symRef;
                 li.Text = inline.SimpleSymbolDefinition.Name;
+                inline.SimpleSymbolDefinition.PropertyChanged += (s, e) =>
+                {
+                    if (e.PropertyName == "Name" && li != null)
+                        li.Text = inline.SimpleSymbolDefinition.Name;
+                };
                 li.ImageIndex = 0;
                 li.Tag = symRef;
                 lstSymbols.Items.Add(li);
@@ -120,6 +130,7 @@
             var sym = ObjectFactory.CreateSimpleSymbol(_compSym.CurrentConnection, _compSym.ResourceVersion, "", "");
             var symRef = _compSym.CreateSimpleSymbol(sym);
             AddSymbolReference(symRef);
+            _compSym.AddSimpleSymbol(symRef);
         }
 
         private void lstSymbols_SelectedIndexChanged(object sender, EventArgs e)

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/CommonTypes.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/CommonTypes.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/CommonTypes.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -330,7 +330,7 @@
     /// <summary>
     /// Represents a resource id reference
     /// </summary>
-    public interface IResourceIdReference
+    public interface IResourceIdReference : INotifyPropertyChanged
     {
         /// <summary>
         /// Gets or sets the resource id.

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerFactory.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerFactory.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerFactory.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -346,9 +346,10 @@
 #else
             return new CompositeRule()
             {
+                LegendLabel = "",
                 CompositeSymbolization = new CompositeSymbolization()
                 {
-                    
+                    SymbolInstance = new System.ComponentModel.BindingList<SymbolInstance>()  
                 }
             };
 #endif

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -1709,16 +1709,24 @@
         IEnumerable<IParameterOverride> Override { get; }
 
         /// <summary>
-        /// Adds the override.
+        /// Adds the parameter override.
         /// </summary>
-        /// <param name="ov">The ov.</param>
+        /// <param name="ov">The parameter override</param>
         void AddOverride(IParameterOverride ov);
 
         /// <summary>
-        /// Removes the override.
+        /// Removes the parameter override.
         /// </summary>
-        /// <param name="ov">The ov.</param>
+        /// <param name="ov">The parameter override</param>
         void RemoveOverride(IParameterOverride ov);
+
+        /// <summary>
+        /// Creates a parameter override
+        /// </summary>
+        /// <param name="symbol">The symbol name</param>
+        /// <param name="name">The name of the parameter to override</param>
+        /// <returns></returns>
+        IParameterOverride CreateParameterOverride(string symbol, string name);
     }
 
     /// <summary>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefFactory.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefFactory.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefFactory.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -54,15 +54,13 @@
             //HACK: We have to peek at the XML to determine if this is simple or compound.
             var doc = new XmlDocument();
             doc.LoadXml(xml);
-            var node = doc.SelectSingleNode("//SimpleSymbolDefinition");
-            if (node != null)
+            if (doc.DocumentElement.Name == "SimpleSymbolDefinition")
             {
                 return SimpleSymbolDefinition.Deserialize(xml);
             }
             else
             {
-                node = doc.SelectSingleNode("//CompoundSymbolDefinition");
-                if (node != null)
+                if (doc.DocumentElement.Name == "CompoundSymbolDefinition")
                     return CompoundSymbolDefinition.Deserialize(xml);
                 else //WTF?
                     throw new SerializationException("Could not determine symbol type"); //LOCALIZE

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolDefinition.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -99,14 +99,16 @@
             return this.Clone();
         }
 
+#if SYM_DEF_110
+        protected string _vschema = "SymbolDefinition-1.1.0.xsd";
+#else
+        protected string _vschema = "SymbolDefinition-1.0.0.xsd";
+#endif
+
         [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
         public string ValidatingSchema
         {
-#if SYM_DEF_110
-            get { return "SymbolDefinition-1.1.0.xsd"; }
-#else
-            get { return "SymbolDefinition-1.0.0.xsd"; }
-#endif
+            get { return _vschema; }
             set { }
         }
 
@@ -122,6 +124,12 @@
 
     partial class SimpleSymbolDefinition : ISimpleSymbolDefinition
     {
+        internal void RemoveSchemaAttributes()
+        {
+            _vschema = null;
+            versionField = null;
+        }
+
         public static SimpleSymbolDefinition CreateDefault()
         {
             var simpleSym = new SimpleSymbolDefinition()
@@ -683,7 +691,9 @@
 
         public ISimpleSymbolReferenceBase CreateSimpleSymbol(ISimpleSymbolDefinition sym)
         {
-            return new SimpleSymbol() { Item = (SimpleSymbolDefinition)sym };
+            var s = (SimpleSymbolDefinition)sym;
+            s.RemoveSchemaAttributes();
+            return new SimpleSymbol() { Item = s };
         }
 
         public ISimpleSymbolReferenceBase CreateSymbolReference(string resourceId)
@@ -696,6 +706,18 @@
         {
             get { return SymbolDefinitionType.Compound; }
         }
+
+        public void PurgeSimpleSymbolAttributes()
+        {
+            foreach (var sym in this.SimpleSymbol)
+            {
+                if (sym.Type == SimpleSymbolReferenceType.Inline)
+                {
+                    var s = (SimpleSymbolDefinition)sym.Item;
+                    s.RemoveSchemaAttributes();
+                }
+            }
+        }
     }
 
     partial class SimpleSymbol : ISimpleSymbolInlineReference, ISimpleSymbolLibraryReference
@@ -785,7 +807,7 @@
         }
     }
  
-    partial class ImageReference : ISymbolLibraryReference, IImageReference
+    partial class ImageReference : ISymbolInstanceReferenceLibrary, IImageReference
     {
         [XmlIgnore]
         SymbolInstanceType ISymbolInstanceReference.Type

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolInterfaces.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/SymbolInterfaces.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -23,6 +23,7 @@
 using OSGeo.MapGuide.ObjectModels.LayerDefinition;
 using OSGeo.MapGuide.MaestroAPI.Resource;
 using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.MaestroAPI;
 
 namespace OSGeo.MapGuide.ObjectModels.SymbolDefinition
 {
@@ -116,14 +117,14 @@
     /// <summary>
     /// Represents a symbol instance reference by a resource id
     /// </summary>
-    public interface ISymbolLibraryReference : ISymbolInstanceReference, IResourceIdReference
+    public interface ISymbolInstanceReferenceLibrary : ISymbolInstanceReference, IResourceIdReference
     {
     }
 
     /// <summary>
     /// Represents a symbol instance reference by a inline definition
     /// </summary>
-    public interface IInlineSimpleSymbolReference : ISymbolInstanceReference
+    public interface ISymbolInstanceReferenceInline : ISymbolInstanceReference
     {
         /// <summary>
         /// Gets or sets the inline definition
@@ -131,15 +132,51 @@
         ISymbolDefinitionBase SymbolDefinition { get; set; } 
     }
 
-    /// <summary>
-    /// Represents a symbol instance reference by a inline definition
-    /// </summary>
-    public interface IInlineCompoundSymbolReference : ISymbolInstanceReference
+    public static class SymbolDefExtensions
     {
-        /// <summary>
-        /// Gets or sets the inline definition
-        /// </summary>
-        ICompoundSymbolDefinition CompoundSymbolDefinition { get; set; }
+        public static IEnumerable<IParameter> GetParameters(this ISymbolDefinitionBase sym)
+        {
+            Check.NotNull(sym, "sym");
+            if (sym.Type == SymbolDefinitionType.Simple)
+                return ((ISimpleSymbolDefinition)sym).GetParameters();
+            else
+                return ((ICompoundSymbolDefinition)sym).GetParameters();
+        }
+
+        public static IEnumerable<IParameter> GetParameters(this ISimpleSymbolDefinition ssym)
+        {
+            Check.NotNull(ssym, "ssym");
+            return ssym.ParameterDefinition.Parameter;
+        }
+
+        public static IEnumerable<IParameter> GetParameters(this ICompoundSymbolDefinition csym)
+        {
+            Check.NotNull(csym, "csym");
+            Check.NotNull(csym.CurrentConnection, "csym.CurrentConnection");
+            List<IParameter> p = new List<IParameter>();
+            foreach (var sym in csym.SimpleSymbol)
+            {
+                if (sym.Type == SimpleSymbolReferenceType.Inline)
+                {
+                    ISimpleSymbolInlineReference ssir = (ISimpleSymbolInlineReference)sym;
+                    p.AddRange(ssir.SimpleSymbolDefinition.GetParameters());
+                }
+                else if (sym.Type == SimpleSymbolReferenceType.Library)
+                {
+                    ISimpleSymbolLibraryReference sslr = (ISimpleSymbolLibraryReference)sym;
+                    var symDef = (ISymbolDefinitionBase)csym.CurrentConnection.ResourceService.GetResource(sslr.ResourceId);
+                    if (symDef.Type == SymbolDefinitionType.Simple)
+                    {
+                        p.AddRange(((ISimpleSymbolDefinition)symDef).GetParameters());
+                    }
+                    else 
+                    {
+                        p.AddRange(((ICompoundSymbolDefinition)symDef).GetParameters());
+                    }
+                }
+            }
+            return p;
+        }
     }
 
     #region Symbol Definition 1.0.0 interfaces
@@ -321,6 +358,12 @@
         /// <param name="p"></param>
         /// <returns></returns>
         ISimpleSymbolReferenceBase CreateSymbolReference(string resourceId);
+
+        /// <summary>
+        /// Purges root element attributes from all inline Simple Symbol Definitions. This should be called
+        /// before serialization
+        /// </summary>
+        void PurgeSimpleSymbolAttributes();
     }
 
     /// <summary>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -1705,10 +1705,13 @@
 
         public ISymbolInstance CreateSymbolReference(string resourceId)
         {
-            return new SymbolInstance() 
-            { 
+            return new SymbolInstance()
+            {
                 Item = resourceId,
                 ParameterOverrides = new ParameterOverrides()
+                {
+                    Override = new BindingList<Override>()
+                },
             };
         }
     }
@@ -1744,8 +1747,8 @@
             }
             set
             {
-                var sr = value as ISymbolLibraryReference;
-                var ir = value as IInlineSimpleSymbolReference;
+                var sr = value as ISymbolInstanceReferenceLibrary;
+                var ir = value as ISymbolInstanceReferenceInline;
                 if (sr != null)
                 {
                     this.Item = sr.ResourceId;
@@ -1769,13 +1772,21 @@
         }
     }
 
-    partial class SymbolInstanceLibrary : ISymbolLibraryReference
+    partial class SymbolInstanceLibrary : ISymbolInstanceReferenceLibrary
     {
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        private string _resId;
+
         [XmlIgnore]
         public string ResourceId
         {
-            get;
-            set;
+            get { return _resId; }
+            set 
+            { 
+                if (_resId == value) return;
+                _resId = value;
+                OnPropertyChanged("ResourceId");
+            }
         }
 
         [XmlIgnore]
@@ -1783,9 +1794,18 @@
         {
             get { return SymbolInstanceType.Reference; }
         }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        private void OnPropertyChanged(string name)
+        {
+            var handler = this.PropertyChanged;
+            if (handler != null)
+                handler(this, new PropertyChangedEventArgs(name));
+        }
     }
 
-    partial class SymbolInstanceInline : IInlineSimpleSymbolReference
+    partial class SymbolInstanceInline : ISymbolInstanceReferenceInline
     {
         [XmlIgnore]
         public ISymbolDefinitionBase SymbolDefinition
@@ -1828,6 +1848,15 @@
             if (o != null)
                 this.Override.Remove(o);
         }
+
+        public IParameterOverride CreateParameterOverride(string symbol, string name)
+        {
+            return new Override()
+            {
+                ParameterIdentifier = name, 
+                SymbolName = symbol
+            };
+        }
     }
 
     partial class Override : IParameterOverride
@@ -1836,6 +1865,9 @@
     }
 
     partial class CompositeTypeStyle : ICompositeTypeStyle
+#if LDF_130 || LDF_230
+        , ICompositeTypeStyle2
+#endif
     {
         [XmlIgnore]
         IEnumerable<ICompositeRule> ICompositeTypeStyle.CompositeRule

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs	2011-06-28 12:49:34 UTC (rev 5951)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs	2011-06-28 15:57:51 UTC (rev 5952)
@@ -156,15 +156,13 @@
                         //HACK: We have to peek at the XML to determine if this is simple or compound.
                         var doc = new XmlDocument();
                         doc.LoadXml(xml);
-                        var node = doc.SelectSingleNode("//SimpleSymbolDefinition");
-                        if (node != null)
+                        if (doc.DocumentElement.Name == "SimpleSymbolDefinition")
                         {
                             return OSGeo.MapGuide.ObjectModels.SymbolDefinition_1_0_0.SimpleSymbolDefinition.Deserialize(xml);
                         }
                         else
                         {
-                            node = doc.SelectSingleNode("//CompoundSymbolDefinition");
-                            if (node != null)
+                            if (doc.DocumentElement.Name == "CompoundSymbolDefinition")
                                 return OSGeo.MapGuide.ObjectModels.SymbolDefinition_1_0_0.CompoundSymbolDefinition.Deserialize(xml);
                             else //WTF?
                                 throw new SerializationException("Could not determine symbol type"); //LOCALIZE



More information about the mapguide-commits mailing list