[mapguide-commits] r5726 - in trunk/Tools/Maestro: Generated Maestro.Base/Editor Maestro.Editors/Common Maestro.Editors/LayerDefinition Maestro.Editors/LayerDefinition/Vector Maestro.Editors/LayerDefinition/Vector/Scales Maestro.Editors/LayerDefinition/Vector/StyleEditors OSGeo.MapGuide.MaestroAPI/ObjectModels

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Apr 29 09:16:41 EDT 2011


Author: jng
Date: 2011-04-29 06:16:41 -0700 (Fri, 29 Apr 2011)
New Revision: 5726

Modified:
   trunk/Tools/Maestro/Generated/LayerDefinition-1.0.0.designer.cs
   trunk/Tools/Maestro/Generated/LayerDefinition-1.1.0.designer.cs
   trunk/Tools/Maestro/Generated/LayerDefinition-1.2.0.designer.cs
   trunk/Tools/Maestro/Generated/LayerDefinition-1.3.0.designer.cs
   trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs
   trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs
   trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs
   trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.resx
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionList.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.resx
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.resx
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.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/VectorLayerDefinitionImpl.cs
Log:
#1598: Support editing of point styles based on W2D symbols in a Symbol Library. Unlike the original description, this was never actually implemented. So now we've done that. However previews of such point styles are not perfect. It will only show the symbol and does not consider any color overrides that the style has applied. Nevertheless, seeing a symbol (albeit maybe of the wrong color) is better than seeing nothing.

Also modify the generated LayerDefintion xml classes to fix an incorrectly generated W2D symbol reference class

Also modify the layer preview to use either the name of the feature source (new layer) or the name of the edited resource itself (existing layer) as the legend label for the preview map. This is much more readable than an ugly guid.


Modified: trunk/Tools/Maestro/Generated/LayerDefinition-1.0.0.designer.cs
===================================================================
--- trunk/Tools/Maestro/Generated/LayerDefinition-1.0.0.designer.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Generated/LayerDefinition-1.0.0.designer.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -3955,14 +3955,15 @@
     public partial class W2DSymbolTypeW2DSymbol : System.ComponentModel.INotifyPropertyChanged {
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object resourceIdField;
+        private string resourceIdField;
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object libraryItemNameField;
+        private string libraryItemNameField;
         
         private static System.Xml.Serialization.XmlSerializer serializer;
-        
-        public object ResourceId {
+
+        public string ResourceId
+        {
             get {
                 return this.resourceIdField;
             }
@@ -3979,8 +3980,9 @@
                 }
             }
         }
-        
-        public object LibraryItemName {
+
+        public string LibraryItemName
+        {
             get {
                 return this.libraryItemNameField;
             }

Modified: trunk/Tools/Maestro/Generated/LayerDefinition-1.1.0.designer.cs
===================================================================
--- trunk/Tools/Maestro/Generated/LayerDefinition-1.1.0.designer.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Generated/LayerDefinition-1.1.0.designer.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -10176,14 +10176,15 @@
     public partial class W2DSymbolTypeW2DSymbol : System.ComponentModel.INotifyPropertyChanged {
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object resourceIdField;
+        private string resourceIdField;
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object libraryItemNameField;
+        private string libraryItemNameField;
         
         private static System.Xml.Serialization.XmlSerializer serializer;
-        
-        public object ResourceId {
+
+        public string ResourceId
+        {
             get {
                 return this.resourceIdField;
             }
@@ -10200,8 +10201,9 @@
                 }
             }
         }
-        
-        public object LibraryItemName {
+
+        public string LibraryItemName
+        {
             get {
                 return this.libraryItemNameField;
             }

Modified: trunk/Tools/Maestro/Generated/LayerDefinition-1.2.0.designer.cs
===================================================================
--- trunk/Tools/Maestro/Generated/LayerDefinition-1.2.0.designer.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Generated/LayerDefinition-1.2.0.designer.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -10342,14 +10342,15 @@
     public partial class W2DSymbolTypeW2DSymbol : System.ComponentModel.INotifyPropertyChanged {
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object resourceIdField;
+        private string resourceIdField;
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object libraryItemNameField;
+        private string libraryItemNameField;
         
         private static System.Xml.Serialization.XmlSerializer serializer;
-        
-        public object ResourceId {
+
+        public string ResourceId
+        {
             get {
                 return this.resourceIdField;
             }
@@ -10366,8 +10367,9 @@
                 }
             }
         }
-        
-        public object LibraryItemName {
+
+        public string LibraryItemName
+        {
             get {
                 return this.libraryItemNameField;
             }

Modified: trunk/Tools/Maestro/Generated/LayerDefinition-1.3.0.designer.cs
===================================================================
--- trunk/Tools/Maestro/Generated/LayerDefinition-1.3.0.designer.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Generated/LayerDefinition-1.3.0.designer.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -10341,14 +10341,15 @@
     public partial class W2DSymbolTypeW2DSymbol : System.ComponentModel.INotifyPropertyChanged {
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object resourceIdField;
+        private string resourceIdField;
         
         [EditorBrowsable(EditorBrowsableState.Never)]
-        private object libraryItemNameField;
+        private string libraryItemNameField;
         
         private static System.Xml.Serialization.XmlSerializer serializer;
-        
-        public object ResourceId {
+
+        public string ResourceId
+        {
             get {
                 return this.resourceIdField;
             }
@@ -10365,8 +10366,9 @@
                 }
             }
         }
-        
-        public object LibraryItemName {
+
+        public string LibraryItemName
+        {
             get {
                 return this.libraryItemNameField;
             }

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -106,7 +106,7 @@
             foreach (var vsr in vl.VectorScaleRange)
             {
                 var vsr2 = vsr as IVectorScaleRange2;
-                if (vsr2.CompositeStyle != null)
+                if (vsr2 != null && vsr2.CompositeStyle != null)
                     return true;
             }
             return false;

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -74,8 +74,14 @@
             //TODO: Based on the visible scales in this layer, size this extents accordingly
             var mdf = ObjectFactory.CreateMapDefinition(conn, Properties.Resources.PreviewMap, ldf.GetCoordinateSystemWkt(), extent);
 
-            mdf.AddLayer(null, ResourceIdentifier.GetName(ldf.ResourceID), ldf.ResourceID);
+            var layer = mdf.AddLayer(null, ResourceIdentifier.GetName(_edSvc.ResourceID), ldf.ResourceID);
 
+            //Use feature source as name/label if new and unsaved
+            if (_edSvc.IsNew)
+                layer.Name = layer.LegendLabel = ResourceIdentifier.GetName(ldf.SubLayer.ResourceId);
+            else
+                layer.Name = layer.LegendLabel = ResourceIdentifier.GetName(_edSvc.ResourceID);
+
             conn.ResourceService.SaveResourceAs(mdf, mdfId);
 
             if (PropertyService.Get(ConfigProperties.PreviewViewerType, "AJAX").Equals("AJAX"))

Modified: trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.Designer.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.Designer.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -35,6 +35,7 @@
             this.lstSymbols = new System.Windows.Forms.ListView();
             this.btnOK = new System.Windows.Forms.Button();
             this.btnCancel = new System.Windows.Forms.Button();
+            this.btnBrowse = new System.Windows.Forms.Button();
             this.grpAvailableSymbols.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -79,11 +80,19 @@
             this.btnCancel.UseVisualStyleBackColor = true;
             this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
             // 
+            // btnBrowse
+            // 
+            resources.ApplyResources(this.btnBrowse, "btnBrowse");
+            this.btnBrowse.Name = "btnBrowse";
+            this.btnBrowse.UseVisualStyleBackColor = true;
+            this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
+            // 
             // SymbolPicker
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
             resources.ApplyResources(this, "$this");
             this.ControlBox = false;
+            this.Controls.Add(this.btnBrowse);
             this.Controls.Add(this.btnCancel);
             this.Controls.Add(this.btnOK);
             this.Controls.Add(this.grpAvailableSymbols);
@@ -104,5 +113,6 @@
         private System.Windows.Forms.ListView lstSymbols;
         private System.Windows.Forms.Button btnOK;
         private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.Button btnBrowse;
     }
 }
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -28,6 +28,9 @@
 using OSGeo.MapGuide.MaestroAPI.Resource;
 using OSGeo.MapGuide.MaestroAPI;
 using Obj = OSGeo.MapGuide.ObjectModels.Common;
+using Maestro.Editors.Generic;
+using System.IO;
+using OSGeo.MapGuide.ObjectModels.DrawingSource;
 
 namespace Maestro.Editors.Common
 {
@@ -42,42 +45,105 @@
         }
 
         private IServerConnection _conn;
+        private Image _symbolImage;
 
         /// <summary>
         /// Initializes a new instance of the <see cref="SymbolPicker"/> class.
         /// </summary>
+        /// <param name="conn"></param>
+        public SymbolPicker(IServerConnection conn)
+            : this()
+        {
+            _conn = conn;
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="SymbolPicker"/> class.
+        /// </summary>
         /// <param name="symbolLibrary">The symbol library.</param>
         /// <param name="conn">The conn.</param>
         public SymbolPicker(string symbolLibrary, IServerConnection conn)
-            : this()
+            : this(conn)
         {
             if (ResourceIdentifier.GetResourceType(symbolLibrary) != OSGeo.MapGuide.MaestroAPI.ResourceTypes.SymbolLibrary)
                 throw new ArgumentException("Not a valid symbol library resource identifier: " + symbolLibrary); //LOCALIZE
 
-            _conn = conn;
             txtSymbolLibrary.Text = symbolLibrary;
         }
 
         /// <summary>
+        /// Gets the symbol library resource id
+        /// </summary>
+        public string SymbolLibrary { get { return txtSymbolLibrary.Text; } }
+
+        /// <summary>
+        /// Gets the preview image for this symbol
+        /// </summary>
+        public Image SymbolImage { get { return _symbolImage; } }
+
+        /// <summary>
         /// Raises the <see cref="E:System.Windows.Forms.Form.Load"/> event.
         /// </summary>
         /// <param name="e">An <see cref="T:System.EventArgs"/> that contains the event data.</param>
         protected override void OnLoad(EventArgs e)
         {
-            //Extract the symbols.dwf resource data and copy to a session based drawing source
-            var dwf = _conn.ResourceService.GetResourceData(txtSymbolLibrary.Text, "symbols.dwf");
-            var ds = OSGeo.MapGuide.ObjectModels.ObjectFactory.CreateDrawingSource(_conn);
-            ds.SourceName = "symbols.dwf";
-            ds.ResourceID = "Session:" + _conn.SessionID + "//" + Guid.NewGuid() + ".DrawingSource";
-            _conn.ResourceService.SaveResource(ds);
-            _conn.ResourceService.SetResourceData(ds.ResourceID, "symbols.dwf", OSGeo.MapGuide.ObjectModels.Common.ResourceDataType.File, dwf);
+            if (!string.IsNullOrEmpty(txtSymbolLibrary.Text))
+                LoadSymbols(txtSymbolLibrary.Text);
+        }
 
+        /// <summary>
+        /// Fetches the thumbnail of a symbol in a symbol library
+        /// </summary>
+        /// <param name="conn"></param>
+        /// <param name="symbolLibId"></param>
+        /// <param name="symbolName"></param>
+        /// <returns></returns>
+        internal static Image GetSymbol(IServerConnection conn, string symbolLibId, string symbolName)
+        {
+            //NOTE: This could be nasty performance-wise if invoked at lot of times in succession
+            //But these types of symbols are deprecated anyway, so we can live with it, because people
+            //shouldn't be using these anymore (and thus this method by extension)
+
+            var ds = PrepareSymbolDrawingSource(conn, symbolLibId);
+
             //Now we should be able to query it via Drawing Service APIs
+            var drawSvc = (IDrawingService)conn.GetService((int)ServiceType.Drawing);
+
+            //Each section in the symbols.dwf represents a symbol
+            var sectionList = drawSvc.EnumerateDrawingSections(ds.ResourceID);
+
+            foreach (var sect in sectionList.Section)
+            {
+                if (sect.Title == symbolName)
+                {
+                    var sectResources = drawSvc.EnumerateDrawingSectionResources(ds.ResourceID, sect.Name);
+
+                    foreach (var res in sectResources.SectionResource)
+                    {
+                        if (res.Role.ToUpper() == "THUMBNAIL")
+                        {
+                            using (var rs = drawSvc.GetSectionResource(ds.ResourceID, res.Href))
+                            {
+                                return Image.FromStream(rs);
+                            }
+                        }
+                    }
+                }
+            }
+            return null;
+        }
+
+        private void LoadSymbols(string symResId)
+        {
+            var ds = PrepareSymbolDrawingSource(_conn, symResId);
+            //Now we should be able to query it via Drawing Service APIs
             var drawSvc = (IDrawingService)_conn.GetService((int)ServiceType.Drawing);
 
             //Each section in the symbols.dwf represents a symbol
             var sectionList = drawSvc.EnumerateDrawingSections(ds.ResourceID);
 
+            lstSymbols.Items.Clear();
+
             int idx = 0;
             var imgList = new ImageList();
             imgList.ImageSize = new Size(32, 32);
@@ -114,6 +180,33 @@
             }
         }
 
+        private static IDrawingSource PrepareSymbolDrawingSource(IServerConnection conn, string symResId)
+        {
+            //Extract the symbols.dwf resource data and copy to a session based drawing source
+            var dwf = conn.ResourceService.GetResourceData(symResId, "symbols.dwf");
+            if (!dwf.CanSeek)
+            {
+                //House in MemoryStream
+                var ms = new MemoryStream();
+                Utility.CopyStream(dwf, ms);
+                ms.Position = 0L;
+
+                //Replace old stream with new
+                dwf.Dispose();
+                dwf = ms;
+            }
+            var ds = OSGeo.MapGuide.ObjectModels.ObjectFactory.CreateDrawingSource(conn);
+            ds.SourceName = "symbols.dwf";
+            ds.ResourceID = "Session:" + conn.SessionID + "//" + Guid.NewGuid() + ".DrawingSource";
+            conn.ResourceService.SaveResource(ds);
+
+            using (dwf)
+            {
+                conn.ResourceService.SetResourceData(ds.ResourceID, "symbols.dwf", OSGeo.MapGuide.ObjectModels.Common.ResourceDataType.File, dwf);
+            }
+            return ds;
+        }
+
         private void btnCancel_Click(object sender, EventArgs e)
         {
             this.DialogResult = DialogResult.Cancel;
@@ -127,6 +220,19 @@
         private void lstSymbols_SelectedIndexChanged(object sender, EventArgs e)
         {
             btnOK.Enabled = (lstSymbols.SelectedItems.Count == 1);
+
+            if (btnOK.Enabled)
+            {
+                var item = lstSymbols.SelectedItems[0];
+
+                //Dispose of old image before setting new one
+                if (_symbolImage != null)
+                {
+                    _symbolImage.Dispose();
+                    _symbolImage = null;
+                }
+                _symbolImage = (Image)lstSymbols.SmallImageList.Images[item.ImageIndex].Clone();
+            }
         }
 
         /// <summary>
@@ -144,5 +250,18 @@
                 return string.Empty;
             }
         }
+
+        private void btnBrowse_Click(object sender, EventArgs e)
+        {
+            using (var picker = new ResourcePicker(_conn.ResourceService, ResourcePickerMode.OpenResource))
+            {
+                picker.Filter = ResourceTypes.SymbolLibrary;
+                if (picker.ShowDialog() == DialogResult.OK)
+                {
+                    LoadSymbols(picker.ResourceID);
+                    txtSymbolLibrary.Text = picker.ResourceID;
+                }
+            }
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.resx	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/SymbolPicker.resx	2011-04-29 13:16:41 UTC (rev 5726)
@@ -144,7 +144,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
-    <value>4</value>
+    <value>5</value>
   </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="txtSymbolLibrary.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
@@ -154,7 +154,7 @@
     <value>94, 10</value>
   </data>
   <data name="txtSymbolLibrary.Size" type="System.Drawing.Size, System.Drawing">
-    <value>342, 20</value>
+    <value>308, 20</value>
   </data>
   <data name="txtSymbolLibrary.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
@@ -169,7 +169,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;txtSymbolLibrary.ZOrder" xml:space="preserve">
-    <value>3</value>
+    <value>4</value>
   </data>
   <data name="grpAvailableSymbols.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -220,7 +220,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;grpAvailableSymbols.ZOrder" xml:space="preserve">
-    <value>2</value>
+    <value>3</value>
   </data>
   <data name="btnOK.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Bottom, Right</value>
@@ -250,7 +250,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>2</value>
   </data>
   <data name="btnCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Bottom, Right</value>
@@ -277,6 +277,33 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;btnCancel.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>406, 8</value>
+  </data>
+  <data name="btnBrowse.Size" type="System.Drawing.Size, System.Drawing">
+    <value>27, 23</value>
+  </data>
+  <data name="btnBrowse.TabIndex" type="System.Int32, mscorlib">
+    <value>5</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">

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -358,9 +358,27 @@
 				using(Pen p = new Pen(string.IsNullOrEmpty(item.Edge.Color) ? Color.White : Utility.ParseHTMLColor(item.Edge.Color), /* float.Parse(item.Edge.Thickness) */ 1)) //TODO: Calculate appropriate thickness
 					g.DrawPolygon(p, points); //TODO: Implement line dash
 			}
-		
 		}
 
+        public static void RenderW2DImage(Graphics graphics, Rectangle rectangle, IW2DSymbol symb, Image image)
+        {
+            //TODO: This will currently just draw the default W2D image, it will not consider color overrides nor size parameters
+            //But something is better than nothing at the moment.
+            
+            if (image != null)
+            {
+                //Start from center
+                var location = new Point(rectangle.Width / 2, rectangle.Height / 2);
+
+                //Displace according to image size
+                location.X -= image.Width / 2;
+                location.Y -= image.Height / 2;
+
+                //Draw the result. 
+                graphics.DrawImage(image, location);
+            }
+        }
+
         public static Point[] Rotate(Point[] points, Point center, double radians)
         {
             double sin = Math.Sin(radians);
@@ -470,5 +488,7 @@
 
 			return retval;
 		}*/
-	}
+
+        
+    }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/Condition.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -26,6 +26,7 @@
 using System.Windows.Forms;
 using OSGeo.MapGuide.MaestroAPI;
 using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+using Maestro.Editors.Common;
 
 namespace Maestro.Editors.LayerDefinition.Vector.Scales
 {
@@ -41,6 +42,7 @@
         public event EventHandler ItemChanged;
 
         private VectorLayerEditorCtrl m_owner;
+        private IServerConnection _conn;
 
         public VectorLayerEditorCtrl Owner
         {
@@ -53,11 +55,17 @@
             }
         }
 
-        public Condition()
+        private Condition()
         {
             InitializeComponent();
         }
 
+        public Condition(IServerConnection conn)
+            : this()
+        {
+            _conn = conn;
+        }
+
         public void SetItem(IPointRule prt)
         {
             SetItemInternal(prt);
@@ -86,7 +94,14 @@
                 {
                     RuleCondition.Text = m_prt.Filter;
                     LegendLabel.Text = m_prt.LegendLabel;
-                    FeatureStyle.SetItem(m_prt, m_prt.PointSymbolization2D);
+                    Image w2d = null;
+                    //Determine if this is a w2d symbol style
+                    if (m_prt.PointSymbolization2D.Symbol.Type == PointSymbolType.W2D)
+                    {
+                        var sym = (IW2DSymbol)m_prt.PointSymbolization2D.Symbol;
+                        w2d = SymbolPicker.GetSymbol(_conn, sym.W2DSymbol.ResourceId, sym.W2DSymbol.LibraryItemName);
+                    }
+                    FeatureStyle.SetItem(m_prt, m_prt.PointSymbolization2D, w2d);
                     LabelStyle.SetItem(m_prt, m_prt.Label);
                 }
                 else if (m_lrt != null)

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionList.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionList.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionList.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -135,7 +135,8 @@
             if (rule == null)
                 return null;
 
-            Condition c = new Condition();
+            //Not pretty, but we need a server connection to fetch DWF symbol thumbnails for previewing
+            Condition c = new Condition(m_owner.EditorService.GetEditedResource().CurrentConnection);
 
             if (rule as IPointRule != null)
                 c.SetItem(rule as IPointRule);

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ItemStyle.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -37,6 +37,7 @@
         private IPointSymbolization2D m_point;
         private IList<IStroke> m_line;
         private IAreaSymbolizationFill m_area;
+        private Image m_w2dsymbol;
 
         private object m_parent;
 
@@ -44,6 +45,7 @@
         private bool isPoint = false;
         private bool isLine = false;
         private bool isArea = false;
+        private bool isW2dSymbol = false;
 
         public event EventHandler ItemChanged;
 
@@ -73,10 +75,12 @@
             SetItemInternal(parent, label);
         }
 
-        public void SetItem(IPointRule parent, IPointSymbolization2D point)
+        public void SetItem(IPointRule parent, IPointSymbolization2D point, Image img)
         {
-            isPoint = true;
+            isPoint = (point.Symbol.Type != PointSymbolType.W2D);
+            isW2dSymbol = (point.Symbol.Type == PointSymbolType.W2D);
             SetItemInternal(parent, point);
+            m_w2dsymbol = img;
         }
 
         public void SetItem(ILineRule parent, IEnumerable<IStroke> line)
@@ -97,6 +101,7 @@
             m_label = item as ITextSymbol;
             m_point = item as IPointSymbolization2D;
             m_area = item as IAreaSymbolizationFill;
+            m_w2dsymbol = item as Image;
 
             if (item is IEnumerable<IStroke>)
                 m_line = new List<IStroke>((IEnumerable<IStroke>)item);
@@ -114,10 +119,12 @@
             }
             else if (m_point != null)
             {
-                if (((IPointSymbolization2D)m_point).Symbol.Type == PointSymbolType.Mark)
-					FeaturePreviewRender.RenderPreviewPoint(e.Graphics, rect, m_point.Symbol as IMarkSymbol);
-                else if (((IPointSymbolization2D)m_point).Symbol.Type == PointSymbolType.Font)
+                if (m_point.Symbol.Type == PointSymbolType.Mark)
+                    FeaturePreviewRender.RenderPreviewPoint(e.Graphics, rect, m_point.Symbol as IMarkSymbol);
+                else if (m_point.Symbol.Type == PointSymbolType.Font)
                     FeaturePreviewRender.RenderPreviewFontSymbol(e.Graphics, rect, m_point.Symbol as IFontSymbol);
+                else if (m_point.Symbol.Type == PointSymbolType.W2D)
+                    FeaturePreviewRender.RenderW2DImage(e.Graphics, rect, m_point.Symbol as IW2DSymbol, m_w2dsymbol);
 			}
             else if (m_line != null)
             {
@@ -139,6 +146,11 @@
                 uc = new FontStyleEditor(m_owner.Editor, m_owner.Schema, 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);
+                ((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);
@@ -176,10 +188,18 @@
                         if (ItemChanged != null)
                             ItemChanged(m_label, null);
                     }
-                    else if (isPoint)
+                    else if (isPoint || isW2dSymbol)
                     {
+                        //We need to update this boolean state
+                        var w2d = ((PointFeatureStyleEditor)uc).W2DSymbolPreviewImage;
+                        isPoint = (w2d == null);
+                        isW2dSymbol = (w2d != null);
+
                         m_point = ((PointFeatureStyleEditor)uc).Item;
                         ((IPointRule)m_parent).PointSymbolization2D = m_point;
+
+                        m_w2dsymbol = w2d;
+
                         if (ItemChanged != null)
                             ItemChanged(m_point, null);
                     }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.resx	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.resx	2011-04-29 13:16:41 UTC (rev 5726)
@@ -169,7 +169,7 @@
     <value>lineConditionList</value>
   </data>
   <data name="&gt;&gt;lineConditionList.Type" xml:space="preserve">
-    <value>OSGeo.MapGuide.Maestro.ResourceEditors.LayerEditorControls.ScaleControls.ConditionListButtons, OSGeo.MapGuide.Maestro.ResourceEditors, Version=1.1.0.4347, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;lineConditionList.Parent" xml:space="preserve">
     <value>$this</value>
@@ -193,7 +193,7 @@
     <value>7</value>
   </data>
   <data name="DisplayPoints.Text" xml:space="preserve">
-    <value>Display points</value>
+    <value>Display points (Note: Symbol previews only show the symbol. It doesn't consider color overrides or size/rotation settings)</value>
   </data>
   <data name="&gt;&gt;DisplayPoints.Name" xml:space="preserve">
     <value>DisplayPoints</value>
@@ -226,7 +226,7 @@
     <value>pointConditionList</value>
   </data>
   <data name="&gt;&gt;pointConditionList.Type" xml:space="preserve">
-    <value>OSGeo.MapGuide.Maestro.ResourceEditors.LayerEditorControls.ScaleControls.ConditionListButtons, OSGeo.MapGuide.Maestro.ResourceEditors, Version=1.1.0.4347, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;pointConditionList.Parent" xml:space="preserve">
     <value>$this</value>
@@ -283,7 +283,7 @@
     <value>areaConditionList</value>
   </data>
   <data name="&gt;&gt;areaConditionList.Type" xml:space="preserve">
-    <value>OSGeo.MapGuide.Maestro.ResourceEditors.LayerEditorControls.ScaleControls.ConditionListButtons, OSGeo.MapGuide.Maestro.ResourceEditors, Version=1.1.0.4347, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;areaConditionList.Parent" xml:space="preserve">
     <value>$this</value>
@@ -342,9 +342,6 @@
   <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
-    <value>6, 13</value>
-  </data>
   <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
     <value>597, 334</value>
   </data>

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -47,8 +47,8 @@
 		private System.Windows.Forms.Label label3;
 		private System.Windows.Forms.Label label4;
 		private System.Windows.Forms.Label label5;
-		private System.Windows.Forms.GroupBox groupBox2;
-		private System.Windows.Forms.GroupBox groupBox3;
+		private System.Windows.Forms.GroupBox grpSymbolFill;
+		private System.Windows.Forms.GroupBox grpSymbolBorder;
 		private System.Windows.Forms.GroupBox groupBox4;
 		private System.Windows.Forms.PictureBox previewPicture;
 		private System.Data.DataSet ComboBoxDataSet;
@@ -114,6 +114,13 @@
         private ClassDefinition m_schema;
         private string m_featureSource;
         private string m_providername;
+        private GroupBox grpW2DStyle;
+        private CheckBox chkW2DTextColor;
+        private ColorComboWithTransparency cmbW2DTextColor;
+        private CheckBox chkW2DLineColor;
+        private ColorComboWithTransparency cmbW2DLineColor;
+        private CheckBox chkW2DFillColor;
+        private ColorComboWithTransparency cmbW2DFillColor;
         private ILayerElementFactory _factory;
 
         public PointFeatureStyleEditor(IEditorService editor, ClassDefinition schema, string featureSource)
@@ -131,6 +138,12 @@
             m_item = _factory.CreateDefaultPointSymbolization2D();
         }
 
+        public PointFeatureStyleEditor(IEditorService editor, ClassDefinition schema, string featureSource, Image currentW2D)
+            : this(editor, schema, featureSource)
+        {
+            grpW2DStyle.Tag = currentW2D;
+        }
+
 		private PointFeatureStyleEditor()
 		{
 			//
@@ -158,13 +171,21 @@
 			lineStyleEditor.fillCombo.SelectedIndexChanged +=new EventHandler(fillCombo_Line_SelectedIndexChanged);
 		}
 
-		private void setUIForMarkSymbol(bool enabled)
+		private void setUIForMarkSymbol(bool isMark)
 		{
-            groupBoxSymbolLocation.Enabled = enabled;
-            groupBox2.Enabled = enabled;
-            groupBox3.Enabled = enabled;
+            groupBoxSymbolLocation.Enabled = isMark;
+            grpSymbolFill.Enabled = isMark;
+            grpSymbolBorder.Enabled = isMark;
 
-            groupBoxFont.Enabled = !enabled;
+            groupBoxFont.Enabled = false;
+            grpW2DStyle.Enabled = false;
+
+            if (!isMark)
+            {
+                //Determine if it is font or w2d
+                groupBoxFont.Enabled = (m_item.Symbol.Type == PointSymbolType.Font);
+                grpW2DStyle.Enabled = (m_item.Symbol.Type == PointSymbolType.W2D);
+            }
 		}
 
 		private void UpdateDisplay()
@@ -242,7 +263,7 @@
 					IFontSymbol f = (IFontSymbol)m_item.Symbol;
 
 					// TODO: Dislike this hard coding, but with association from 'Shape' the 'Font...' string cannot be found or set from the Symbol combobox
-					Symbol.SelectedIndex = 6;
+					Symbol.SelectedIndex = 6; //Font
 
                     fontCombo.SelectedIndex = fontCombo.FindString(f.FontName);
                     if (string.Compare(fontCombo.Text, f.FontName, true) == 0)
@@ -263,10 +284,31 @@
 
 					setUIForMarkSymbol(false);
 				}
-				else
-					//TODO: Fix this
-					MessageBox.Show(this, Properties.Resources.SymbolTypeNotSupported, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
+                else if (m_item.Symbol.Type == PointSymbolType.W2D)
+                {
+                    // TODO: Dislike this hard coding, but with association from 'Shape' the 'Font...' string cannot be found or set from the Symbol combobox
+                    Symbol.SelectedIndex = 7; //Symbol
+                    var sym = (IW2DSymbol)m_item.Symbol;
 
+                    chkW2DFillColor.Checked = (sym.FillColor != null);
+                    chkW2DLineColor.Checked = (sym.LineColor != null);
+                    chkW2DTextColor.Checked = (sym.TextColor != null);
+
+                    if (chkW2DFillColor.Checked)
+                        cmbW2DFillColor.CurrentColor = Utility.ParseHTMLColor(sym.FillColor);
+
+                    if (chkW2DLineColor.Checked)
+                        cmbW2DLineColor.CurrentColor = Utility.ParseHTMLColor(sym.LineColor);
+
+                    if (chkW2DTextColor.Checked)
+                        cmbW2DTextColor.CurrentColor = Utility.ParseHTMLColor(sym.TextColor);
+
+                    setUIForMarkSymbol(false);
+                }
+                else
+                    //TODO: Fix this
+                    MessageBox.Show(this, Properties.Resources.SymbolTypeNotSupported, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
+
 				previewPicture.Refresh();
 			} 
 			finally
@@ -324,17 +366,17 @@
             this.label3 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.groupBox2 = new System.Windows.Forms.GroupBox();
-            this.fillStyleEditor = new FillStyleEditor();
-            this.groupBox3 = new System.Windows.Forms.GroupBox();
-            this.lineStyleEditor = new LineStyleEditor();
+            this.grpSymbolFill = new System.Windows.Forms.GroupBox();
+            this.fillStyleEditor = new Maestro.Editors.LayerDefinition.Vector.StyleEditors.FillStyleEditor();
+            this.grpSymbolBorder = new System.Windows.Forms.GroupBox();
+            this.lineStyleEditor = new Maestro.Editors.LayerDefinition.Vector.StyleEditors.LineStyleEditor();
             this.groupBox4 = new System.Windows.Forms.GroupBox();
             this.previewPicture = new System.Windows.Forms.PictureBox();
             this.ComboBoxDataSet = new System.Data.DataSet();
             this.DisplayPoints = new System.Windows.Forms.CheckBox();
             this.groupBoxFont = new System.Windows.Forms.GroupBox();
             this.label11 = new System.Windows.Forms.Label();
-            this.colorFontForeground = new ColorComboWithTransparency();
+            this.colorFontForeground = new Maestro.Editors.Common.ColorComboWithTransparency();
             this.panel1 = new System.Windows.Forms.Panel();
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();
             this.FontBoldButton = new System.Windows.Forms.ToolStripButton();
@@ -352,13 +394,20 @@
             this.label7 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
             this.MaintainAspectRatio = new System.Windows.Forms.CheckBox();
+            this.grpW2DStyle = new System.Windows.Forms.GroupBox();
+            this.chkW2DTextColor = new System.Windows.Forms.CheckBox();
+            this.cmbW2DTextColor = new Maestro.Editors.Common.ColorComboWithTransparency();
+            this.chkW2DLineColor = new System.Windows.Forms.CheckBox();
+            this.cmbW2DLineColor = new Maestro.Editors.Common.ColorComboWithTransparency();
+            this.chkW2DFillColor = new System.Windows.Forms.CheckBox();
+            this.cmbW2DFillColor = new Maestro.Editors.Common.ColorComboWithTransparency();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.RotationTable)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.UnitsTable)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.SizeContextTable)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.SymbolMarkTable)).BeginInit();
-            this.groupBox2.SuspendLayout();
-            this.groupBox3.SuspendLayout();
+            this.grpSymbolFill.SuspendLayout();
+            this.grpSymbolBorder.SuspendLayout();
             this.groupBox4.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.previewPicture)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComboBoxDataSet)).BeginInit();
@@ -366,6 +415,7 @@
             this.panel1.SuspendLayout();
             this.toolStrip1.SuspendLayout();
             this.groupBoxSymbolLocation.SuspendLayout();
+            this.grpW2DStyle.SuspendLayout();
             this.SuspendLayout();
             // 
             // groupBox1
@@ -418,12 +468,12 @@
             resources.ApplyResources(this.label9, "label9");
             this.label9.Name = "label9";
             // 
-            // HeigthText
+            // HeightText
             // 
-            resources.ApplyResources(this.HeightText, "HeigthText");
+            resources.ApplyResources(this.HeightText, "HeightText");
             this.HeightText.Items.AddRange(new object[] {
-            resources.GetString("HeigthText.Items")});
-            this.HeightText.Name = "HeigthText";
+            resources.GetString("HeightText.Items")});
+            this.HeightText.Name = "HeightText";
             this.HeightText.SelectedIndexChanged += new System.EventHandler(this.HeigthText_SelectedIndexChanged);
             this.HeightText.TextChanged += new System.EventHandler(this.HeightText_TextChanged);
             // 
@@ -542,24 +592,24 @@
             resources.ApplyResources(this.label1, "label1");
             this.label1.Name = "label1";
             // 
-            // groupBox2
+            // grpSymbolFill
             // 
-            resources.ApplyResources(this.groupBox2, "groupBox2");
-            this.groupBox2.Controls.Add(this.fillStyleEditor);
-            this.groupBox2.Name = "groupBox2";
-            this.groupBox2.TabStop = false;
+            resources.ApplyResources(this.grpSymbolFill, "grpSymbolFill");
+            this.grpSymbolFill.Controls.Add(this.fillStyleEditor);
+            this.grpSymbolFill.Name = "grpSymbolFill";
+            this.grpSymbolFill.TabStop = false;
             // 
             // fillStyleEditor
             // 
             resources.ApplyResources(this.fillStyleEditor, "fillStyleEditor");
             this.fillStyleEditor.Name = "fillStyleEditor";
             // 
-            // groupBox3
+            // grpSymbolBorder
             // 
-            resources.ApplyResources(this.groupBox3, "groupBox3");
-            this.groupBox3.Controls.Add(this.lineStyleEditor);
-            this.groupBox3.Name = "groupBox3";
-            this.groupBox3.TabStop = false;
+            resources.ApplyResources(this.grpSymbolBorder, "grpSymbolBorder");
+            this.grpSymbolBorder.Controls.Add(this.lineStyleEditor);
+            this.grpSymbolBorder.Name = "grpSymbolBorder";
+            this.grpSymbolBorder.TabStop = false;
             // 
             // lineStyleEditor
             // 
@@ -741,16 +791,71 @@
             resources.ApplyResources(this.MaintainAspectRatio, "MaintainAspectRatio");
             this.MaintainAspectRatio.Name = "MaintainAspectRatio";
             // 
+            // grpW2DStyle
+            // 
+            this.grpW2DStyle.Controls.Add(this.chkW2DTextColor);
+            this.grpW2DStyle.Controls.Add(this.cmbW2DTextColor);
+            this.grpW2DStyle.Controls.Add(this.chkW2DLineColor);
+            this.grpW2DStyle.Controls.Add(this.cmbW2DLineColor);
+            this.grpW2DStyle.Controls.Add(this.chkW2DFillColor);
+            this.grpW2DStyle.Controls.Add(this.cmbW2DFillColor);
+            resources.ApplyResources(this.grpW2DStyle, "grpW2DStyle");
+            this.grpW2DStyle.Name = "grpW2DStyle";
+            this.grpW2DStyle.TabStop = false;
+            // 
+            // chkW2DTextColor
+            // 
+            resources.ApplyResources(this.chkW2DTextColor, "chkW2DTextColor");
+            this.chkW2DTextColor.Name = "chkW2DTextColor";
+            this.chkW2DTextColor.UseVisualStyleBackColor = true;
+            this.chkW2DTextColor.CheckedChanged += new System.EventHandler(this.chkW2DTextColor_CheckedChanged);
+            // 
+            // cmbW2DTextColor
+            // 
+            resources.ApplyResources(this.cmbW2DTextColor, "cmbW2DTextColor");
+            this.cmbW2DTextColor.CurrentColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+            this.cmbW2DTextColor.Name = "cmbW2DTextColor";
+            this.cmbW2DTextColor.CurrentColorChanged += new System.EventHandler(this.cmbW2DTextColor_SelectedIndexChanged);
+            // 
+            // chkW2DLineColor
+            // 
+            resources.ApplyResources(this.chkW2DLineColor, "chkW2DLineColor");
+            this.chkW2DLineColor.Name = "chkW2DLineColor";
+            this.chkW2DLineColor.UseVisualStyleBackColor = true;
+            this.chkW2DLineColor.CheckedChanged += new System.EventHandler(this.chkW2DLineColor_CheckedChanged);
+            // 
+            // cmbW2DLineColor
+            // 
+            resources.ApplyResources(this.cmbW2DLineColor, "cmbW2DLineColor");
+            this.cmbW2DLineColor.CurrentColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+            this.cmbW2DLineColor.Name = "cmbW2DLineColor";
+            this.cmbW2DLineColor.CurrentColorChanged += new System.EventHandler(this.cmbW2DLineColor_SelectedIndexChanged);
+            // 
+            // chkW2DFillColor
+            // 
+            resources.ApplyResources(this.chkW2DFillColor, "chkW2DFillColor");
+            this.chkW2DFillColor.Name = "chkW2DFillColor";
+            this.chkW2DFillColor.UseVisualStyleBackColor = true;
+            this.chkW2DFillColor.CheckedChanged += new System.EventHandler(this.chkW2DFillColor_CheckedChanged);
+            // 
+            // cmbW2DFillColor
+            // 
+            resources.ApplyResources(this.cmbW2DFillColor, "cmbW2DFillColor");
+            this.cmbW2DFillColor.CurrentColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+            this.cmbW2DFillColor.Name = "cmbW2DFillColor";
+            this.cmbW2DFillColor.CurrentColorChanged += new System.EventHandler(this.cmbW2DFillColor_SelectedIndexChanged);
+            // 
             // PointFeatureStyleEditor
             // 
             resources.ApplyResources(this, "$this");
+            this.Controls.Add(this.grpW2DStyle);
             this.Controls.Add(this.groupBoxSymbolLocation);
             this.Controls.Add(this.groupBoxFont);
             this.Controls.Add(this.DisplayPoints);
             this.Controls.Add(this.groupBox4);
-            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.grpSymbolFill);
             this.Controls.Add(this.groupBox1);
-            this.Controls.Add(this.groupBox3);
+            this.Controls.Add(this.grpSymbolBorder);
             this.Name = "PointFeatureStyleEditor";
             this.Load += new System.EventHandler(this.PointFeatureStyleEditor_Load);
             this.groupBox1.ResumeLayout(false);
@@ -759,8 +864,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.UnitsTable)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.SizeContextTable)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.SymbolMarkTable)).EndInit();
-            this.groupBox2.ResumeLayout(false);
-            this.groupBox3.ResumeLayout(false);
+            this.grpSymbolFill.ResumeLayout(false);
+            this.grpSymbolBorder.ResumeLayout(false);
             this.groupBox4.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.previewPicture)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComboBoxDataSet)).EndInit();
@@ -772,6 +877,8 @@
             this.toolStrip1.PerformLayout();
             this.groupBoxSymbolLocation.ResumeLayout(false);
             this.groupBoxSymbolLocation.PerformLayout();
+            this.grpW2DStyle.ResumeLayout(false);
+            this.grpW2DStyle.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -786,14 +893,20 @@
 		private void previewPicture_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
 		{
             e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
-			if (m_item != null && m_item.Symbol.Type == PointSymbolType.Mark)
-				FeaturePreviewRender.RenderPreviewPoint(e.Graphics, new Rectangle(1, 1, previewPicture.Width - 2, previewPicture.Height - 2), (IMarkSymbol)m_item.Symbol);
-			else if (m_item != null && m_item.Symbol.Type == PointSymbolType.Font)
+            if (m_item != null && m_item.Symbol.Type == PointSymbolType.Mark)
+                FeaturePreviewRender.RenderPreviewPoint(e.Graphics, new Rectangle(1, 1, previewPicture.Width - 2, previewPicture.Height - 2), (IMarkSymbol)m_item.Symbol);
+            else if (m_item != null && m_item.Symbol.Type == PointSymbolType.Font)
                 FeaturePreviewRender.RenderPreviewFontSymbol(e.Graphics, new Rectangle(1, 1, previewPicture.Width - 2, previewPicture.Height - 2), (IFontSymbol)m_item.Symbol);
-			else
+            else if (m_item != null && m_item.Symbol.Type == PointSymbolType.W2D)
+                FeaturePreviewRender.RenderW2DImage(e.Graphics, new Rectangle(1, 1, previewPicture.Width - 2, previewPicture.Height - 2), (IW2DSymbol)m_item.Symbol, grpW2DStyle.Tag as Image);
+            else
                 FeaturePreviewRender.RenderPreviewPoint(e.Graphics, new Rectangle(1, 1, previewPicture.Width - 2, previewPicture.Height - 2), null);
 		}
 
+        private IW2DSymbol m_lastSymbol;
+
+        internal Image W2DSymbolPreviewImage { get { return grpW2DStyle.Tag as Image; } }
+
 		private void Symbol_SelectedIndexChanged(object sender, System.EventArgs e)
 		{
 			if (m_inUpdate)
@@ -818,6 +931,9 @@
 
             if (isSymbol)
             {
+                //W2D symbol is not selected, so invalidate
+                grpW2DStyle.Tag = null;
+
                 bool update = m_item.Symbol != m_lastMark;
 
                 if (m_lastMark == null)
@@ -830,8 +946,11 @@
                 if (update)
                     UpdateDisplay();
             }
-			else if (Symbol.SelectedIndex == 6)
+			else if (Symbol.SelectedIndex == 6) //Font
 			{
+                //W2D symbol is not selected, so invalidate
+                grpW2DStyle.Tag = null;
+
 			    // user wants to change away FROM a valid 'Mark' symbol type
 			    // if ("Font..." == Symbol.SelectedText)
 
@@ -852,12 +971,41 @@
                 if (update)
                     UpdateDisplay();
             }
-			else
-			{
-				MessageBox.Show(this, Properties.Resources.SymbolTypeNotSupported, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
-				return;
-			}
+            else if (Symbol.SelectedIndex == 7) //Symbol
+            {
+                using (var picker = new SymbolPicker(m_editor.GetEditedResource().CurrentConnection))
+                {
+                    if (picker.ShowDialog() == DialogResult.OK)
+                    {
+                        bool update = m_item.Symbol != m_lastSymbol;
+                        if (m_lastSymbol == null)
+                        {
+                            m_lastSymbol = _factory.CreateDefaultW2DSymbol(picker.SymbolLibrary, picker.SymbolName);
+                            m_lastSymbol.SizeContext = SizeContextType.DeviceUnits;
+                            m_lastSymbol.Rotation = "0";
+                            m_lastSymbol.SizeX = "10";
+                            m_lastSymbol.SizeY = "10";
+                            m_lastSymbol.Unit = LengthUnitType.Points;
+                        }
 
+                        m_item.Symbol = m_lastSymbol;
+                        //Store the W2D preview image
+                        grpW2DStyle.Tag = picker.SymbolImage;
+                        setUIForMarkSymbol(false);
+                        if (update)
+                            UpdateDisplay();
+                    }
+                }
+            }
+            else
+            {
+                //W2D symbol is not selected, so invalidate
+                grpW2DStyle.Tag = null;
+
+                MessageBox.Show(this, Properties.Resources.SymbolTypeNotSupported, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
+                return;
+            }
+
 			previewPicture.Refresh();
 			if (Changed != null)
 				Changed(this, new EventArgs());
@@ -872,6 +1020,8 @@
                 ((IMarkSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
             else if (m_item.Symbol.Type == PointSymbolType.Font)
                 ((IFontSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
+            else if (m_item.Symbol.Type == PointSymbolType.W2D)
+                ((IW2DSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
 			previewPicture.Refresh();
 			if (Changed != null)
 				Changed(this, new EventArgs());
@@ -882,7 +1032,7 @@
 			if (m_inUpdate)
 				return;
 
-			if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font)
+			if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font || m_item.Symbol.Type == PointSymbolType.W2D)
                 m_item.Symbol.Unit = (LengthUnitType)Enum.Parse(typeof(LengthUnitType), (string)SizeUnits.SelectedValue);
 			previewPicture.Refresh();
 			if (Changed != null)
@@ -920,7 +1070,7 @@
             if (WidthText.SelectedIndex == WidthText.Items.Count - 1)
             {
                 string current = null;
-                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font)
+                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font || m_item.Symbol.Type == PointSymbolType.W2D)
                     current = m_item.Symbol.SizeX;
 
                 string expr = null;
@@ -944,7 +1094,7 @@
             if (HeightText.SelectedIndex == HeightText.Items.Count - 1)
             {
                 string current = null;
-                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font)
+                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font || m_item.Symbol.Type == PointSymbolType.W2D)
                     current = m_item.Symbol.SizeY;
 
                 string expr = null;
@@ -1006,7 +1156,7 @@
             if (RotationBox.SelectedIndex == RotationBox.Items.Count - 1)
             {
                 string current = null;
-                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font)
+                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font || m_item.Symbol.Type == PointSymbolType.W2D)
                     current = m_item.Symbol.Rotation;
 
                 string expr = null;
@@ -1022,7 +1172,7 @@
             }
             else if (RotationBox.SelectedIndex != -1)
             {
-                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font)
+                if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font || m_item.Symbol.Type == PointSymbolType.W2D)
                     m_item.Symbol.Rotation = (string)RotationBox.SelectedValue;
 
                 //RotationBox.SelectedIndex = -1;
@@ -1280,7 +1430,7 @@
                 return;
 
             //TODO: Validate
-            if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font)
+            if (m_item.Symbol.Type == PointSymbolType.Mark || m_item.Symbol.Type == PointSymbolType.Font || m_item.Symbol.Type == PointSymbolType.W2D)
                 m_item.Symbol.SizeX = WidthText.Text;
             previewPicture.Refresh();
             if (Changed != null)
@@ -1297,6 +1447,8 @@
                 m_item.Symbol.SizeY = HeightText.Text;
             else if (m_item.Symbol.Type == PointSymbolType.Font)
                 m_item.Symbol.SizeY = HeightText.Text;
+            else if (m_item.Symbol.Type == PointSymbolType.W2D)
+                m_item.Symbol.SizeY = HeightText.Text;
             previewPicture.Refresh();
             if (Changed != null)
                 Changed(this, new EventArgs());
@@ -1312,6 +1464,8 @@
                 m_item.Symbol.Rotation = RotationBox.Text;
             else if (m_item.Symbol.Type == PointSymbolType.Font)
                 m_item.Symbol.Rotation = RotationBox.Text;
+            else if (m_item.Symbol.Type == PointSymbolType.W2D)
+                m_item.Symbol.Rotation = RotationBox.Text;
             previewPicture.Refresh();
             if (Changed != null)
                 Changed(this, new EventArgs());
@@ -1383,5 +1537,126 @@
             fillStyleEditor.displayFill.Enabled =
                 false;
         }
+
+        private void chkW2DFillColor_CheckedChanged(object sender, EventArgs e)
+        {
+            cmbW2DFillColor.Enabled = chkW2DFillColor.Checked;
+
+            if (m_inUpdate)
+                return;
+
+            var sym = m_item.Symbol as IW2DSymbol;
+            if (sym == null)
+                return;
+
+            if (!chkW2DFillColor.Checked)
+            {
+                sym.FillColor = null;
+            }
+            else
+            {
+                if (sym.FillColor != null)
+                    cmbW2DFillColor.CurrentColor = Utility.ParseHTMLColor(sym.FillColor);
+            }
+        }
+
+        private void chkW2DLineColor_CheckedChanged(object sender, EventArgs e)
+        {
+            cmbW2DLineColor.Enabled = chkW2DLineColor.Checked;
+            if (m_inUpdate)
+                return;
+
+            var sym = m_item.Symbol as IW2DSymbol;
+            if (sym == null)
+                return;
+
+            if (!chkW2DLineColor.Checked)
+            {
+                sym.LineColor = null;
+            }
+            else
+            {
+                if (sym.LineColor != null)
+                    cmbW2DLineColor.CurrentColor = Utility.ParseHTMLColor(sym.LineColor);
+            }
+        }
+
+        private void chkW2DTextColor_CheckedChanged(object sender, EventArgs e)
+        {
+            cmbW2DTextColor.Enabled = chkW2DTextColor.Checked;
+            if (m_inUpdate)
+                return;
+
+            var sym = m_item.Symbol as IW2DSymbol;
+            if (sym == null)
+                return;
+
+            if (!chkW2DTextColor.Checked)
+            {
+                sym.TextColor = null;
+            }
+            else
+            {
+                if (sym.TextColor != null)
+                    cmbW2DTextColor.CurrentColor = Utility.ParseHTMLColor(sym.TextColor);
+            }
+        }
+
+        private void cmbW2DFillColor_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (!chkW2DFillColor.Checked)
+                return;
+
+            if (m_inUpdate)
+                return;
+
+            var sym = m_item.Symbol as IW2DSymbol;
+            if (sym == null)
+                return;
+
+            sym.FillColor = Utility.SerializeHTMLColor(cmbW2DFillColor.CurrentColor, true);
+
+            previewPicture.Refresh();
+            if (Changed != null)
+                Changed(this, new EventArgs());
+        }
+
+        private void cmbW2DLineColor_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (!chkW2DLineColor.Checked)
+                return;
+
+            if (m_inUpdate)
+                return;
+
+            var sym = m_item.Symbol as IW2DSymbol;
+            if (sym == null)
+                return;
+
+            sym.LineColor = Utility.SerializeHTMLColor(cmbW2DLineColor.CurrentColor, true);
+
+            previewPicture.Refresh();
+            if (Changed != null)
+                Changed(this, new EventArgs());
+        }
+
+        private void cmbW2DTextColor_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (!chkW2DTextColor.Checked)
+                return;
+
+            if (m_inUpdate)
+                return;
+
+            var sym = m_item.Symbol as IW2DSymbol;
+            if (sym == null)
+                return;
+
+            sym.TextColor = Utility.SerializeHTMLColor(cmbW2DTextColor.CurrentColor, true);
+
+            previewPicture.Refresh();
+            if (Changed != null)
+                Changed(this, new EventArgs());
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.resx	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.resx	2011-04-29 13:16:41 UTC (rev 5726)
@@ -174,31 +174,31 @@
   <data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
     <value>1</value>
   </data>
-  <data name="HeigthText.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+  <data name="HeightText.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
   </data>
-  <data name="HeigthText.Items" xml:space="preserve">
+  <data name="HeightText.Items" xml:space="preserve">
     <value>Expression...</value>
   </data>
-  <data name="HeigthText.Location" type="System.Drawing.Point, System.Drawing">
+  <data name="HeightText.Location" type="System.Drawing.Point, System.Drawing">
     <value>128, 144</value>
   </data>
-  <data name="HeigthText.Size" type="System.Drawing.Size, System.Drawing">
+  <data name="HeightText.Size" type="System.Drawing.Size, System.Drawing">
     <value>208, 21</value>
   </data>
-  <data name="HeigthText.TabIndex" type="System.Int32, mscorlib">
+  <data name="HeightText.TabIndex" type="System.Int32, mscorlib">
     <value>9</value>
   </data>
-  <data name="&gt;&gt;HeigthText.Name" xml:space="preserve">
-    <value>HeigthText</value>
+  <data name="&gt;&gt;HeightText.Name" xml:space="preserve">
+    <value>HeightText</value>
   </data>
-  <data name="&gt;&gt;HeigthText.Type" xml:space="preserve">
+  <data name="&gt;&gt;HeightText.Type" xml:space="preserve">
     <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;HeigthText.Parent" xml:space="preserve">
+  <data name="&gt;&gt;HeightText.Parent" xml:space="preserve">
     <value>groupBox1</value>
   </data>
-  <data name="&gt;&gt;HeigthText.ZOrder" xml:space="preserve">
+  <data name="&gt;&gt;HeightText.ZOrder" xml:space="preserve">
     <value>2</value>
   </data>
   <data name="WidthText.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
@@ -457,9 +457,9 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
-    <value>5</value>
+    <value>6</value>
   </data>
-  <data name="groupBox2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+  <data name="grpSymbolFill.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
   </data>
   <data name="fillStyleEditor.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@@ -478,39 +478,39 @@
     <value>fillStyleEditor</value>
   </data>
   <data name="&gt;&gt;fillStyleEditor.Type" xml:space="preserve">
-    <value>OSGeo.MapGuide.Maestro.ResourceEditors.GeometryStyleEditors.FillStyleEditor, OSGeo.MapGuide.Maestro.ResourceEditors, Version=1.1.0.4437, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.Vector.StyleEditors.FillStyleEditor, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;fillStyleEditor.Parent" xml:space="preserve">
-    <value>groupBox2</value>
+    <value>grpSymbolFill</value>
   </data>
   <data name="&gt;&gt;fillStyleEditor.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 440</value>
+  <data name="grpSymbolFill.Location" type="System.Drawing.Point, System.Drawing">
+    <value>0, 540</value>
   </data>
-  <data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
+  <data name="grpSymbolFill.Size" type="System.Drawing.Size, System.Drawing">
     <value>344, 168</value>
   </data>
-  <data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
+  <data name="grpSymbolFill.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
   </data>
-  <data name="groupBox2.Text" xml:space="preserve">
+  <data name="grpSymbolFill.Text" xml:space="preserve">
     <value>Symbol fill</value>
   </data>
-  <data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
-    <value>groupBox2</value>
+  <data name="&gt;&gt;grpSymbolFill.Name" xml:space="preserve">
+    <value>grpSymbolFill</value>
   </data>
-  <data name="&gt;&gt;groupBox2.Type" xml:space="preserve">
+  <data name="&gt;&gt;grpSymbolFill.Type" xml:space="preserve">
     <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;groupBox2.Parent" xml:space="preserve">
+  <data name="&gt;&gt;grpSymbolFill.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
-    <value>4</value>
+  <data name="&gt;&gt;grpSymbolFill.ZOrder" xml:space="preserve">
+    <value>5</value>
   </data>
-  <data name="groupBox3.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+  <data name="grpSymbolBorder.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
   </data>
   <data name="lineStyleEditor.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@@ -529,37 +529,37 @@
     <value>lineStyleEditor</value>
   </data>
   <data name="&gt;&gt;lineStyleEditor.Type" xml:space="preserve">
-    <value>OSGeo.MapGuide.Maestro.ResourceEditors.GeometryStyleEditors.LineStyleEditor, OSGeo.MapGuide.Maestro.ResourceEditors, Version=1.1.0.4437, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.Vector.StyleEditors.LineStyleEditor, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;lineStyleEditor.Parent" xml:space="preserve">
-    <value>groupBox3</value>
+    <value>grpSymbolBorder</value>
   </data>
   <data name="&gt;&gt;lineStyleEditor.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <data name="groupBox3.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 616</value>
+  <data name="grpSymbolBorder.Location" type="System.Drawing.Point, System.Drawing">
+    <value>0, 714</value>
   </data>
-  <data name="groupBox3.Size" type="System.Drawing.Size, System.Drawing">
+  <data name="grpSymbolBorder.Size" type="System.Drawing.Size, System.Drawing">
     <value>344, 152</value>
   </data>
-  <data name="groupBox3.TabIndex" type="System.Int32, mscorlib">
+  <data name="grpSymbolBorder.TabIndex" type="System.Int32, mscorlib">
     <value>6</value>
   </data>
-  <data name="groupBox3.Text" xml:space="preserve">
+  <data name="grpSymbolBorder.Text" xml:space="preserve">
     <value>Symbol border</value>
   </data>
-  <data name="&gt;&gt;groupBox3.Name" xml:space="preserve">
-    <value>groupBox3</value>
+  <data name="&gt;&gt;grpSymbolBorder.Name" xml:space="preserve">
+    <value>grpSymbolBorder</value>
   </data>
-  <data name="&gt;&gt;groupBox3.Type" xml:space="preserve">
+  <data name="&gt;&gt;grpSymbolBorder.Type" xml:space="preserve">
     <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;groupBox3.Parent" xml:space="preserve">
+  <data name="&gt;&gt;grpSymbolBorder.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;groupBox3.ZOrder" xml:space="preserve">
-    <value>6</value>
+  <data name="&gt;&gt;grpSymbolBorder.ZOrder" xml:space="preserve">
+    <value>7</value>
   </data>
   <data name="groupBox4.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -589,7 +589,7 @@
     <value>0</value>
   </data>
   <data name="groupBox4.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 776</value>
+    <value>0, 869</value>
   </data>
   <data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
     <value>344, 48</value>
@@ -598,7 +598,7 @@
     <value>7</value>
   </data>
   <data name="groupBox4.Text" xml:space="preserve">
-    <value>Preview</value>
+    <value>Preview (Note: Approximation only. May not be accurate)</value>
   </data>
   <data name="&gt;&gt;groupBox4.Name" xml:space="preserve">
     <value>groupBox4</value>
@@ -610,10 +610,10 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;groupBox4.ZOrder" xml:space="preserve">
-    <value>3</value>
+    <value>4</value>
   </data>
   <metadata name="ComboBoxDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
+    <value>122, 17</value>
   </metadata>
   <data name="DisplayPoints.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
@@ -640,7 +640,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;DisplayPoints.ZOrder" xml:space="preserve">
-    <value>2</value>
+    <value>3</value>
   </data>
   <data name="groupBoxFont.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -691,7 +691,7 @@
     <value>colorFontForeground</value>
   </data>
   <data name="&gt;&gt;colorFontForeground.Type" xml:space="preserve">
-    <value>OSGeo.MapGuide.Maestro.ResourceEditors.GeometryStyleEditors.ColorComboWithTransparency, OSGeo.MapGuide.Maestro.ResourceEditors, Version=1.1.0.4437, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.Common.ColorComboWithTransparency, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;colorFontForeground.Parent" xml:space="preserve">
     <value>groupBoxFont</value>
@@ -943,7 +943,7 @@
     <value>6</value>
   </data>
   <data name="groupBoxFont.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 240</value>
+    <value>0, 316</value>
   </data>
   <data name="groupBoxFont.Size" type="System.Drawing.Size, System.Drawing">
     <value>344, 112</value>
@@ -964,7 +964,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;groupBoxFont.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>2</value>
   </data>
   <data name="groupBoxSymbolLocation.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
@@ -1144,7 +1144,7 @@
     <value>6</value>
   </data>
   <data name="groupBoxSymbolLocation.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 360</value>
+    <value>0, 238</value>
   </data>
   <data name="groupBoxSymbolLocation.Size" type="System.Drawing.Size, System.Drawing">
     <value>344, 72</value>
@@ -1165,8 +1165,200 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;groupBoxSymbolLocation.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="chkW2DTextColor.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="chkW2DTextColor.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="chkW2DTextColor.Location" type="System.Drawing.Point, System.Drawing">
+    <value>15, 77</value>
+  </data>
+  <data name="chkW2DTextColor.Size" type="System.Drawing.Size, System.Drawing">
+    <value>74, 17</value>
+  </data>
+  <data name="chkW2DTextColor.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
+  </data>
+  <data name="chkW2DTextColor.Text" xml:space="preserve">
+    <value>Text Color</value>
+  </data>
+  <data name="&gt;&gt;chkW2DTextColor.Name" xml:space="preserve">
+    <value>chkW2DTextColor</value>
+  </data>
+  <data name="&gt;&gt;chkW2DTextColor.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;chkW2DTextColor.Parent" xml:space="preserve">
+    <value>grpW2DStyle</value>
+  </data>
+  <data name="&gt;&gt;chkW2DTextColor.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
+  <data name="cmbW2DTextColor.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Left, Right</value>
+  </data>
+  <data name="cmbW2DTextColor.Enabled" type="System.Boolean, mscorlib">
+    <value>False</value>
+  </data>
+  <data name="cmbW2DTextColor.Location" type="System.Drawing.Point, System.Drawing">
+    <value>124, 73</value>
+  </data>
+  <data name="cmbW2DTextColor.Size" type="System.Drawing.Size, System.Drawing">
+    <value>217, 21</value>
+  </data>
+  <data name="cmbW2DTextColor.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DTextColor.Name" xml:space="preserve">
+    <value>cmbW2DTextColor</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DTextColor.Type" xml:space="preserve">
+    <value>Maestro.Editors.Common.ColorComboWithTransparency, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DTextColor.Parent" xml:space="preserve">
+    <value>grpW2DStyle</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DTextColor.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="chkW2DLineColor.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="chkW2DLineColor.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="chkW2DLineColor.Location" type="System.Drawing.Point, System.Drawing">
+    <value>15, 50</value>
+  </data>
+  <data name="chkW2DLineColor.Size" type="System.Drawing.Size, System.Drawing">
+    <value>73, 17</value>
+  </data>
+  <data name="chkW2DLineColor.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="chkW2DLineColor.Text" xml:space="preserve">
+    <value>Line Color</value>
+  </data>
+  <data name="&gt;&gt;chkW2DLineColor.Name" xml:space="preserve">
+    <value>chkW2DLineColor</value>
+  </data>
+  <data name="&gt;&gt;chkW2DLineColor.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;chkW2DLineColor.Parent" xml:space="preserve">
+    <value>grpW2DStyle</value>
+  </data>
+  <data name="&gt;&gt;chkW2DLineColor.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="cmbW2DLineColor.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Left, Right</value>
+  </data>
+  <data name="cmbW2DLineColor.Enabled" type="System.Boolean, mscorlib">
+    <value>False</value>
+  </data>
+  <data name="cmbW2DLineColor.Location" type="System.Drawing.Point, System.Drawing">
+    <value>124, 46</value>
+  </data>
+  <data name="cmbW2DLineColor.Size" type="System.Drawing.Size, System.Drawing">
+    <value>217, 21</value>
+  </data>
+  <data name="cmbW2DLineColor.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DLineColor.Name" xml:space="preserve">
+    <value>cmbW2DLineColor</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DLineColor.Type" xml:space="preserve">
+    <value>Maestro.Editors.Common.ColorComboWithTransparency, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DLineColor.Parent" xml:space="preserve">
+    <value>grpW2DStyle</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DLineColor.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="chkW2DFillColor.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="chkW2DFillColor.Location" type="System.Drawing.Point, System.Drawing">
+    <value>15, 23</value>
+  </data>
+  <data name="chkW2DFillColor.Size" type="System.Drawing.Size, System.Drawing">
+    <value>65, 17</value>
+  </data>
+  <data name="chkW2DFillColor.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="chkW2DFillColor.Text" xml:space="preserve">
+    <value>Fill Color</value>
+  </data>
+  <data name="&gt;&gt;chkW2DFillColor.Name" xml:space="preserve">
+    <value>chkW2DFillColor</value>
+  </data>
+  <data name="&gt;&gt;chkW2DFillColor.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;chkW2DFillColor.Parent" xml:space="preserve">
+    <value>grpW2DStyle</value>
+  </data>
+  <data name="&gt;&gt;chkW2DFillColor.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="cmbW2DFillColor.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Left, Right</value>
+  </data>
+  <data name="cmbW2DFillColor.Enabled" type="System.Boolean, mscorlib">
+    <value>False</value>
+  </data>
+  <data name="cmbW2DFillColor.Location" type="System.Drawing.Point, System.Drawing">
+    <value>124, 19</value>
+  </data>
+  <data name="cmbW2DFillColor.Size" type="System.Drawing.Size, System.Drawing">
+    <value>217, 21</value>
+  </data>
+  <data name="cmbW2DFillColor.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DFillColor.Name" xml:space="preserve">
+    <value>cmbW2DFillColor</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DFillColor.Type" xml:space="preserve">
+    <value>Maestro.Editors.Common.ColorComboWithTransparency, Maestro.Editors, Version=3.0.0.5708, Culture=neutral, PublicKeyToken=null</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DFillColor.Parent" xml:space="preserve">
+    <value>grpW2DStyle</value>
+  </data>
+  <data name="&gt;&gt;cmbW2DFillColor.ZOrder" xml:space="preserve">
+    <value>5</value>
+  </data>
+  <data name="grpW2DStyle.Location" type="System.Drawing.Point, System.Drawing">
+    <value>0, 434</value>
+  </data>
+  <data name="grpW2DStyle.Size" type="System.Drawing.Size, System.Drawing">
+    <value>344, 100</value>
+  </data>
+  <data name="grpW2DStyle.TabIndex" type="System.Int32, mscorlib">
+    <value>11</value>
+  </data>
+  <data name="grpW2DStyle.Text" xml:space="preserve">
+    <value>Override W2D Symbol Colors (Note: Not reflected in preview)</value>
+  </data>
+  <data name="&gt;&gt;grpW2DStyle.Name" xml:space="preserve">
+    <value>grpW2DStyle</value>
+  </data>
+  <data name="&gt;&gt;grpW2DStyle.Type" xml:space="preserve">
+    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;grpW2DStyle.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;grpW2DStyle.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>
@@ -1177,7 +1369,7 @@
     <value>344, 824</value>
   </data>
   <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
-    <value>344, 824</value>
+    <value>344, 921</value>
   </data>
   <data name="&gt;&gt;RotationTable.Name" xml:space="preserve">
     <value>RotationTable</value>

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -34,6 +34,8 @@
         private IEditorService _edsvc;
         private IVectorLayerDefinition _vl;
 
+        internal IEditorService EditorService { get { return _edsvc; } }
+
         /// <summary>
         /// Sets the initial state of this editor and sets up any databinding
         /// within such that user interface changes will propagate back to the

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerFactory.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerFactory.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerFactory.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -323,5 +323,18 @@
                 VerticalAlignment = "'Baseline'"
             };
         }
+
+
+        public IW2DSymbol CreateDefaultW2DSymbol(string symbolLibrary, string symbolName)
+        {
+            return new W2DSymbolType()
+            {
+                W2DSymbol = new W2DSymbolTypeW2DSymbol()
+                {
+                    ResourceId = symbolLibrary,
+                    LibraryItemName = symbolName
+                },
+            };
+        }
     }
 }

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -322,6 +322,14 @@
         /// </summary>
         /// <returns></returns>
         IFontSymbol CreateDefaultFontSymbol();
+
+        /// <summary>
+        /// Creates a W2D symbol from a Symbol Library
+        /// </summary>
+        /// <param name="symbolLibrary"></param>
+        /// <param name="symbolName"></param>
+        /// <returns></returns>
+        IW2DSymbol CreateDefaultW2DSymbol(string symbolLibrary, string symbolName);
     }
 
     /// <summary>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs	2011-04-28 12:26:15 UTC (rev 5725)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs	2011-04-29 13:16:41 UTC (rev 5726)
@@ -1343,32 +1343,6 @@
     partial class W2DSymbolTypeW2DSymbol : ISymbolReference
     {
         [XmlIgnore]
-        string ISymbolReference.ResourceId
-        {
-            get
-            {
-                return this.ResourceId == null ? string.Empty : this.ResourceId.ToString();
-            }
-            set
-            {
-                this.ResourceId = value;
-            }
-        }
-
-        [XmlIgnore]
-        string ISymbolReference.LibraryItemName
-        {
-            get
-            {
-                return this.LibraryItemName == null ? string.Empty : this.LibraryItemName.ToString();
-            }
-            set
-            {
-                this.LibraryItemName = value;
-            }
-        }
-
-        [XmlIgnore]
         ImageSymbolReferenceType IBaseImageSymbol.Type
         {
             get { return ImageSymbolReferenceType.SymbolReference; }



More information about the mapguide-commits mailing list