[mapguide-commits] r5637 - in trunk/Tools/Maestro: Maestro.Editors Maestro.Editors/Common Maestro.Editors/FeatureSource/Providers/Wms Maestro.Editors/Properties OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/Schema OSGeo.MapGuide.MaestroAPI/SchemaOverrides

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Mar 17 12:23:41 EDT 2011


Author: jng
Date: 2011-03-17 09:23:41 -0700 (Thu, 17 Mar 2011)
New Revision: 5637

Added:
   trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.resx
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.resx
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.resx
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsLayerDefinition.cs
Modified:
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.resx
   trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/ConfigurationDocument.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsConfigurationDocument.cs
Log:
#738: More work on a specialized WMS feature source editor. This provides basic configuration functionality as described by http://trac.osgeo.org/fdo/wiki/FdoWmsNotes


Added: trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.Designer.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,87 @@
+namespace Maestro.Editors.Common
+{
+    partial class GenericInputDialog
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GenericInputDialog));
+            this.button1 = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
+            this.lblPrompt = new System.Windows.Forms.Label();
+            this.txtInput = new System.Windows.Forms.TextBox();
+            this.SuspendLayout();
+            // 
+            // button1
+            // 
+            resources.ApplyResources(this.button1, "button1");
+            this.button1.Name = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // button2
+            // 
+            resources.ApplyResources(this.button2, "button2");
+            this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.button2.Name = "button2";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // lblPrompt
+            // 
+            resources.ApplyResources(this.lblPrompt, "lblPrompt");
+            this.lblPrompt.Name = "lblPrompt";
+            // 
+            // txtInput
+            // 
+            resources.ApplyResources(this.txtInput, "txtInput");
+            this.txtInput.Name = "txtInput";
+            // 
+            // GenericInputDialog
+            // 
+            this.AcceptButton = this.button1;
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            this.CancelButton = this.button2;
+            resources.ApplyResources(this, "$this");
+            this.ControlBox = false;
+            this.Controls.Add(this.txtInput);
+            this.Controls.Add(this.lblPrompt);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.button1);
+            this.Name = "GenericInputDialog";
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Label lblPrompt;
+        private System.Windows.Forms.TextBox txtInput;
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/GenericInputDialog.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,68 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Maestro.Editors.Common
+{
+    public partial class GenericInputDialog : Form
+    {
+        public GenericInputDialog()
+        {
+            InitializeComponent();
+        }
+
+        public string InputValue { get { return txtInput.Text; } }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.OK;
+        }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+        }
+
+        public static string GetValue(string title, string prompt, string initialValue)
+        {
+            using (var diag = new GenericInputDialog())
+            {
+                if (!string.IsNullOrEmpty(title))
+                    diag.Text = title;
+
+                if (!string.IsNullOrEmpty(prompt))
+                    diag.lblPrompt.Text = prompt;
+
+                if (!string.IsNullOrEmpty(initialValue))
+                    diag.txtInput.Text = initialValue;
+
+                if (diag.ShowDialog() == DialogResult.OK)
+                    return diag.InputValue;
+            }
+            return null;
+        }
+    }
+}

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

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.Designer.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,243 @@
+namespace Maestro.Editors.FeatureSource.Providers.Wms
+{
+    partial class RasterDefinitionCtrl
+    {
+        /// <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()
+        {
+            this.btnSelectEpsg = new System.Windows.Forms.Button();
+            this.txtEpsg = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.txtElevation = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.txtTime = new System.Windows.Forms.TextBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.chkTransparent = new System.Windows.Forms.CheckBox();
+            this.txtImageFormat = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.lnkUpdate = new System.Windows.Forms.LinkLabel();
+            this.txtLayers = new System.Windows.Forms.TextBox();
+            this.cmbBackground = new Maestro.Editors.Common.ColorComboBox();
+            this.groupBox1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // btnSelectEpsg
+            // 
+            this.btnSelectEpsg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnSelectEpsg.Location = new System.Drawing.Point(239, 134);
+            this.btnSelectEpsg.Name = "btnSelectEpsg";
+            this.btnSelectEpsg.Size = new System.Drawing.Size(24, 23);
+            this.btnSelectEpsg.TabIndex = 23;
+            this.btnSelectEpsg.Text = "...";
+            this.btnSelectEpsg.UseVisualStyleBackColor = true;
+            this.btnSelectEpsg.Click += new System.EventHandler(this.btnSelectEpsg_Click);
+            // 
+            // txtEpsg
+            // 
+            this.txtEpsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtEpsg.Location = new System.Drawing.Point(108, 136);
+            this.txtEpsg.Name = "txtEpsg";
+            this.txtEpsg.Size = new System.Drawing.Size(125, 20);
+            this.txtEpsg.TabIndex = 22;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(5, 139);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(64, 13);
+            this.label6.TabIndex = 21;
+            this.label6.Text = "EPSG Code";
+            // 
+            // txtElevation
+            // 
+            this.txtElevation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtElevation.Location = new System.Drawing.Point(108, 110);
+            this.txtElevation.Name = "txtElevation";
+            this.txtElevation.Size = new System.Drawing.Size(155, 20);
+            this.txtElevation.TabIndex = 20;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(5, 113);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(51, 13);
+            this.label5.TabIndex = 19;
+            this.label5.Text = "Elevation";
+            // 
+            // txtTime
+            // 
+            this.txtTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtTime.Location = new System.Drawing.Point(108, 84);
+            this.txtTime.Name = "txtTime";
+            this.txtTime.Size = new System.Drawing.Size(155, 20);
+            this.txtTime.TabIndex = 18;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(5, 87);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(30, 13);
+            this.label4.TabIndex = 17;
+            this.label4.Text = "Time";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(5, 60);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(92, 13);
+            this.label3.TabIndex = 15;
+            this.label3.Text = "Background Color";
+            // 
+            // chkTransparent
+            // 
+            this.chkTransparent.AutoSize = true;
+            this.chkTransparent.Location = new System.Drawing.Point(108, 29);
+            this.chkTransparent.Name = "chkTransparent";
+            this.chkTransparent.Size = new System.Drawing.Size(83, 17);
+            this.chkTransparent.TabIndex = 14;
+            this.chkTransparent.Text = "Transparent";
+            this.chkTransparent.UseVisualStyleBackColor = true;
+            // 
+            // txtImageFormat
+            // 
+            this.txtImageFormat.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtImageFormat.Location = new System.Drawing.Point(108, 3);
+            this.txtImageFormat.Name = "txtImageFormat";
+            this.txtImageFormat.Size = new System.Drawing.Size(155, 20);
+            this.txtImageFormat.TabIndex = 13;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(5, 6);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(71, 13);
+            this.label2.TabIndex = 12;
+            this.label2.Text = "Image Format";
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox1.Controls.Add(this.lnkUpdate);
+            this.groupBox1.Controls.Add(this.txtLayers);
+            this.groupBox1.Location = new System.Drawing.Point(8, 172);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(255, 106);
+            this.groupBox1.TabIndex = 24;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "Layers (one line per layer name)";
+            // 
+            // lnkUpdate
+            // 
+            this.lnkUpdate.AutoSize = true;
+            this.lnkUpdate.Enabled = false;
+            this.lnkUpdate.Location = new System.Drawing.Point(170, 0);
+            this.lnkUpdate.Name = "lnkUpdate";
+            this.lnkUpdate.Size = new System.Drawing.Size(42, 13);
+            this.lnkUpdate.TabIndex = 1;
+            this.lnkUpdate.TabStop = true;
+            this.lnkUpdate.Text = "Update";
+            this.lnkUpdate.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkUpdate_LinkClicked);
+            // 
+            // txtLayers
+            // 
+            this.txtLayers.AcceptsReturn = true;
+            this.txtLayers.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.txtLayers.Location = new System.Drawing.Point(3, 16);
+            this.txtLayers.Multiline = true;
+            this.txtLayers.Name = "txtLayers";
+            this.txtLayers.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+            this.txtLayers.Size = new System.Drawing.Size(249, 87);
+            this.txtLayers.TabIndex = 0;
+            this.txtLayers.TextChanged += new System.EventHandler(this.txtLayers_TextChanged);
+            // 
+            // cmbBackground
+            // 
+            this.cmbBackground.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.cmbBackground.FormattingEnabled = true;
+            this.cmbBackground.Location = new System.Drawing.Point(108, 57);
+            this.cmbBackground.Name = "cmbBackground";
+            this.cmbBackground.Size = new System.Drawing.Size(155, 21);
+            this.cmbBackground.TabIndex = 16;
+            // 
+            // RasterDefinitionCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.btnSelectEpsg);
+            this.Controls.Add(this.txtEpsg);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.txtElevation);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.txtTime);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.cmbBackground);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.chkTransparent);
+            this.Controls.Add(this.txtImageFormat);
+            this.Controls.Add(this.label2);
+            this.Name = "RasterDefinitionCtrl";
+            this.Size = new System.Drawing.Size(269, 290);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnSelectEpsg;
+        private System.Windows.Forms.TextBox txtEpsg;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.TextBox txtElevation;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox txtTime;
+        private System.Windows.Forms.Label label4;
+        private Maestro.Editors.Common.ColorComboBox cmbBackground;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.CheckBox chkTransparent;
+        private System.Windows.Forms.TextBox txtImageFormat;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.TextBox txtLayers;
+        private System.Windows.Forms.LinkLabel lnkUpdate;
+    }
+}

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,107 @@
+#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.MaestroAPI.SchemaOverrides;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+
+namespace Maestro.Editors.FeatureSource.Providers.Wms
+{
+    public partial class RasterDefinitionCtrl : UserControl
+    {
+        private RasterWmsItem _item;
+        private IEditorService _edsvc;
+        private IFeatureSource _fs;
+
+        public RasterDefinitionCtrl(RasterWmsItem item, IEditorService edsvc)
+        {
+            InitializeComponent();
+            cmbBackground.ResetColors();
+
+            _fs = (IFeatureSource)edsvc.GetEditedResource();
+            _item = item;
+            _edsvc = edsvc;
+
+            txtImageFormat.Text = item.ImageFormat;
+            chkTransparent.Checked = item.IsTransparent;
+            cmbBackground.CurrentColor = item.BackgroundColor;
+            txtElevation.Text = item.ElevationDimension;
+            txtEpsg.Text = item.SpatialContextName;
+            txtTime.Text = item.Time;
+
+            txtImageFormat.TextChanged += (s, e) => { item.ImageFormat = txtImageFormat.Text; };
+            chkTransparent.CheckedChanged += (s, e) => { item.IsTransparent = chkTransparent.Checked; };
+            cmbBackground.SelectedIndexChanged += (s, e) => { item.BackgroundColor = cmbBackground.CurrentColor; };
+            txtElevation.TextChanged += (s, e) => { item.ElevationDimension = txtElevation.Text; };
+            txtEpsg.TextChanged += (s, e) => { item.SpatialContextName = txtEpsg.Text; };
+            txtTime.TextChanged += (s, e) => { item.Time = txtTime.Text; };
+
+            List<string> names = new List<string>();
+            foreach (var layer in item.Layers)
+            {
+                names.Add(layer.Name);
+            }
+            txtLayers.Lines = names.ToArray();
+            lnkUpdate.Enabled = false;
+        }
+
+        private void lnkUpdate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        {
+            _item.RemoveAllLayers();
+            foreach (var line in txtLayers.Lines)
+            {
+                if (!string.IsNullOrEmpty(line) && line.Trim().Length > 0)
+                {
+                    _item.AddLayer(new WmsLayerDefinition(line.Trim()));
+                }
+            }
+            MessageBox.Show(Properties.Resources.WmsLayersUpdated);
+            lnkUpdate.Enabled = false;
+        }
+
+        private void txtLayers_TextChanged(object sender, EventArgs e)
+        {
+            lnkUpdate.Enabled = true;
+        }
+
+        private void btnSelectEpsg_Click(object sender, EventArgs e)
+        {
+            var conn = _fs.CurrentConnection;
+            string cswkt = _edsvc.GetCoordinateSystem();
+            if (!string.IsNullOrEmpty(cswkt))
+            {
+                //We want epsg form
+                try
+                {
+                    txtEpsg.Text = "EPSG:" + conn.CoordinateSystemCatalog.ConvertWktToEpsgCode(cswkt);
+                }
+                catch (Exception ex)
+                {
+                    MessageBox.Show(ex.Message, Properties.Resources.TitleError);
+                }
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/RasterDefinitionCtrl.resx	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,120 @@
+<?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>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.Designer.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,150 @@
+namespace Maestro.Editors.FeatureSource.Providers.Wms
+{
+    partial class WmsAdvancedConfigurationDialog
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WmsAdvancedConfigurationDialog));
+            this.label1 = new System.Windows.Forms.Label();
+            this.txtFeatureServer = new System.Windows.Forms.TextBox();
+            this.grpRaster = new System.Windows.Forms.GroupBox();
+            this.btnSave = new System.Windows.Forms.Button();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.lstFeatureClasses = new System.Windows.Forms.ListBox();
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.btnAdd = new System.Windows.Forms.ToolStripButton();
+            this.btnRemove = new System.Windows.Forms.ToolStripButton();
+            this.groupBox2.SuspendLayout();
+            this.toolStrip1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            resources.ApplyResources(this.label1, "label1");
+            this.label1.Name = "label1";
+            // 
+            // txtFeatureServer
+            // 
+            resources.ApplyResources(this.txtFeatureServer, "txtFeatureServer");
+            this.txtFeatureServer.Name = "txtFeatureServer";
+            this.txtFeatureServer.ReadOnly = true;
+            // 
+            // grpRaster
+            // 
+            resources.ApplyResources(this.grpRaster, "grpRaster");
+            this.grpRaster.Name = "grpRaster";
+            this.grpRaster.TabStop = false;
+            // 
+            // btnSave
+            // 
+            resources.ApplyResources(this.btnSave, "btnSave");
+            this.btnSave.Name = "btnSave";
+            this.btnSave.UseVisualStyleBackColor = true;
+            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+            // 
+            // btnCancel
+            // 
+            resources.ApplyResources(this.btnCancel, "btnCancel");
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.UseVisualStyleBackColor = true;
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.lstFeatureClasses);
+            this.groupBox2.Controls.Add(this.toolStrip1);
+            resources.ApplyResources(this.groupBox2, "groupBox2");
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.TabStop = false;
+            // 
+            // lstFeatureClasses
+            // 
+            this.lstFeatureClasses.DisplayMember = "FeatureClass";
+            resources.ApplyResources(this.lstFeatureClasses, "lstFeatureClasses");
+            this.lstFeatureClasses.FormattingEnabled = true;
+            this.lstFeatureClasses.Name = "lstFeatureClasses";
+            this.lstFeatureClasses.SelectedIndexChanged += new System.EventHandler(this.lstFeatureClasses_SelectedIndexChanged);
+            // 
+            // toolStrip1
+            // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.btnAdd,
+            this.btnRemove});
+            resources.ApplyResources(this.toolStrip1, "toolStrip1");
+            this.toolStrip1.Name = "toolStrip1";
+            // 
+            // btnAdd
+            // 
+            this.btnAdd.Image = global::Maestro.Editors.Properties.Resources.plus_circle;
+            resources.ApplyResources(this.btnAdd, "btnAdd");
+            this.btnAdd.Name = "btnAdd";
+            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+            // 
+            // btnRemove
+            // 
+            resources.ApplyResources(this.btnRemove, "btnRemove");
+            this.btnRemove.Image = global::Maestro.Editors.Properties.Resources.cross;
+            this.btnRemove.Name = "btnRemove";
+            this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
+            // 
+            // WmsAdvancedConfigurationDialog
+            // 
+            this.AcceptButton = this.btnSave;
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            resources.ApplyResources(this, "$this");
+            this.ControlBox = false;
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.grpRaster);
+            this.Controls.Add(this.txtFeatureServer);
+            this.Controls.Add(this.label1);
+            this.Name = "WmsAdvancedConfigurationDialog";
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox txtFeatureServer;
+        private System.Windows.Forms.GroupBox grpRaster;
+        private System.Windows.Forms.Button btnSave;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.ListBox lstFeatureClasses;
+        private System.Windows.Forms.ToolStrip toolStrip1;
+        private System.Windows.Forms.ToolStripButton btnAdd;
+        private System.Windows.Forms.ToolStripButton btnRemove;
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,175 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.MaestroAPI.SchemaOverrides;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+using OSGeo.MapGuide.MaestroAPI.Schema;
+using Maestro.Editors.Common;
+
+namespace Maestro.Editors.FeatureSource.Providers.Wms
+{
+    public partial class WmsAdvancedConfigurationDialog : Form
+    {
+        private IEditorService _service;
+        private WmsConfigurationDocument _config;
+        private IFeatureSource _fs;
+
+        public WmsConfigurationDocument Document { get { return _config; } }
+        private BindingList<RasterWmsItem> _items;
+
+        public WmsAdvancedConfigurationDialog(IEditorService service)
+        {
+            InitializeComponent();
+            _items = new BindingList<RasterWmsItem>();
+            _service = service;
+            _fs = (IFeatureSource)_service.GetEditedResource();
+            txtFeatureServer.Text = _fs.GetConnectionProperty("FeatureServer");
+            string xml = _fs.GetConfigurationContent();
+            if (!string.IsNullOrEmpty(xml))
+            {
+                try
+                {
+                    _config = (WmsConfigurationDocument)ConfigurationDocument.LoadXml(xml);
+                }
+                catch (Exception ex)
+                {
+                    MessageBox.Show(string.Format(Properties.Resources.ErrorLoadingWmsConfig, ex.Message), Properties.Resources.TitleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    _config = BuildDefaultWmsDocument();
+                }
+            }
+            else
+            {
+                _config = BuildDefaultWmsDocument();
+            }
+
+            _items = new BindingList<RasterWmsItem>(new List<RasterWmsItem>(_config.RasterOverrides));
+            lstFeatureClasses.DataSource = _items;
+        }
+
+        private WmsConfigurationDocument BuildDefaultWmsDocument()
+        {
+            var doc = new WmsConfigurationDocument();
+            var schemaName = _fs.GetSchemaNames()[0];
+            doc.AddSchema(new FeatureSchema(schemaName, ""));
+            /*
+            foreach (var cls in desc.AllClasses)
+            {
+                var raster = GetRasterProperty(cls);
+                if (raster != null)
+                {
+                    var item = CreateDefaultItem(cls, raster);
+
+                    doc.AddRasterItem(item);
+                }
+            }*/
+            return doc;
+        }
+
+        private static RasterWmsItem CreateDefaultItem(ClassDefinition cls, RasterPropertyDefinition raster)
+        {
+            var item = new RasterWmsItem(cls.Name, raster.Name);
+            item.ImageFormat = "PNG";
+            item.IsTransparent = true;
+            item.BackgroundColor = Color.White;
+            item.SpatialContextName = "EPSG:4326";
+            return item;
+        }
+
+        private static RasterPropertyDefinition GetRasterProperty(ClassDefinition cls)
+        {
+            foreach (var prop in cls.Properties)
+            {
+                if (prop.Type == PropertyDefinitionType.Raster)
+                    return (RasterPropertyDefinition)prop;
+            }
+            return null;
+        }
+
+        private void btnSave_Click(object sender, EventArgs e)
+        {
+            _fs.SetConfigurationContent(_config.ToXml());
+            this.DialogResult = DialogResult.OK;
+        }
+
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+        }
+
+        private void lstFeatureClasses_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            var item = (RasterWmsItem)lstFeatureClasses.SelectedItem;
+            grpRaster.Controls.Clear();
+
+            var ctrl = new RasterDefinitionCtrl(item, _service);
+            ctrl.Dock = DockStyle.Fill;
+            grpRaster.Controls.Add(ctrl);
+
+            btnRemove.Enabled = true;
+        }
+
+        private void btnRemove_Click(object sender, EventArgs e)
+        {
+            var item = (RasterWmsItem)lstFeatureClasses.SelectedItem;
+            _items.Remove(item);
+            
+            //Remove schema mapping item
+            _config.RemoveRasterItem(item);
+
+            //Remove mapped class from logical schema
+            var schema = _config.Schemas[0];
+            schema.RemoveClass(item.FeatureClass);
+        }
+
+        private void btnAdd_Click(object sender, EventArgs e)
+        {
+            var name = GenericInputDialog.GetValue(Properties.Resources.TitleNewFeatureClass, Properties.Resources.PromptName, null);
+            var schema = _config.Schemas[0];
+
+            var cls = new ClassDefinition(name, "");
+            cls.AddProperty(new DataPropertyDefinition("Id", "")
+            {
+                DataType = DataPropertyType.String,
+                Length = 256,
+                IsNullable = false
+            }, true);
+
+            var rp = new RasterPropertyDefinition("Image", "")
+            {
+                DefaultImageXSize = 800,
+                DefaultImageYSize = 800
+            };
+            cls.AddProperty(rp);
+
+            schema.AddClass(cls);
+
+            var item = CreateDefaultItem(cls, rp);
+            _config.AddRasterItem(item);
+
+            _items.Add(item);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsAdvancedConfigurationDialog.resx	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,378 @@
+<?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>21, 16</value>
+  </data>
+  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>77, 13</value>
+  </data>
+  <data name="label1.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="label1.Text" xml:space="preserve">
+    <value>Feature Server</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>5</value>
+  </data>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="txtFeatureServer.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Left, Right</value>
+  </data>
+  <data name="txtFeatureServer.Location" type="System.Drawing.Point, System.Drawing">
+    <value>113, 13</value>
+  </data>
+  <data name="txtFeatureServer.Size" type="System.Drawing.Size, System.Drawing">
+    <value>493, 20</value>
+  </data>
+  <data name="txtFeatureServer.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="&gt;&gt;txtFeatureServer.Name" xml:space="preserve">
+    <value>txtFeatureServer</value>
+  </data>
+  <data name="&gt;&gt;txtFeatureServer.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;txtFeatureServer.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;txtFeatureServer.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="grpRaster.Location" type="System.Drawing.Point, System.Drawing">
+    <value>294, 53</value>
+  </data>
+  <data name="grpRaster.Size" type="System.Drawing.Size, System.Drawing">
+    <value>312, 275</value>
+  </data>
+  <data name="grpRaster.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="grpRaster.Text" xml:space="preserve">
+    <value>Raster Definition</value>
+  </data>
+  <data name="&gt;&gt;grpRaster.Name" xml:space="preserve">
+    <value>grpRaster</value>
+  </data>
+  <data name="&gt;&gt;grpRaster.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;grpRaster.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;grpRaster.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="btnSave.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <data name="btnSave.Location" type="System.Drawing.Point, System.Drawing">
+    <value>450, 345</value>
+  </data>
+  <data name="btnSave.Size" type="System.Drawing.Size, System.Drawing">
+    <value>75, 23</value>
+  </data>
+  <data name="btnSave.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="btnSave.Text" xml:space="preserve">
+    <value>Save</value>
+  </data>
+  <data name="&gt;&gt;btnSave.Name" xml:space="preserve">
+    <value>btnSave</value>
+  </data>
+  <data name="&gt;&gt;btnSave.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;btnSave.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;btnSave.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="btnCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <data name="btnCancel.Location" type="System.Drawing.Point, System.Drawing">
+    <value>531, 345</value>
+  </data>
+  <data name="btnCancel.Size" type="System.Drawing.Size, System.Drawing">
+    <value>75, 23</value>
+  </data>
+  <data name="btnCancel.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="btnCancel.Text" xml:space="preserve">
+    <value>Cancel</value>
+  </data>
+  <data name="&gt;&gt;btnCancel.Name" xml:space="preserve">
+    <value>btnCancel</value>
+  </data>
+  <data name="&gt;&gt;btnCancel.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;btnCancel.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;btnCancel.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="lstFeatureClasses.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Fill</value>
+  </data>
+  <data name="lstFeatureClasses.Location" type="System.Drawing.Point, System.Drawing">
+    <value>3, 41</value>
+  </data>
+  <data name="lstFeatureClasses.Size" type="System.Drawing.Size, System.Drawing">
+    <value>270, 225</value>
+  </data>
+  <data name="lstFeatureClasses.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="&gt;&gt;lstFeatureClasses.Name" xml:space="preserve">
+    <value>lstFeatureClasses</value>
+  </data>
+  <data name="&gt;&gt;lstFeatureClasses.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;lstFeatureClasses.Parent" xml:space="preserve">
+    <value>groupBox2</value>
+  </data>
+  <data name="&gt;&gt;lstFeatureClasses.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">
+    <value>17, 17</value>
+  </metadata>
+  <data name="btnAdd.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
+    <value>Magenta</value>
+  </data>
+  <data name="btnAdd.Size" type="System.Drawing.Size, System.Drawing">
+    <value>49, 22</value>
+  </data>
+  <data name="btnAdd.Text" xml:space="preserve">
+    <value>Add</value>
+  </data>
+  <data name="btnRemove.Enabled" type="System.Boolean, mscorlib">
+    <value>False</value>
+  </data>
+  <data name="btnRemove.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
+    <value>Magenta</value>
+  </data>
+  <data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
+    <value>70, 22</value>
+  </data>
+  <data name="btnRemove.Text" xml:space="preserve">
+    <value>Remove</value>
+  </data>
+  <data name="toolStrip1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>3, 16</value>
+  </data>
+  <data name="toolStrip1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>270, 25</value>
+  </data>
+  <data name="toolStrip1.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="toolStrip1.Text" xml:space="preserve">
+    <value>toolStrip1</value>
+  </data>
+  <data name="&gt;&gt;toolStrip1.Name" xml:space="preserve">
+    <value>toolStrip1</value>
+  </data>
+  <data name="&gt;&gt;toolStrip1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;toolStrip1.Parent" xml:space="preserve">
+    <value>groupBox2</value>
+  </data>
+  <data name="&gt;&gt;toolStrip1.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
+    <value>12, 53</value>
+  </data>
+  <data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
+    <value>276, 275</value>
+  </data>
+  <data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
+  </data>
+  <data name="groupBox2.Text" xml:space="preserve">
+    <value>Feature Classes</value>
+  </data>
+  <data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
+    <value>groupBox2</value>
+  </data>
+  <data name="&gt;&gt;groupBox2.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">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
+    <value>618, 380</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>WMS Advanced Configuration</value>
+  </data>
+  <data name="&gt;&gt;btnAdd.Name" xml:space="preserve">
+    <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>
+  </data>
+  <data name="&gt;&gt;btnRemove.Name" xml:space="preserve">
+    <value>btnRemove</value>
+  </data>
+  <data name="&gt;&gt;btnRemove.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>WmsAdvancedConfigurationDialog</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+</root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.Designer.cs	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.Designer.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -109,10 +109,10 @@
             // 
             // WmsProviderCtrl
             // 
-            resources.ApplyResources(this, "$this");
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
             this.HeaderText = "WMS Feature Source";
             this.Name = "WmsProviderCtrl";
+            resources.ApplyResources(this, "$this");
             this.contentPanel.ResumeLayout(false);
             this.contentPanel.PerformLayout();
             this.ResumeLayout(false);

Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.cs	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -39,26 +39,45 @@
 
         private IEditorService _service;
         private IFeatureSource _fs;
+        private bool _init = false;
 
         public override void Bind(IEditorService service)
         {
-            _service = service;
-            _service.RegisterCustomNotifier(this);
-            _fs = (IFeatureSource)_service.GetEditedResource();
+            _init = true;
+            try
+            {
+                _service = service;
+                _service.RegisterCustomNotifier(this);
+                _fs = (IFeatureSource)_service.GetEditedResource();
+
+                txtFeatureServer.Text = _fs.GetConnectionProperty("FeatureServer");
+                txtUsername.Text = _fs.GetConnectionProperty("Username");
+                txtPassword.Text = _fs.GetConnectionProperty("Password");
+            }
+            finally
+            {
+                _init = false;
+            }
         }
 
         private void txtFeatureServer_TextChanged(object sender, EventArgs e)
         {
+            if (_init)
+                return;
             _fs.SetConnectionProperty("FeatureServer", txtFeatureServer.Text);
         }
 
         private void txtUsername_TextChanged(object sender, EventArgs e)
         {
+            if (_init)
+                return;
             _fs.SetConnectionProperty("Username", txtUsername.Text);
         }
 
         private void txtPassword_TextChanged(object sender, EventArgs e)
         {
+            if (_init)
+                return;
             _fs.SetConnectionProperty("Password", txtPassword.Text);
         }
 
@@ -73,7 +92,13 @@
 
         private void btnAdvanced_Click(object sender, EventArgs e)
         {
-
+            _service.SyncSessionCopy();
+            var diag = new WmsAdvancedConfigurationDialog(_service);
+            if (diag.ShowDialog() == DialogResult.OK)
+            {
+                _fs.SetConfigurationContent(diag.Document.ToXml());
+                OnResourceChanged();
+            }
         }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.resx	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Wms/WmsProviderCtrl.resx	2011-03-17 16:23:41 UTC (rev 5637)
@@ -378,9 +378,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>586, 192</value>
   </data>

Modified: trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2011-03-17 16:23:41 UTC (rev 5637)
@@ -74,6 +74,12 @@
     <Compile Include="Common\ExpressionEditor.designer.cs">
       <DependentUpon>ExpressionEditor.cs</DependentUpon>
     </Compile>
+    <Compile Include="Common\GenericInputDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Common\GenericInputDialog.Designer.cs">
+      <DependentUpon>GenericInputDialog.cs</DependentUpon>
+    </Compile>
     <Compile Include="Common\ImageStylePicker.cs">
       <SubType>Component</SubType>
     </Compile>
@@ -335,6 +341,18 @@
     <Compile Include="FeatureSource\Providers\SQLite\SQLiteFileCtrl.Designer.cs">
       <DependentUpon>SQLiteFileCtrl.cs</DependentUpon>
     </Compile>
+    <Compile Include="FeatureSource\Providers\Wms\RasterDefinitionCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Wms\RasterDefinitionCtrl.Designer.cs">
+      <DependentUpon>RasterDefinitionCtrl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Wms\WmsAdvancedConfigurationDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Wms\WmsAdvancedConfigurationDialog.Designer.cs">
+      <DependentUpon>WmsAdvancedConfigurationDialog.cs</DependentUpon>
+    </Compile>
     <Compile Include="FeatureSource\Providers\Wms\WmsProviderCtrl.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -934,6 +952,9 @@
       <DependentUpon>ExpressionEditor.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="Common\GenericInputDialog.resx">
+      <DependentUpon>GenericInputDialog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Common\ImageStylePicker.resx">
       <DependentUpon>ImageStylePicker.cs</DependentUpon>
     </EmbeddedResource>
@@ -1081,6 +1102,12 @@
     <EmbeddedResource Include="FeatureSource\Providers\SQLite\SQLiteFileCtrl.resx">
       <DependentUpon>SQLiteFileCtrl.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSource\Providers\Wms\RasterDefinitionCtrl.resx">
+      <DependentUpon>RasterDefinitionCtrl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSource\Providers\Wms\WmsAdvancedConfigurationDialog.resx">
+      <DependentUpon>WmsAdvancedConfigurationDialog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FeatureSource\Providers\Wms\WmsProviderCtrl.resx">
       <DependentUpon>WmsProviderCtrl.cs</DependentUpon>
     </EmbeddedResource>

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.Designer.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -531,6 +531,15 @@
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Error loading WMS configuration document: {0}. A default document will be created.
+        /// </summary>
+        internal static string ErrorLoadingWmsConfig {
+            get {
+                return ResourceManager.GetString("ErrorLoadingWmsConfig", resourceCulture);
+            }
+        }
+        
         internal static System.Drawing.Bitmap exclamation {
             get {
                 object obj = ResourceManager.GetObject("exclamation", resourceCulture);
@@ -2086,6 +2095,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to Enter the name.
+        /// </summary>
+        internal static string PromptName {
+            get {
+                return ResourceManager.GetString("PromptName", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Could not find possible values for enumerable property.
         /// </summary>
         internal static string PropEnumNoValues {
@@ -2470,6 +2488,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to New Feature Class.
+        /// </summary>
+        internal static string TitleNewFeatureClass {
+            get {
+                return ResourceManager.GetString("TitleNewFeatureClass", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to The selected column contains more than {0} different values, and thus cannot be used for theming with individual values.
         /// </summary>
         internal static string TooManyIndiviualValuesError {
@@ -2628,6 +2655,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to WMS layers updated.
+        /// </summary>
+        internal static string WmsLayersUpdated {
+            get {
+                return ResourceManager.GetString("WmsLayersUpdated", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Document is valid.
         /// </summary>
         internal static string XmlDocIsValid {

Modified: trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/Maestro.Editors/Properties/Resources.resx	2011-03-17 16:23:41 UTC (rev 5637)
@@ -1142,4 +1142,16 @@
   <data name="UnmanagedBrowserMultiSelectionNotAllowed" xml:space="preserve">
     <value>Multiple selection is not allowed when SelectFoldersOnly is set to true</value>
   </data>
+  <data name="ErrorLoadingWmsConfig" xml:space="preserve">
+    <value>Error loading WMS configuration document: {0}. A default document will be created</value>
+  </data>
+  <data name="WmsLayersUpdated" xml:space="preserve">
+    <value>WMS layers updated</value>
+  </data>
+  <data name="PromptName" xml:space="preserve">
+    <value>Enter the name</value>
+  </data>
+  <data name="TitleNewFeatureClass" xml:space="preserve">
+    <value>New Feature Class</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2011-03-17 16:23:41 UTC (rev 5637)
@@ -213,6 +213,7 @@
     <Compile Include="SchemaOverrides\GdalRasterItem.cs" />
     <Compile Include="SchemaOverrides\OdbcTableItem.cs" />
     <Compile Include="SchemaOverrides\WmsConfigurationDocument.cs" />
+    <Compile Include="SchemaOverrides\WmsLayerDefinition.cs" />
     <Compile Include="Schema\ClassDefinition.cs" />
     <Compile Include="Schema\DataPropertyDefinition.cs" />
     <Compile Include="Schema\FeatureSchema.cs" />
@@ -309,9 +310,6 @@
     <Compile Include="SchemaOverrides\ConfigurationDocument.cs" />
     <Compile Include="SchemaOverrides\GenericConfigurationDocument.cs" />
     <Compile Include="SchemaOverrides\OdbcConfigurationDocument.cs" />
-    <Compile Include="SchemaOverrides\RasterConfigurationDocument.cs" />
-    <Compile Include="SchemaOverrides\RasterFileItem.cs" />
-    <Compile Include="SchemaOverrides\RasterItem.cs" />
     <Compile Include="SchemaOverrides\RasterWmsItem.cs" />
     <Compile Include="Schema\XmlNamespaces.cs" />
     <Compile Include="Serialization\Enums.cs" />

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/FeatureSchema.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -156,5 +156,12 @@
                 }
             }
         }
+
+        public void RemoveClass(string className)
+        {
+            var cls = GetClass(className);
+            if (cls != null)
+                RemoveClass(cls);
+        }
     }
 }

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/ConfigurationDocument.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/ConfigurationDocument.cs	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/ConfigurationDocument.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -38,6 +38,10 @@
             _schemas = new List<FeatureSchema>();
         }
 
+        public IFdoSpatialContext[] SpatialContexts { get { return _spatialContexts.ToArray(); } }
+
+        public FeatureSchema[] Schemas { get { return _schemas.ToArray(); } }
+
         public void AddSpatialContext(IFdoSpatialContext context) { _spatialContexts.Add(context); }
 
         public void RemoveSpatialContext(IFdoSpatialContext context) { _spatialContexts.Remove(context); }

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -23,29 +23,147 @@
 using OSGeo.MapGuide.ObjectModels.Common;
 using OSGeo.MapGuide.ObjectModels;
 using System.Drawing;
+using OSGeo.MapGuide.MaestroAPI.Schema;
+using System.Xml;
 
 namespace OSGeo.MapGuide.MaestroAPI.SchemaOverrides
 {
-    public class RasterWmsItem : RasterItem
+    public class RasterWmsItem : IFdoSerializable
     {
-        public RasterWmsItem(string name) { this.Name = name; }
+        public class WmsImageFormat
+        {
+            public const string PNG = "PNG";
+            public const string TIF = "TIF";
+            public const string JPG = "JPG";
+            public const string GIF = "GIF";
+        }
 
-        public int ImageFormat { get; set; }
+        internal RasterWmsItem() { }
 
-        public string WmsStyle { get; set; }
+        public RasterWmsItem(string className, string rasterPropertyName)
+        {
+            this.FeatureClass = className;
+            this.RasterPropertyName = rasterPropertyName;
+        }
 
+        public string FeatureClass { get; set; }
+
+        public string RasterPropertyName { get; set; }
+
+        public string ElevationDimension { get; set; }
+
+        public string ImageFormat { get; set; }
+
+        private List<WmsLayerDefinition> _layers = new List<WmsLayerDefinition>();
+
+        public WmsLayerDefinition[] Layers { get { return _layers.ToArray(); } }
+
+        public void AddLayer(WmsLayerDefinition layer) { _layers.Add(layer); }
+
+        public void RemoveLayer(WmsLayerDefinition layer) { _layers.Remove(layer); }
+
+        public string Time { get; set; }
+
+        public string SpatialContextName { get; set; }
+
         public bool IsTransparent { get; set; }
 
         public Color BackgroundColor { get; set; }
 
-        public override void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
+        public void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
         {
-            throw new NotImplementedException();
+            var rasterDef = doc.CreateElement("RasterDefinition");
+            var n = doc.CreateAttribute("name");
+            n.Value = this.RasterPropertyName;
+            rasterDef.Attributes.Append(n);
+            {
+                var format = doc.CreateElement("Format");
+                format.InnerText = this.ImageFormat;
+
+                var transparent = doc.CreateElement("Transparent");
+                transparent.InnerText = this.IsTransparent ? "true" : "false";
+
+                var bgcolor = doc.CreateElement("BackgroundColor");
+                bgcolor.InnerText = "0x" + Utility.SerializeHTMLColor(this.BackgroundColor, false);
+
+                var time = doc.CreateElement("Time");
+                time.InnerText = this.Time;
+
+                var elevation = doc.CreateElement("Elevation");
+                elevation.InnerText = this.ElevationDimension;
+
+                var sc = doc.CreateElement("SpatialContext");
+                sc.InnerText = this.SpatialContextName;
+
+                rasterDef.AppendChild(format);
+                rasterDef.AppendChild(transparent);
+                rasterDef.AppendChild(bgcolor);
+                rasterDef.AppendChild(time);
+                rasterDef.AppendChild(elevation);
+                rasterDef.AppendChild(sc);
+
+                foreach (var layer in this.Layers)
+                {
+                    layer.WriteXml(doc, rasterDef);
+                }
+            };
+
+            currentNode.AppendChild(rasterDef);
         }
 
-        public override void ReadXml(System.Xml.XmlNode node, System.Xml.XmlNamespaceManager mgr)
+        public void ReadXml(System.Xml.XmlNode node, System.Xml.XmlNamespaceManager mgr)
         {
-            throw new NotImplementedException();
+            if (node.Name != "RasterDefinition")
+                throw new Exception("Bad document. Expected element: RasterDefinition");
+
+            var fc = node.ParentNode.Attributes["name"].Value;
+            this.FeatureClass = fc.Substring(0, fc.Length - "Type".Length);
+
+            var format = node["Format"];
+            var transparent = node["Transparent"];
+            var bgcolor = node["BackgroundColor"];
+            var time = node["Time"];
+            var elevation = node["Elevation"];
+            var sc = node["SpatialContext"];
+
+            if (format != null)
+                this.ImageFormat = format.InnerText;
+
+            if (transparent != null)
+                this.IsTransparent = (transparent.InnerText.ToLower() == "true");
+
+            if (bgcolor != null)
+            {
+                if (bgcolor.InnerText.StartsWith("0x"))
+                    this.BackgroundColor = ColorTranslator.FromHtml("#" + bgcolor.InnerText.Substring(2));
+                else
+                    this.BackgroundColor = ColorTranslator.FromHtml("#" + bgcolor.InnerText);
+            }
+
+            if (time != null)
+                this.Time = time.InnerText;
+
+            if (elevation != null)
+                this.ElevationDimension = elevation.InnerText;
+
+            if (sc != null)
+                this.SpatialContextName = sc.InnerText;
+
+            foreach (XmlNode ln in node.ChildNodes)
+            {
+                if (ln.Name == "Layer")
+                {
+                    var layer = new WmsLayerDefinition();
+                    layer.ReadXml(ln, mgr);
+
+                    this.AddLayer(layer);
+                }
+            }
         }
+
+        public void RemoveAllLayers()
+        {
+            _layers.Clear();
+        }
     }
 }

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsConfigurationDocument.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsConfigurationDocument.cs	2011-03-17 13:16:05 UTC (rev 5636)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsConfigurationDocument.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -24,11 +24,36 @@
 
 namespace OSGeo.MapGuide.MaestroAPI.SchemaOverrides
 {
-    public class WmsConfigurationDocument : RasterConfigurationDocumentBase<RasterWmsItem>
+    public class WmsConfigurationDocument : ConfigurationDocument
     {
+        private List<RasterWmsItem> _rasterItems = new List<RasterWmsItem>();
+
+        public RasterWmsItem[] RasterOverrides { get { return _rasterItems.ToArray(); } }
+
+        public void AddRasterItem(RasterWmsItem item) { _rasterItems.Add(item); }
+
+        public void RemoveRasterItem(RasterWmsItem item) { _rasterItems.Remove(item); }
+
         protected override void WriteSchemaMappings(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
         {
-            throw new NotImplementedException();
+            var map = doc.CreateElement("SchemaMapping");
+            map.SetAttribute("provider", "OSGeo.WMS.3.2");
+            map.SetAttribute("xmlns", "http://fdowms.osgeo.org/schemas");
+            map.SetAttribute("name", base._schemas[0].Name);
+            {
+                foreach(var ritem in _rasterItems)
+                {
+                    var ctype = doc.CreateElement("complexType");
+                    var ctypeName = doc.CreateAttribute("name");
+                    ctypeName.Value = ritem.FeatureClass + "Type";
+                    ctype.Attributes.Append(ctypeName);
+                    {
+                        ritem.WriteXml(doc, ctype);
+                    }
+                    map.AppendChild(ctype);
+                }
+            }
+            currentNode.AppendChild(map);
         }
 
         protected override void ReadSchemaMappings(System.Xml.XmlNode node, System.Xml.XmlNamespaceManager mgr)
@@ -57,24 +82,14 @@
                     if (cn == null)
                         throw new Exception("Bad document. Expected attribute: name"); //LOCALIZEME
 
-                    string className = sn.Value + ":" + cn.Value.Substring(0, cn.Value.Length - "Type".Length);
-
-                    var rdf = clsMap.SelectSingleNode("RasterDefinition");
-                    if (rdf == null)
+                    var rdf = clsMap.FirstChild;
+                    if (rdf == null || rdf.Name != "RasterDefinition")
                         throw new Exception("Bad document. Expected element: RasterDefinition"); //LOCALIZEME
 
-                    var rdfName = rdf.Attributes["name"];
-                    if (rdfName == null)
-                        throw new Exception("Bad document. Expected attribute: name"); //LOCALIZEME
+                    RasterWmsItem item = new RasterWmsItem();
+                    item.ReadXml(rdf, mgr);
 
-                    RasterItem item = new RasterWmsItem(rdfName.Value);
-
-                    if (item == null)
-                        throw new Exception("Bad document. Provider " + prv.Value + " is not supported for this configuration document"); //LOCALIZEME
-
-                    item.Parent = this;
-
-                    item.ReadXml(clsMap, mgr);
+                    this.AddRasterItem(item);
                 }
             }
         }

Added: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsLayerDefinition.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsLayerDefinition.cs	                        (rev 0)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/WmsLayerDefinition.cs	2011-03-17 16:23:41 UTC (rev 5637)
@@ -0,0 +1,57 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.MaestroAPI.Schema;
+
+namespace OSGeo.MapGuide.MaestroAPI.SchemaOverrides
+{
+    public class WmsLayerDefinition : IFdoSerializable
+    {
+        public WmsLayerDefinition() { }
+
+        public WmsLayerDefinition(string layerName) { this.Name = layerName; }
+
+        public string Name { get; set; }
+
+        public void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
+        {
+            var layer = doc.CreateElement("Layer");
+            var n = doc.CreateAttribute("name");
+            n.Value = this.Name;
+            layer.Attributes.Append(n);
+            layer.AppendChild(doc.CreateElement("Style"));
+            currentNode.AppendChild(layer);
+        }
+
+        public void ReadXml(System.Xml.XmlNode node, System.Xml.XmlNamespaceManager mgr)
+        {
+            if (node.Name != "Layer")
+                throw new Exception("Bad document. Expected element: Layer");
+
+            var n = node.Attributes["name"];
+            if (n == null)
+                throw new Exception("Bad document. Expected attribute: name");
+
+            this.Name = n.Value;
+        }
+    }
+}



More information about the mapguide-commits mailing list