[mapguide-commits] r5294 - in sandbox/maestro-3.0: . ExtendedModels/LayerDefinition-1.1.0 ExtendedModels/LayerDefinition-1.2.0 ExtendedModels/LayerDefinition-1.3.0 ExtendedModels/LoadProcedure-1.1.0 ExtendedModels/LoadProcedure-2.2.0 ExtendedModels/SymbolDefinition-1.1.0 ExtendedModels/WebLayout-1.1.0 Generated Maestro Maestro.AddIn.ExtendedObjectModels Maestro.AddIn.ExtendedObjectModels/Editor Maestro.AddIn.ExtendedObjectModels/Properties Maestro.AddIn.ExtendedObjectModels/Resources Maestro.AddIn.ExtendedObjectModels/Templates Maestro.Base/Commands Maestro.Base/Editor Maestro.Base/Properties Maestro.Base/Services Maestro.Base/Templates Maestro.Base/UI Maestro.Editors/WebLayout Maestro.Editors/WebLayout/Commands Maestro.ResourceValidation Maestro.ResourceValidation/Properties MaestroAPITests OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/ObjectModels OSGeo.MapGuide.MaestroAPI/Properties OSGeo.MapGuide.MaestroAPI/Resource

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Oct 19 02:23:47 EDT 2010


Author: jng
Date: 2010-10-18 23:23:47 -0700 (Mon, 18 Oct 2010)
New Revision: 5294

Added:
   sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/LoadProcedureValidator.cs
   sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/LoadProcedureValidator.cs
   sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayout2Impl.cs
   sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutValidator.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Editor/
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Editor/EditorFactories.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Manifest.addin
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/AssemblyInfo.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/application-browser.png
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/database-share.png
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/document.png
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/images-stack.png
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/layer.png
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/map.png
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/SQLiteLoadProcedureItemTemplate.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer110ItemTemplate.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer120ItemTemplate.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer130ItemTemplate.cs
   sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/WebLayout110ItemTemplate.cs
   sandbox/maestro-3.0/Maestro/resource-readme.txt
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayoutInterfaces.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLoadProcedureValidator.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseWebLayoutValidator.cs
Removed:
   sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutType.cs
   sandbox/maestro-3.0/Maestro.AddIn.LayerDefinition-1.1.0/
   sandbox/maestro-3.0/Maestro.AddIn.LayerDefinition-1.2.0/
   sandbox/maestro-3.0/Maestro.AddIn.LayerDefinition-1.3.0/
Modified:
   sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.csproj
   sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.2.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.csproj
   sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.3.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.csproj
   sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.csproj
   sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.csproj
   sandbox/maestro-3.0/ExtendedModels/SymbolDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.csproj
   sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.csproj
   sandbox/maestro-3.0/Generated/WebLayout-1.0.0.designer.cs
   sandbox/maestro-3.0/Generated/WebLayout-1.1.0.designer.cs
   sandbox/maestro-3.0/Maestro.Base/Commands/CreatePackageCommand.cs
   sandbox/maestro-3.0/Maestro.Base/Commands/NewItemCommand.cs
   sandbox/maestro-3.0/Maestro.Base/Editor/ResourcePreviewEngine.cs
   sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs
   sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx
   sandbox/maestro-3.0/Maestro.Base/Services/NewItemTemplateService.cs
   sandbox/maestro-3.0/Maestro.Base/Templates/ItemTemplate.cs
   sandbox/maestro-3.0/Maestro.Base/Templates/WebLayoutItemTemplate.cs
   sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs
   sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeScriptCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeURLCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/SearchCmdCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/CustomCommandPropertyCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/MenuEditorCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutCommandsCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutMenusCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs
   sandbox/maestro-3.0/Maestro.ResourceValidation/LoadProcedureValidator.cs
   sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.Designer.cs
   sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.resx
   sandbox/maestro-3.0/Maestro.ResourceValidation/WebLayoutValidator.cs
   sandbox/maestro-3.0/Maestro/Maestro.csproj
   sandbox/maestro-3.0/Maestro/Maestro.sln
   sandbox/maestro-3.0/MaestroAPITests/ResourceTests.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/LoadProcFactory.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayout.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLayerDefinitionValidator.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs
Log:
3.0 sandbox changes:
 - Modify ItemTemplate to include a MinimumSiteVersion property indicating the minimum MapGuide version supported by this template
 - Modify NewItemTemplateService to support different categories of templates and to return only matching supported templates based on the current connection's site version
 - Introduce interfaces to the WebLayout schema
 - Modify the existing Web Layout editor to target the WebLayout interfaces
 - Add v1.1.0 WebLayout support to the existing Web Layout editor
 - Move the load procedure and web layout validators back to the main library as there are multiple versions which will use the same common validation logic
 - Fix ResourceTypeRegistry using the wrong serializer for WebLayout resources, a separate check was required as WebLayouts do not have the version attribute (which other multi-version resources have)
 - Modify ObjectFactory to allow registration of custom Load Procedure and Web Layout factory methods
 - Added documentation about the changes between schema versions
 - Merge existing 1.1 - 1.3 layer definition addins into a single unified ExtendedObjectModels addin
   - Update addin to include item templates for:
      - Vector Layer Definition v1.1 to v1.3
      - SQLite Load Procedure (v2.2.0)
      - Web Layout v1.1.0
   - Use existing editors to edit these new resources. Because everything uses interfaces, these should work (albeit features in the newer version aren't exposed and/or supported yet)
   - Register serializers and factories for these extended resource versions, so these versions can be opened and created

Modified: sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.csproj
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -17,7 +17,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
+    <OutputPath>..\..\out\Debug\</OutputPath>
     <DefineConstants>TRACE;DEBUG;LDF_110</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -25,7 +25,7 @@
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\out\Release\</OutputPath>
     <DefineConstants>TRACE;LDF_110</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>

Modified: sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.2.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.csproj
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.2.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.2.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -17,7 +17,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
+    <OutputPath>..\..\out\Debug\</OutputPath>
     <DefineConstants>TRACE;DEBUG;LDF_120</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -25,7 +25,7 @@
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\out\Release\</OutputPath>
     <DefineConstants>TRACE;LDF_120</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>

Modified: sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.3.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.csproj
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.3.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/LayerDefinition-1.3.0/OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -17,7 +17,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
+    <OutputPath>..\..\out\Debug\</OutputPath>
     <DefineConstants>TRACE;DEBUG;LDF_130</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -25,7 +25,7 @@
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\out\Release\</OutputPath>
     <DefineConstants>TRACE;LDF_130</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>

Added: sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/LoadProcedureValidator.cs
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/LoadProcedureValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/LoadProcedureValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,34 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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.Resource;
+
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure_1_1_0
+{
+    public class LoadProcedureValidator : BaseLoadProcedureValidator
+    {
+        public override ResourceTypeDescriptor SupportedResourceAndVersion
+        {
+            get { return new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LoadProcedure, "1.1.0"); }
+        }
+    }
+}

Modified: sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.csproj
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/LoadProcedure-1.1.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -17,7 +17,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
+    <OutputPath>..\..\out\Debug\</OutputPath>
     <DefineConstants>TRACE;DEBUG;LP110</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -25,7 +25,7 @@
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\out\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -42,6 +42,10 @@
     <Compile Include="..\..\OSGeo.MapGuide.MaestroAPI\ObjectModels\LoadProcedure.cs">
       <Link>LoadProcedure.cs</Link>
     </Compile>
+    <Compile Include="..\..\OSGeo.MapGuide.MaestroAPI\ObjectModels\LoadProcFactory.cs">
+      <Link>LoadProcFactory.cs</Link>
+    </Compile>
+    <Compile Include="LoadProcedureValidator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>

Added: sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/LoadProcedureValidator.cs
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/LoadProcedureValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/LoadProcedureValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,34 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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.Resource;
+
+namespace OSGeo.MapGuide.ObjectModels.LoadProcedure_2_2_0
+{
+    public class LoadProcedureValidator : BaseLoadProcedureValidator
+    {
+        public override ResourceTypeDescriptor SupportedResourceAndVersion
+        {
+            get { return new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LoadProcedure, "2.2.0"); }
+        }
+    }
+}

Modified: sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.csproj
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/LoadProcedure-2.2.0/OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -17,7 +17,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
+    <OutputPath>..\..\out\Debug\</OutputPath>
     <DefineConstants>TRACE;DEBUG;LP220</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -25,7 +25,7 @@
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\out\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -42,6 +42,10 @@
     <Compile Include="..\..\OSGeo.MapGuide.MaestroAPI\ObjectModels\LoadProcedure.cs">
       <Link>LoadProcedure.cs</Link>
     </Compile>
+    <Compile Include="..\..\OSGeo.MapGuide.MaestroAPI\ObjectModels\LoadProcFactory.cs">
+      <Link>LoadProcFactory.cs</Link>
+    </Compile>
+    <Compile Include="LoadProcedureValidator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>

Modified: sandbox/maestro-3.0/ExtendedModels/SymbolDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.csproj
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/SymbolDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/SymbolDefinition-1.1.0/OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -17,7 +17,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
+    <OutputPath>..\..\out\Debug\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -25,7 +25,7 @@
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\out\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>

Modified: sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.csproj
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -17,15 +17,15 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <OutputPath>..\..\out\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;WL110</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\out\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -39,9 +39,19 @@
     <Compile Include="..\..\Generated\WebLayout-1.1.0.designer.cs">
       <Link>WebLayout-1.1.0.designer.cs</Link>
     </Compile>
+    <Compile Include="..\..\OSGeo.MapGuide.MaestroAPI\ObjectModels\WebLayout.cs">
+      <Link>WebLayout.cs</Link>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="WebLayoutType.cs" />
+    <Compile Include="WebLayout2Impl.cs" />
+    <Compile Include="WebLayoutValidator.cs" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\OSGeo.MapGuide.MaestroAPI\OSGeo.MapGuide.MaestroAPI.csproj">
+      <Project>{80FA3158-8B5F-48D1-A393-0378AFE48A7E}</Project>
+      <Name>OSGeo.MapGuide.MaestroAPI</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

Added: sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayout2Impl.cs
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayout2Impl.cs	                        (rev 0)
+++ sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayout2Impl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,42 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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.ObjectModels.WebLayout;
+
+namespace OSGeo.MapGuide.ObjectModels.WebLayout_1_1_0
+{
+    partial class WebLayoutType : IWebLayout2
+    {
+        bool IWebLayout2.EnablePingServer
+        {
+            get
+            {
+                return this.EnablePingServer;
+            }
+            set
+            {
+                this.EnablePingServer = value;
+                this.EnablePingServerSpecified = true;
+            }
+        }
+    }
+}

Deleted: sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutType.cs
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutType.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutType.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -1,29 +0,0 @@
-#region Disclaimer / License
-// Copyright (C) 2010, 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;
-
-namespace OSGeo.MapGuide.ObjectModels.WebLayout_1_1_0
-{
-    partial class WebLayoutType
-    {
-    }
-}

Copied: sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutValidator.cs (from rev 5293, sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutType.cs)
===================================================================
--- sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/ExtendedModels/WebLayout-1.1.0/WebLayoutValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,34 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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.Resource;
+
+namespace OSGeo.MapGuide.ObjectModels.WebLayout_1_1_0
+{
+    public class WebLayoutValidator : BaseWebLayoutValidator
+    {
+        public override ResourceTypeDescriptor SupportedResourceAndVersion
+        {
+            get { return new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.WebLayout, "1.1.0"); }
+        }
+    }
+}

Modified: sandbox/maestro-3.0/Generated/WebLayout-1.0.0.designer.cs
===================================================================
--- sandbox/maestro-3.0/Generated/WebLayout-1.0.0.designer.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Generated/WebLayout-1.0.0.designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -4,7 +4,7 @@
 //    <NameSpace>OSGeo.MapGuide.ObjectModels.WebLayout</NameSpace><Collection>BindingList</Collection><codeType>CSharp</codeType><EnableDataBinding>True</EnableDataBinding><EnableLasyLoading>False</EnableLasyLoading><HidePrivateFieldInIDE>True</HidePrivateFieldInIDE><EnableSummaryComment>True</EnableSummaryComment><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenerateCloneMethod>True</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net20</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><AutomaticProperties>False</AutomaticProperties><DisableDebug>False</DisableDebug><CustomUsings></CustomUsings><ExcludeIncludedTypes>False</ExcludeIncludedTypes><EnableInitialize
 Fields>False</EnableInitializeFields>
 //  </auto-generated>
 // ------------------------------------------------------------------------------
-namespace OSGeo.MapGuide.ObjectModels.WebLayout {
+namespace OSGeo.MapGuide.ObjectModels.WebLayout_1_0_0 {
     using System;
     using System.Diagnostics;
     using System.Xml.Serialization;
@@ -12,8 +12,8 @@
     using System.Xml.Schema;
     using System.ComponentModel;
     using System.IO;
+    using OSGeo.MapGuide.ObjectModels.WebLayout;
     
-    
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
     [System.SerializableAttribute()]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
@@ -1630,19 +1630,6 @@
         #endregion
     }
     
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
-    public enum TargetViewerType {
-        
-        /// <remarks/>
-        Dwf,
-        
-        /// <remarks/>
-        Ajax,
-        
-        /// <remarks/>
-        All,
-    }
     
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(InvokeScriptCommandType))]
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(PrintCommandType))]
@@ -2671,20 +2658,6 @@
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
     [System.SerializableAttribute()]
-    public enum TargetType {
-        
-        /// <remarks/>
-        TaskPane,
-        
-        /// <remarks/>
-        NewWindow,
-        
-        /// <remarks/>
-        SpecifiedFrame,
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
@@ -4535,74 +4508,6 @@
         #endregion
     }
     
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
-    public enum BasicCommandActionType {
-        
-        /// <remarks/>
-        Pan,
-        
-        /// <remarks/>
-        PanUp,
-        
-        /// <remarks/>
-        PanDown,
-        
-        /// <remarks/>
-        PanRight,
-        
-        /// <remarks/>
-        PanLeft,
-        
-        /// <remarks/>
-        Zoom,
-        
-        /// <remarks/>
-        ZoomIn,
-        
-        /// <remarks/>
-        ZoomOut,
-        
-        /// <remarks/>
-        ZoomRectangle,
-        
-        /// <remarks/>
-        ZoomToSelection,
-        
-        /// <remarks/>
-        FitToWindow,
-        
-        /// <remarks/>
-        PreviousView,
-        
-        /// <remarks/>
-        NextView,
-        
-        /// <remarks/>
-        RestoreView,
-        
-        /// <remarks/>
-        Select,
-        
-        /// <remarks/>
-        SelectRadius,
-        
-        /// <remarks/>
-        SelectPolygon,
-        
-        /// <remarks/>
-        ClearSelection,
-        
-        /// <remarks/>
-        Refresh,
-        
-        /// <remarks/>
-        CopyMap,
-        
-        /// <remarks/>
-        About,
-    }
-    
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(CommandItemType))]
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(SeparatorItemType))]
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(FlyoutItemType))]
@@ -4804,20 +4709,6 @@
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
     [System.SerializableAttribute()]
-    public enum UIItemFunctionType {
-        
-        /// <remarks/>
-        Separator,
-        
-        /// <remarks/>
-        Command,
-        
-        /// <remarks/>
-        Flyout,
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]

Modified: sandbox/maestro-3.0/Generated/WebLayout-1.1.0.designer.cs
===================================================================
--- sandbox/maestro-3.0/Generated/WebLayout-1.1.0.designer.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Generated/WebLayout-1.1.0.designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -12,8 +12,8 @@
     using System.Xml.Schema;
     using System.ComponentModel;
     using System.IO;
+    using OSGeo.MapGuide.ObjectModels.WebLayout;
     
-    
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
     [System.SerializableAttribute()]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
@@ -1661,20 +1661,6 @@
         #endregion
     }
     
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
-    public enum TargetViewerType {
-        
-        /// <remarks/>
-        Dwf,
-        
-        /// <remarks/>
-        Ajax,
-        
-        /// <remarks/>
-        All,
-    }
-    
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(InvokeScriptCommandType))]
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(PrintCommandType))]
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(TargetedCommandType))]
@@ -2702,20 +2688,6 @@
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
     [System.SerializableAttribute()]
-    public enum TargetType {
-        
-        /// <remarks/>
-        TaskPane,
-        
-        /// <remarks/>
-        NewWindow,
-        
-        /// <remarks/>
-        SpecifiedFrame,
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
@@ -4566,74 +4538,6 @@
         #endregion
     }
     
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
-    public enum BasicCommandActionType {
-        
-        /// <remarks/>
-        Pan,
-        
-        /// <remarks/>
-        PanUp,
-        
-        /// <remarks/>
-        PanDown,
-        
-        /// <remarks/>
-        PanRight,
-        
-        /// <remarks/>
-        PanLeft,
-        
-        /// <remarks/>
-        Zoom,
-        
-        /// <remarks/>
-        ZoomIn,
-        
-        /// <remarks/>
-        ZoomOut,
-        
-        /// <remarks/>
-        ZoomRectangle,
-        
-        /// <remarks/>
-        ZoomToSelection,
-        
-        /// <remarks/>
-        FitToWindow,
-        
-        /// <remarks/>
-        PreviousView,
-        
-        /// <remarks/>
-        NextView,
-        
-        /// <remarks/>
-        RestoreView,
-        
-        /// <remarks/>
-        Select,
-        
-        /// <remarks/>
-        SelectRadius,
-        
-        /// <remarks/>
-        SelectPolygon,
-        
-        /// <remarks/>
-        ClearSelection,
-        
-        /// <remarks/>
-        Refresh,
-        
-        /// <remarks/>
-        CopyMap,
-        
-        /// <remarks/>
-        About,
-    }
-    
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(CommandItemType))]
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(SeparatorItemType))]
     [System.Xml.Serialization.XmlIncludeAttribute(typeof(FlyoutItemType))]
@@ -4835,20 +4739,6 @@
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
     [System.SerializableAttribute()]
-    public enum UIItemFunctionType {
-        
-        /// <remarks/>
-        Separator,
-        
-        /// <remarks/>
-        Command,
-        
-        /// <remarks/>
-        Flyout,
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
-    [System.SerializableAttribute()]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]

Modified: sandbox/maestro-3.0/Maestro/Maestro.csproj
===================================================================
--- sandbox/maestro-3.0/Maestro/Maestro.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro/Maestro.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -79,6 +79,7 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
     <Content Include="MapGuide Maestro.ico" />
+    <Content Include="resource-readme.txt" />
     <Content Include="WebStudio\areas\Acad_iso02w100.png">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

Modified: sandbox/maestro-3.0/Maestro/Maestro.sln
===================================================================
--- sandbox/maestro-3.0/Maestro/Maestro.sln	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro/Maestro.sln	2010-10-19 06:23:47 UTC (rev 5294)
@@ -44,16 +44,12 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0", "..\ExtendedModels\WebLayout-1.1.0\OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.csproj", "{0A93ACA8-5B21-44E6-B0B7-5D1E72D3A6A2}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.AddIn.LayerDefinition-1.1.0", "..\Maestro.AddIn.LayerDefinition-1.1.0\Maestro.AddIn.LayerDefinition-1.1.0.csproj", "{CA7F688E-70A3-4FCB-BFB0-7E752B4A8DFC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.AddIn.LayerDefinition-1.2.0", "..\Maestro.AddIn.LayerDefinition-1.2.0\Maestro.AddIn.LayerDefinition-1.2.0.csproj", "{1E489B7F-1BA1-4B1A-BC69-CE82EF2F5C5B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.AddIn.LayerDefinition-1.3.0", "..\Maestro.AddIn.LayerDefinition-1.3.0\Maestro.AddIn.LayerDefinition-1.3.0.csproj", "{A49487F7-FCDD-4818-8C7E-2CADABA51B06}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.Packaging", "..\Maestro.Packaging\Maestro.Packaging.csproj", "{0EA33E36-9C33-4D60-B378-B87FADAA0F40}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaestroFsPreview", "..\MaestroFsPreview\MaestroFsPreview.csproj", "{59BE5E18-17B6-431D-836E-C0AABA6D69E8}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.AddIn.ExtendedObjectModels", "..\Maestro.AddIn.ExtendedObjectModels\Maestro.AddIn.ExtendedObjectModels.csproj", "{32BA7DF6-1AFA-441D-9231-5624C5920706}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -140,18 +136,6 @@
 		{0A93ACA8-5B21-44E6-B0B7-5D1E72D3A6A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{0A93ACA8-5B21-44E6-B0B7-5D1E72D3A6A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{0A93ACA8-5B21-44E6-B0B7-5D1E72D3A6A2}.Release|Any CPU.Build.0 = Release|Any CPU
-		{CA7F688E-70A3-4FCB-BFB0-7E752B4A8DFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{CA7F688E-70A3-4FCB-BFB0-7E752B4A8DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{CA7F688E-70A3-4FCB-BFB0-7E752B4A8DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{CA7F688E-70A3-4FCB-BFB0-7E752B4A8DFC}.Release|Any CPU.Build.0 = Release|Any CPU
-		{1E489B7F-1BA1-4B1A-BC69-CE82EF2F5C5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{1E489B7F-1BA1-4B1A-BC69-CE82EF2F5C5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{1E489B7F-1BA1-4B1A-BC69-CE82EF2F5C5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{1E489B7F-1BA1-4B1A-BC69-CE82EF2F5C5B}.Release|Any CPU.Build.0 = Release|Any CPU
-		{A49487F7-FCDD-4818-8C7E-2CADABA51B06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{A49487F7-FCDD-4818-8C7E-2CADABA51B06}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{A49487F7-FCDD-4818-8C7E-2CADABA51B06}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{A49487F7-FCDD-4818-8C7E-2CADABA51B06}.Release|Any CPU.Build.0 = Release|Any CPU
 		{0EA33E36-9C33-4D60-B378-B87FADAA0F40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{0EA33E36-9C33-4D60-B378-B87FADAA0F40}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{0EA33E36-9C33-4D60-B378-B87FADAA0F40}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -160,6 +144,10 @@
 		{59BE5E18-17B6-431D-836E-C0AABA6D69E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{59BE5E18-17B6-431D-836E-C0AABA6D69E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{59BE5E18-17B6-431D-836E-C0AABA6D69E8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{32BA7DF6-1AFA-441D-9231-5624C5920706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{32BA7DF6-1AFA-441D-9231-5624C5920706}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{32BA7DF6-1AFA-441D-9231-5624C5920706}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{32BA7DF6-1AFA-441D-9231-5624C5920706}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Added: sandbox/maestro-3.0/Maestro/resource-readme.txt
===================================================================
--- sandbox/maestro-3.0/Maestro/resource-readme.txt	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro/resource-readme.txt	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,70 @@
+Resource Schema Changelog:
+--------------------------
+
+Layer Definition
+----------------
+
+All changes relate to vector layers only. As such, creating drawing or raster layers in Maestro
+will always use the v1.0.0 schema
+
+v1.1.0
+------
+
+Introduced: MapGuide Open Source 1.2 / MapGuide Enterprise 2008
+
+ - Support for Advanced Symbolization (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc14)
+ - Support for KML extrusion (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc16)
+ - Support for Map-space line widths (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc17)
+ 
+v1.2.0
+------
+
+Introduced: MapGuide Open Source 2.0 / MapGuide Enterprise 2009
+ 
+ - Support for extra Advanced Stylization options (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc29)
+ 
+v1.3.0
+------
+
+Introduced: MapGuide Open Source 2.1 / MapGuide Enterprise 2010
+ 
+ - Support for disabling certain geometry styles from appearing in the legend (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc50)
+ 
+
+Symbol Definition
+-----------------
+
+v1.1.0
+------
+
+Introduced: MapGuide Open Source 2.0 / MapGuide Enterprise 2009
+
+ - Support for edit controls and rich text (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc31)
+
+Web Layout
+----------
+
+v1.1.0
+------
+
+Introduced: MapGuide Open Source 2.2 / MapGuide Enterprise 2011
+
+ - New ping server option (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc66)
+ 
+Load Procedure
+--------------
+
+v1.1.0
+------
+
+Introduced: MapGuide Open Source 2.0 / MapGuide Enterprise 2009
+ 
+ - DWG-specific changes not relevant to Maestro (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc27)
+ - As this version introduces changes not relevant to Maestro, there is no way to create Load Procedures of this version as it is not necessary
+ 
+v2.2.0
+------
+
+Introduced: MapGuide Open Source 2.2 / MapGuide Enterprise 2011
+
+ - New SQLite load procedure type (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc85)
\ No newline at end of file


Property changes on: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels
___________________________________________________________________
Added: svn:ignore
   + obj
bin


Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Editor/EditorFactories.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Editor/EditorFactories.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Editor/EditorFactories.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,122 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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 Maestro.Base.Editor;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Editor
+{
+    internal class WebLayout110EditorFactory : IEditorFactory
+    {
+        public ResourceTypeDescriptor ResourceTypeAndVersion { get; private set; }
+
+        public WebLayout110EditorFactory()
+        {
+            this.ResourceTypeAndVersion = new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.WebLayout, "1.1.0");
+        }
+
+        public IEditorViewContent Create()
+        {
+            return new WebLayoutEditor();
+        }
+    }
+
+    internal class LayerDefinition110EditorFactory : IEditorFactory
+    {
+        public ResourceTypeDescriptor ResourceTypeAndVersion { get; private set; }
+
+        public LayerDefinition110EditorFactory()
+        {
+            this.ResourceTypeAndVersion = new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LayerDefinition, "1.1.0");
+        }
+
+        public IEditorViewContent Create()
+        {
+            //Use the same 1.0.0 editor for now
+            return new LayerDefinitionEditor();
+        }
+    }
+
+    internal class LayerDefinition120EditorFactory : IEditorFactory
+    {
+        public ResourceTypeDescriptor ResourceTypeAndVersion { get; private set; }
+
+        public LayerDefinition120EditorFactory()
+        {
+            this.ResourceTypeAndVersion = new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LayerDefinition, "1.2.0");
+        }
+
+        public IEditorViewContent Create()
+        {
+            //Use the same 1.0.0 editor for now
+            return new LayerDefinitionEditor(); 
+        }
+    }
+
+    internal class LayerDefinition130EditorFactory : IEditorFactory
+    {
+        public ResourceTypeDescriptor ResourceTypeAndVersion { get; private set; }
+
+        public LayerDefinition130EditorFactory()
+        {
+            this.ResourceTypeAndVersion = new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LayerDefinition, "1.3.0");
+        }
+
+        public IEditorViewContent Create()
+        {
+            //Use the same 1.0.0 editor for now
+            return new LayerDefinitionEditor();
+        }
+    }
+
+    internal class LoadProcedure110EditorFactory : IEditorFactory
+    {
+        public ResourceTypeDescriptor ResourceTypeAndVersion { get; private set; }
+
+        public LoadProcedure110EditorFactory()
+        {
+            this.ResourceTypeAndVersion = new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LoadProcedure, "1.1.0");
+        }
+
+        public IEditorViewContent Create()
+        {
+            //We can use the same editor, nothing structurally changed
+            return new LoadProcedureEditor();
+        }
+    }
+
+    internal class LoadProcedure220EditorFactory : IEditorFactory
+    {
+        public ResourceTypeDescriptor ResourceTypeAndVersion { get; private set; }
+
+        public LoadProcedure220EditorFactory()
+        {
+            this.ResourceTypeAndVersion = new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LoadProcedure, "2.2.0");
+        }
+
+        public IEditorViewContent Create()
+        {
+            //We can use the same editor, nothing structurally changed
+            return new LoadProcedureEditor();
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{32BA7DF6-1AFA-441D-9231-5624C5920706}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Maestro.AddIn.ExtendedObjectModels</RootNamespace>
+    <AssemblyName>Maestro.AddIn.ExtendedObjectModels</AssemblyName>
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkSubset>
+    </TargetFrameworkSubset>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\out\Debug\AddIns\ExtendedObjectModels\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\out\Release\AddIns\ExtendedObjectModels\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Commands\StartupCommand.cs" />
+    <Compile Include="Editor\EditorFactories.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Templates\SQLiteLoadProcedureItemTemplate.cs" />
+    <Compile Include="Templates\VectorLayer130ItemTemplate.cs" />
+    <Compile Include="Templates\VectorLayer120ItemTemplate.cs" />
+    <Compile Include="Templates\VectorLayer110ItemTemplate.cs" />
+    <Compile Include="Templates\WebLayout110ItemTemplate.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Manifest.addin">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <None Include="Resources\application-browser.png" />
+    <None Include="Resources\map.png" />
+    <None Include="Resources\layer.png" />
+    <None Include="Resources\images-stack.png" />
+    <None Include="Resources\document.png" />
+    <None Include="Resources\database-share.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\ExtendedModels\LayerDefinition-1.1.0\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0.csproj">
+      <Project>{B5EA049C-6AB7-4686-A2F4-4BA2EAC0E585}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LayerDefinition-1.1.0</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LayerDefinition-1.2.0\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0.csproj">
+      <Project>{EDDB0F74-6FE7-4969-80B0-817A629722CD}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LayerDefinition-1.2.0</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LayerDefinition-1.3.0\OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0.csproj">
+      <Project>{AC5068F6-CFBE-4BCD-B68B-062725E424D4}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LayerDefinition-1.3.0</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LoadProcedure-1.1.0\OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0.csproj">
+      <Project>{B2A1F69E-52AA-42A2-8DED-89ADB9B14A38}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LoadProcedure-1.1.0</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\LoadProcedure-2.2.0\OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0.csproj">
+      <Project>{D525B343-66D6-4D6B-9A55-78A173D94A51}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.LoadProcedure-2.2.0</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\SymbolDefinition-1.1.0\OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0.csproj">
+      <Project>{BF6E996E-27AF-44CD-B3CF-A40874E15B2E}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.SymbolDefinition-1.1.0</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtendedModels\WebLayout-1.1.0\OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0.csproj">
+      <Project>{0A93ACA8-5B21-44E6-B0B7-5D1E72D3A6A2}</Project>
+      <Name>OSGeo.MapGuide.ObjectModels.WebLayout-1.1.0</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\Maestro.Base\Maestro.Base.csproj">
+      <Project>{F1E2F468-5030-4DBA-968C-9620284AFAA1}</Project>
+      <Name>Maestro.Base</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\Maestro.Editors\Maestro.Editors.csproj">
+      <Project>{5AD2CDBA-952E-4148-98A1-31D2E0D540D5}</Project>
+      <Name>Maestro.Editors</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\Maestro.Shared.UI\Maestro.Shared.UI.csproj">
+      <Project>{CFD19053-2172-41D3-8460-0FD2123A1E88}</Project>
+      <Name>Maestro.Shared.UI</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\OSGeo.MapGuide.MaestroAPI\OSGeo.MapGuide.MaestroAPI.csproj">
+      <Project>{80FA3158-8B5F-48D1-A393-0378AFE48A7E}</Project>
+      <Name>OSGeo.MapGuide.MaestroAPI</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\Thirdparty\SharpDevelop\ICSharpCode.Core\ICSharpCode.Core.csproj">
+      <Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
+      <Name>ICSharpCode.Core</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Manifest.addin
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Manifest.addin	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Manifest.addin	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,39 @@
+<AddIn name="Maestro.AddIn.ExtendedObjectModels"
+       author="Jackie Ng"
+       url="http://trac.osgeo.org/mapguide/wiki/maestro"
+       description="MapGuide Maestro AddIn to support extended versions of the core MapGuide resource schemas"
+       addInManagerHidden="preinstalled">
+
+    <Manifest>
+        <Identity name="Maestro.AddIn.ExtendedObjectModels" />
+    </Manifest>
+
+    <Runtime>
+        <Import assembly="../../Maestro.Base.dll" />
+        <Import assembly="Maestro.AddIn.ExtendedObjectModels.dll" />
+    </Runtime>
+
+    <!-- Registered editors -->
+    <Path name="/Maestro/Editors">
+        <Class id="LoadProcedureEditor110" class="Maestro.AddIn.ExtendedObjectModels.Editor.LoadProcedure110EditorFactory" />
+        <Class id="LoadProcedureEditor220" class="Maestro.AddIn.ExtendedObjectModels.Editor.LoadProcedure220EditorFactory" />
+        <Class id="LayerDefinitionEditor110" class="Maestro.AddIn.ExtendedObjectModels.Editor.LayerDefinition110EditorFactory" />
+        <Class id="LayerDefinitionEditor120" class="Maestro.AddIn.ExtendedObjectModels.Editor.LayerDefinition120EditorFactory" />
+        <Class id="LayerDefinitionEditor130" class="Maestro.AddIn.ExtendedObjectModels.Editor.LayerDefinition130EditorFactory" />
+        <Class id="WebLayoutEditor110" class="Maestro.AddIn.ExtendedObjectModels.Editor.WebLayout110EditorFactory" />
+    </Path>
+
+    <!-- Registered System Templates -->
+    <Path name="/Maestro/NewItemTemplates">
+        <Class id="VectorLayerDefinition110" class="Maestro.AddIn.ExtendedObjectModels.Templates.VectorLayer110ItemTemplate" />
+        <Class id="VectorLayerDefinition120" class="Maestro.AddIn.ExtendedObjectModels.Templates.VectorLayer120ItemTemplate" />
+        <Class id="VectorLayerDefinition130" class="Maestro.AddIn.ExtendedObjectModels.Templates.VectorLayer130ItemTemplate" />
+        <Class id="SQLiteLoadProcedure" class="Maestro.AddIn.ExtendedObjectModels.Templates.SQLiteLoadProcedureItemTemplate" />
+        <Class id="WebLayout110" class="Maestro.AddIn.ExtendedObjectModels.Templates.WebLayout110ItemTemplate" />
+    </Path>
+
+    <!-- Auto-start commands -->
+    <Path name="/Workspace/Autostart">
+        <Class id="Startup" class="Maestro.AddIn.ExtendedObjectModels.Commands.StartupCommand" />
+    </Path>
+</AddIn>

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/AssemblyInfo.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/AssemblyInfo.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/AssemblyInfo.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Maestro.AddIn.ExtendedObjectModels")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Maestro.AddIn.ExtendedObjectModels")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("34257625-dc58-45af-b117-c3a8bda007c8")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.Designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,240 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.4952
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Maestro.AddIn.ExtendedObjectModels.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Maestro.AddIn.ExtendedObjectModels.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        internal static System.Drawing.Bitmap application_browser {
+            get {
+                object obj = ResourceManager.GetObject("application_browser", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap database_share {
+            get {
+                object obj = ResourceManager.GetObject("database_share", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap document {
+            get {
+                object obj = ResourceManager.GetObject("document", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to SQLite Files|*.sqlite;*.db;*.slt;*.sdx.
+        /// </summary>
+        internal static string Filter_Sqlite_Files {
+            get {
+                return ResourceManager.GetString("Filter_Sqlite_Files", resourceCulture);
+            }
+        }
+        
+        internal static System.Drawing.Bitmap images_stack {
+            get {
+                object obj = ResourceManager.GetObject("images_stack", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap layer {
+            get {
+                object obj = ResourceManager.GetObject("layer", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap map {
+            get {
+                object obj = ResourceManager.GetObject("map", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to MapGuide Open Source 1.2 / MapGuide Enterprise 2008.
+        /// </summary>
+        internal static string TPL_CATEGORY_MGOS12 {
+            get {
+                return ResourceManager.GetString("TPL_CATEGORY_MGOS12", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to MapGuide Open Source 2.0.x / MapGuide Enterprise 2009.
+        /// </summary>
+        internal static string TPL_CATEGORY_MGOS20 {
+            get {
+                return ResourceManager.GetString("TPL_CATEGORY_MGOS20", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to MapGuide Open Source 2.1 / MapGuide Enterprise 2010.
+        /// </summary>
+        internal static string TPL_CATEGORY_MGOS21 {
+            get {
+                return ResourceManager.GetString("TPL_CATEGORY_MGOS21", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to MapGuide Open Source 2.2 / MapGuide Enterprise 2011.
+        /// </summary>
+        internal static string TPL_CATEGORY_MGOS22 {
+            get {
+                return ResourceManager.GetString("TPL_CATEGORY_MGOS22", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create a new SQLite Load Procedure.
+        /// </summary>
+        internal static string TPL_LP_SQLITE_DESC {
+            get {
+                return ResourceManager.GetString("TPL_LP_SQLITE_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to SQLite Load Procedure.
+        /// </summary>
+        internal static string TPL_LP_SQLITE_NAME {
+            get {
+                return ResourceManager.GetString("TPL_LP_SQLITE_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create a new Vector Layer Definition using the v1.1.0 schema.
+        /// </summary>
+        internal static string TPL_VLDF_110_DESC {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_110_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Vector Layer Definition (v1.1.0).
+        /// </summary>
+        internal static string TPL_VLDF_110_NAME {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_110_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create a new Vector Layer Definition using the v1.2.0 schema.
+        /// </summary>
+        internal static string TPL_VLDF_120_DESC {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_120_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Vector Layer Definition (v1.2.0).
+        /// </summary>
+        internal static string TPL_VLDF_120_NAME {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_120_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create a new Vector Layer Definition using the v1.3.0 schema.
+        /// </summary>
+        internal static string TPL_VLDF_130_DESC {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_130_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Vector Layer Definition (v1.3.0).
+        /// </summary>
+        internal static string TPL_VLDF_130_NAME {
+            get {
+                return ResourceManager.GetString("TPL_VLDF_130_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Create a new Web Layout using the v1.1.0 schema.
+        /// </summary>
+        internal static string TPL_WL_110_DESC {
+            get {
+                return ResourceManager.GetString("TPL_WL_110_DESC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Web Layout (v1.1.0).
+        /// </summary>
+        internal static string TPL_WL_110_NAME {
+            get {
+                return ResourceManager.GetString("TPL_WL_110_NAME", resourceCulture);
+            }
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Properties/Resources.resx	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,184 @@
+<?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="database_share" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\database-share.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="document" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\document.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="images_stack" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\images-stack.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="layer" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\layer.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="map" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\map.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="TPL_CATEGORY_MGOS12" xml:space="preserve">
+    <value>MapGuide Open Source 1.2 / MapGuide Enterprise 2008</value>
+  </data>
+  <data name="TPL_CATEGORY_MGOS20" xml:space="preserve">
+    <value>MapGuide Open Source 2.0.x / MapGuide Enterprise 2009</value>
+  </data>
+  <data name="TPL_CATEGORY_MGOS22" xml:space="preserve">
+    <value>MapGuide Open Source 2.2 / MapGuide Enterprise 2011</value>
+  </data>
+  <data name="TPL_LP_SQLITE_DESC" xml:space="preserve">
+    <value>Create a new SQLite Load Procedure</value>
+  </data>
+  <data name="TPL_LP_SQLITE_NAME" xml:space="preserve">
+    <value>SQLite Load Procedure</value>
+  </data>
+  <data name="TPL_VLDF_110_DESC" xml:space="preserve">
+    <value>Create a new Vector Layer Definition using the v1.1.0 schema</value>
+  </data>
+  <data name="TPL_VLDF_110_NAME" xml:space="preserve">
+    <value>Vector Layer Definition (v1.1.0)</value>
+  </data>
+  <data name="Filter_Sqlite_Files" xml:space="preserve">
+    <value>SQLite Files|*.sqlite;*.db;*.slt;*.sdx</value>
+  </data>
+  <data name="TPL_CATEGORY_MGOS21" xml:space="preserve">
+    <value>MapGuide Open Source 2.1 / MapGuide Enterprise 2010</value>
+  </data>
+  <data name="TPL_VLDF_120_DESC" xml:space="preserve">
+    <value>Create a new Vector Layer Definition using the v1.2.0 schema</value>
+  </data>
+  <data name="TPL_VLDF_130_DESC" xml:space="preserve">
+    <value>Create a new Vector Layer Definition using the v1.3.0 schema</value>
+  </data>
+  <data name="TPL_VLDF_120_NAME" xml:space="preserve">
+    <value>Vector Layer Definition (v1.2.0)</value>
+  </data>
+  <data name="TPL_VLDF_130_NAME" xml:space="preserve">
+    <value>Vector Layer Definition (v1.3.0)</value>
+  </data>
+  <data name="TPL_WL_110_DESC" xml:space="preserve">
+    <value>Create a new Web Layout using the v1.1.0 schema</value>
+  </data>
+  <data name="TPL_WL_110_NAME" xml:space="preserve">
+    <value>Web Layout (v1.1.0)</value>
+  </data>
+  <data name="application_browser" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\application-browser.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+</root>
\ No newline at end of file

Copied: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/application-browser.png (from rev 5293, sandbox/maestro-3.0/Maestro.Base/Resources/application-browser.png)
===================================================================
(Binary files differ)

Copied: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/database-share.png (from rev 5293, sandbox/maestro-3.0/Maestro.Base/Resources/database-share.png)
===================================================================
(Binary files differ)

Copied: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/document.png (from rev 5293, sandbox/maestro-3.0/Maestro.Base/Resources/document.png)
===================================================================
(Binary files differ)

Copied: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/images-stack.png (from rev 5293, sandbox/maestro-3.0/Maestro.Base/Resources/images-stack.png)
===================================================================
(Binary files differ)

Copied: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/layer.png (from rev 5293, sandbox/maestro-3.0/Maestro.Base/Resources/layer.png)
===================================================================
(Binary files differ)

Copied: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Resources/map.png (from rev 5293, sandbox/maestro-3.0/Maestro.Base/Resources/map.png)
===================================================================
(Binary files differ)

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/SQLiteLoadProcedureItemTemplate.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/SQLiteLoadProcedureItemTemplate.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/SQLiteLoadProcedureItemTemplate.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,68 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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 Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.MaestroAPI.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+using Maestro.Shared.UI;
+using OSGeo.MapGuide.ObjectModels.LoadProcedure;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class SQLiteLoadProcedureItemTemplate  : ItemTemplate
+    {
+        public SQLiteLoadProcedureItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS22;
+            //Icon = Res.document;
+            Description = Res.TPL_LP_SQLITE_DESC;
+            Name = Res.TPL_LP_SQLITE_NAME;
+            ResourceType = ResourceTypes.LoadProcedure.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 2);
+            }
+        }
+
+        public override IResource CreateItem(IServerConnection conn)
+        {
+            using (var dlg = DialogFactory.OpenFile())
+            {
+                dlg.Multiselect = true;
+                dlg.Filter = Properties.Resources.Filter_Sqlite_Files;
+                if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+                {
+                    return ObjectFactory.CreateLoadProcedure(conn, LoadType.Sqlite, dlg.FileNames);
+                }
+                return null;
+            }
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer110ItemTemplate.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer110ItemTemplate.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer110ItemTemplate.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,73 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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 Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.MaestroAPI.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class VectorLayer110ItemTemplate : ItemTemplate
+    {
+        public VectorLayer110ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS12;
+            Icon = Res.layer;
+            Description = Res.TPL_VLDF_110_DESC;
+            Name = Res.TPL_VLDF_110_NAME;
+            ResourceType = ResourceTypes.LayerDefinition.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(1, 2);
+            }
+        }
+
+        public override OSGeo.MapGuide.MaestroAPI.Resource.IResource CreateItem(OSGeo.MapGuide.MaestroAPI.IServerConnection conn)
+        {
+            using (var picker = new ResourcePicker(conn.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource))
+            {
+                if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+                {
+                    var lyr = ObjectFactory.CreateDefaultLayer(conn, OSGeo.MapGuide.ObjectModels.LayerDefinition.LayerType.Vector, new Version(1, 1, 0));
+                    var vl = (IVectorLayerDefinition)lyr.SubLayer;
+                    vl.ResourceId = picker.ResourceID;
+                    //Stub these for now, validation will ensure this never makes it
+                    //into the session repository until all validation errors pass
+                    vl.FeatureName = string.Empty;
+                    vl.Geometry = string.Empty;
+                    return lyr;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer120ItemTemplate.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer120ItemTemplate.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer120ItemTemplate.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,73 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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 Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.MaestroAPI.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class VectorLayer120ItemTemplate : ItemTemplate
+    {
+        public VectorLayer120ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS20;
+            Icon = Res.layer;
+            Description = Res.TPL_VLDF_120_DESC;
+            Name = Res.TPL_VLDF_120_NAME;
+            ResourceType = ResourceTypes.LayerDefinition.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 0);
+            }
+        }
+
+        public override OSGeo.MapGuide.MaestroAPI.Resource.IResource CreateItem(OSGeo.MapGuide.MaestroAPI.IServerConnection conn)
+        {
+            using (var picker = new ResourcePicker(conn.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource))
+            {
+                if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+                {
+                    var lyr = ObjectFactory.CreateDefaultLayer(conn, OSGeo.MapGuide.ObjectModels.LayerDefinition.LayerType.Vector, new Version(1, 2, 0));
+                    var vl = (IVectorLayerDefinition)lyr.SubLayer;
+                    vl.ResourceId = picker.ResourceID;
+                    //Stub these for now, validation will ensure this never makes it
+                    //into the session repository until all validation errors pass
+                    vl.FeatureName = string.Empty;
+                    vl.Geometry = string.Empty;
+                    return lyr;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer130ItemTemplate.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer130ItemTemplate.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/VectorLayer130ItemTemplate.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,73 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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 Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.MaestroAPI.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class VectorLayer130ItemTemplate : ItemTemplate
+    {
+        public VectorLayer130ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS21;
+            Icon = Res.layer;
+            Description = Res.TPL_VLDF_130_DESC;
+            Name = Res.TPL_VLDF_130_NAME;
+            ResourceType = ResourceTypes.LayerDefinition.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 1);
+            }
+        }
+
+        public override OSGeo.MapGuide.MaestroAPI.Resource.IResource CreateItem(OSGeo.MapGuide.MaestroAPI.IServerConnection conn)
+        {
+            using (var picker = new ResourcePicker(conn.ResourceService, ResourceTypes.FeatureSource, ResourcePickerMode.OpenResource))
+            {
+                if (picker.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+                {
+                    var lyr = ObjectFactory.CreateDefaultLayer(conn, OSGeo.MapGuide.ObjectModels.LayerDefinition.LayerType.Vector, new Version(1, 3, 0));
+                    var vl = (IVectorLayerDefinition)lyr.SubLayer;
+                    vl.ResourceId = picker.ResourceID;
+                    //Stub these for now, validation will ensure this never makes it
+                    //into the session repository until all validation errors pass
+                    vl.FeatureName = string.Empty;
+                    vl.Geometry = string.Empty;
+                    return lyr;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+        }
+    }
+}

Copied: sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/WebLayout110ItemTemplate.cs (from rev 5293, sandbox/maestro-3.0/Maestro.Base/Templates/WebLayoutItemTemplate.cs)
===================================================================
--- sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/WebLayout110ItemTemplate.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.AddIn.ExtendedObjectModels/Templates/WebLayout110ItemTemplate.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,58 @@
+#region Disclaimer / License
+// Copyright (C) 2010, 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 Maestro.Base.Templates;
+using Res = Maestro.AddIn.ExtendedObjectModels.Properties.Resources;
+using OSGeo.MapGuide.MaestroAPI;
+using Maestro.Editors.Generic;
+using OSGeo.MapGuide.MaestroAPI.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.LayerDefinition;
+using Maestro.Shared.UI;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+
+namespace Maestro.AddIn.ExtendedObjectModels.Templates
+{
+    internal class WebLayout110ItemTemplate : ItemTemplate
+    {
+        public WebLayout110ItemTemplate()
+        {
+            Category = Res.TPL_CATEGORY_MGOS22;
+            Icon = Res.application_browser;
+            Description = Res.TPL_WL_110_DESC;
+            Name = Res.TPL_WL_110_NAME;
+            ResourceType = ResourceTypes.WebLayout.ToString();
+        }
+
+        public override Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(2, 2);
+            }
+        }
+
+        public override IResource CreateItem(IServerConnection conn)
+        {
+            return ObjectFactory.CreateWebLayout(conn, new Version(1, 1, 0), string.Empty);
+        }
+    }
+}

Modified: sandbox/maestro-3.0/Maestro.Base/Commands/CreatePackageCommand.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/CreatePackageCommand.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/CreatePackageCommand.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -1,4 +1,23 @@
-using System;
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
 using System.Collections.Generic;
 using System.Text;
 using ICSharpCode.Core;

Modified: sandbox/maestro-3.0/Maestro.Base/Commands/NewItemCommand.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Commands/NewItemCommand.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Commands/NewItemCommand.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -44,11 +44,11 @@
             {
                 var item = exp.SelectedItems[0];
                 if (item.IsFolder)
-                    dlg = new NewResourceDialog(conn.ResourceService, nits, item.ResourceId);
+                    dlg = new NewResourceDialog(conn.ResourceService, conn.SiteVersion, nits, item.ResourceId);
             }
 
             if (dlg == null)
-                dlg = new NewResourceDialog(conn.ResourceService, nits);
+                dlg = new NewResourceDialog(conn.ResourceService, conn.SiteVersion, nits);
 
             if (dlg.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
             {

Modified: sandbox/maestro-3.0/Maestro.Base/Editor/ResourcePreviewEngine.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Editor/ResourcePreviewEngine.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Editor/ResourcePreviewEngine.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -78,7 +78,7 @@
             if (PropertyService.Get(ConfigProperties.PreviewViewerType, "AJAX").Equals("AJAX"))
             {
                 //Create temp web layout to house this map
-                var wl = ObjectFactory.CreateWebLayout(_edSvc.GetEditedResource().CurrentConnection, mdfId);
+                var wl = ObjectFactory.CreateWebLayout(_edSvc.GetEditedResource().CurrentConnection, new Version(1, 0, 0), mdfId);
                 var resId = "Session:" + sessionId + "//" + Guid.NewGuid() + ".WebLayout";
 
                 conn.ResourceService.SaveResourceAs(wl, resId);
@@ -115,7 +115,7 @@
             if (PropertyService.Get(ConfigProperties.PreviewViewerType, "AJAX").Equals("AJAX"))
             {
                 //Create temp web layout to house this map
-                var wl = ObjectFactory.CreateWebLayout(_edSvc.GetEditedResource().CurrentConnection, mdfId);
+                var wl = ObjectFactory.CreateWebLayout(_edSvc.GetEditedResource().CurrentConnection, new Version(1, 0, 0), mdfId);
                 var resId = "Session:" + sessionId + "//" + Guid.NewGuid() + ".WebLayout";
 
                 conn.ResourceService.SaveResourceAs(wl, resId);
@@ -144,7 +144,7 @@
 
             var sessionId = _edSvc.SessionID;
             var resId = "Session:" + sessionId + "//" + Guid.NewGuid() + ".WebLayout";
-            var wl = (WebLayoutType)res;
+            var wl = (IWebLayout)res;
             var conn = wl.CurrentConnection;
 
             conn.ResourceService.SaveResourceAs(wl, resId);

Modified: sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Properties/Resources.Designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -1483,7 +1483,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Create a new Raster Layer Definition.
+        ///   Looks up a localized string similar to Create a new Raster Layer Definition using the v1.0.0 schema.
         /// </summary>
         internal static string TPL_RLDF_DESC {
             get {
@@ -1492,7 +1492,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Raster Layer Definition.
+        ///   Looks up a localized string similar to Raster Layer Definition (v1.0.0).
         /// </summary>
         internal static string TPL_RLDF_NAME {
             get {
@@ -1528,7 +1528,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Create a new Vector Layer Definition.
+        ///   Looks up a localized string similar to Create a new Vector Layer Definition using the v1.0.0 schema.
         /// </summary>
         internal static string TPL_VLDF_DESC {
             get {
@@ -1537,7 +1537,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Vector Layer Definition.
+        ///   Looks up a localized string similar to Vector Layer Definition (v1.0.0).
         /// </summary>
         internal static string TPL_VLDF_NAME {
             get {
@@ -1546,7 +1546,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Create a new Web Layout.
+        ///   Looks up a localized string similar to Create a new Web Layout using the v1.0.0 schema.
         /// </summary>
         internal static string TPL_WL_DESC {
             get {
@@ -1555,7 +1555,7 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Web Layout.
+        ///   Looks up a localized string similar to Web Layout (v1.0.0).
         /// </summary>
         internal static string TPL_WL_NAME {
             get {

Modified: sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Properties/Resources.resx	2010-10-19 06:23:47 UTC (rev 5294)
@@ -419,10 +419,10 @@
     <value>Feature Source</value>
   </data>
   <data name="TPL_VLDF_DESC" xml:space="preserve">
-    <value>Create a new Vector Layer Definition</value>
+    <value>Create a new Vector Layer Definition using the v1.0.0 schema</value>
   </data>
   <data name="TPL_VLDF_NAME" xml:space="preserve">
-    <value>Vector Layer Definition</value>
+    <value>Vector Layer Definition (v1.0.0)</value>
   </data>
   <data name="TPL_LP_SDF_DESC" xml:space="preserve">
     <value>Create a new SDF Load Procedure</value>
@@ -455,10 +455,10 @@
     <value>Simple Symbol Definition</value>
   </data>
   <data name="TPL_WL_DESC" xml:space="preserve">
-    <value>Create a new Web Layout</value>
+    <value>Create a new Web Layout using the v1.0.0 schema</value>
   </data>
   <data name="TPL_WL_NAME" xml:space="preserve">
-    <value>Web Layout</value>
+    <value>Web Layout (v1.0.0)</value>
   </data>
   <data name="SITE_EXPLORER_TOOLTIP_TEMPLATE" xml:space="preserve">
     <value>Resource Name: {1}{0}Resource Type: {2}{0}Created: {3}{0}Last Modified: {4}{0}Owner: {5}</value>
@@ -689,10 +689,10 @@
     <value>Drawing Layer Definition</value>
   </data>
   <data name="TPL_RLDF_DESC" xml:space="preserve">
-    <value>Create a new Raster Layer Definition</value>
+    <value>Create a new Raster Layer Definition using the v1.0.0 schema</value>
   </data>
   <data name="TPL_RLDF_NAME" xml:space="preserve">
-    <value>Raster Layer Definition</value>
+    <value>Raster Layer Definition (v1.0.0)</value>
   </data>
   <data name="box__arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\box--arrow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

Modified: sandbox/maestro-3.0/Maestro.Base/Services/NewItemTemplateService.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Services/NewItemTemplateService.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Services/NewItemTemplateService.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -33,26 +33,30 @@
 
     public class NewItemTemplateService : ServiceBase
     {
-        private List<ItemTemplate> _systemTemplates;
-        private List<ItemTemplate> _userTemplates;
+        private Dictionary<string, List<ItemTemplate>> _templates;
 
         public override void Initialize()
         {
             base.Initialize();
-            _systemTemplates = new List<ItemTemplate>();
-            _userTemplates = new List<ItemTemplate>();
+            _templates = new Dictionary<string, List<ItemTemplate>>();
 
             var tpls = AddInTree.BuildItems<ItemTemplate>("/Maestro/NewItemTemplates", this);
             foreach (var tp in tpls)
             {
-                _systemTemplates.Add(tp);
+                if (!_templates.ContainsKey(tp.Category))
+                    _templates[tp.Category] = new List<ItemTemplate>();
+
+                _templates[tp.Category].Add(tp);
                 LoggingService.Info("Registered default template: " + tp.GetType()); //LOCALIZE
             }
 
+            if (!_templates.ContainsKey(Res.TPL_CATEGORY_USERDEF))
+                _templates[Res.TPL_CATEGORY_USERDEF] = new List<ItemTemplate>();
+
             UserItemTemplate [] utpls = ScanUserTemplates();
             foreach (var ut in utpls)
             {
-                _userTemplates.Add(ut);
+                _templates[Res.TPL_CATEGORY_USERDEF].Add(ut);
                 LoggingService.Info("Adding user template: " + ut.TemplatePath);
             }
             LoggingService.Info("Initialized: New Item Template Service"); //LOCALIZE
@@ -84,22 +88,24 @@
 
         public string[] GetCategories()
         {
-            return new string[] {
-                Res.TPL_CATEGORY_DEFAULT,
-                Res.TPL_CATEGORY_USERDEF 
-            };
+            List<string> values = new List<string>(_templates.Keys);
+            return values.ToArray();
         }
 
-        public ItemTemplate[] GetItemTemplates(string category)
+        public ItemTemplate[] GetItemTemplates(string category, Version siteVersion)
         {
-            if (category == Res.TPL_CATEGORY_DEFAULT)
+            if (_templates.ContainsKey(category))
             {
-                return _systemTemplates.ToArray();
+                var templates = new List<ItemTemplate>();
+                foreach (var tpl in _templates[category])
+                {
+                    if (siteVersion >= tpl.MinimumSiteVersion)
+                        templates.Add(tpl);
+                }
+                return templates.ToArray();
             }
-            else
-            {
-                return _userTemplates.ToArray();
-            }
+
+            return new ItemTemplate[0];
         }
     }
 }

Modified: sandbox/maestro-3.0/Maestro.Base/Templates/ItemTemplate.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Templates/ItemTemplate.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Templates/ItemTemplate.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -41,6 +41,17 @@
         public Image Icon { get; protected set; }
 
         /// <summary>
+        /// Gets the minimum site version this template is applicable to
+        /// </summary>
+        public virtual Version MinimumSiteVersion
+        {
+            get
+            {
+                return new Version(1, 0);
+            }
+        }
+
+        /// <summary>
         /// Creates a new item from this template
         /// </summary>
         /// <param name="conn">The server connection</param>

Modified: sandbox/maestro-3.0/Maestro.Base/Templates/WebLayoutItemTemplate.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Templates/WebLayoutItemTemplate.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/Templates/WebLayoutItemTemplate.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -41,7 +41,7 @@
 
         public override IResource CreateItem(IServerConnection conn)
         {
-            return ObjectFactory.CreateWebLayout(conn, string.Empty);
+            return ObjectFactory.CreateWebLayout(conn, new Version(1, 0, 0), string.Empty);
         }
     }
 }

Modified: sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.Designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -42,10 +42,10 @@
             // 
             this.lstTemplates.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                         | System.Windows.Forms.AnchorStyles.Right)));
-            this.lstTemplates.Location = new System.Drawing.Point(163, 37);
+            this.lstTemplates.Location = new System.Drawing.Point(220, 37);
             this.lstTemplates.MultiSelect = false;
             this.lstTemplates.Name = "lstTemplates";
-            this.lstTemplates.Size = new System.Drawing.Size(433, 251);
+            this.lstTemplates.Size = new System.Drawing.Size(376, 251);
             this.lstTemplates.TabIndex = 0;
             this.lstTemplates.UseCompatibleStateImageBehavior = false;
             this.lstTemplates.View = System.Windows.Forms.View.Tile;
@@ -56,16 +56,17 @@
             this.lstCategories.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                         | System.Windows.Forms.AnchorStyles.Left)));
             this.lstCategories.FormattingEnabled = true;
-            this.lstCategories.Location = new System.Drawing.Point(12, 37);
+            this.lstCategories.HorizontalScrollbar = true;
+            this.lstCategories.Location = new System.Drawing.Point(15, 37);
             this.lstCategories.Name = "lstCategories";
-            this.lstCategories.Size = new System.Drawing.Size(145, 251);
+            this.lstCategories.Size = new System.Drawing.Size(199, 251);
             this.lstCategories.TabIndex = 1;
             this.lstCategories.SelectedIndexChanged += new System.EventHandler(this.lstCategories_SelectedIndexChanged);
             // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(9, 13);
+            this.label1.Location = new System.Drawing.Point(15, 13);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(57, 13);
             this.label1.TabIndex = 2;
@@ -74,7 +75,7 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(160, 13);
+            this.label2.Location = new System.Drawing.Point(217, 13);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(102, 13);
             this.label2.TabIndex = 3;

Modified: sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Base/UI/NewResourceDialog.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -38,13 +38,16 @@
             InitializeComponent();
         }
 
+        private Version _siteVersion;
         private IResourceService _resSvc;
         private NewItemTemplateService _nits;
 
-        public NewResourceDialog(IResourceService resSvc, NewItemTemplateService nits) : this(resSvc, nits, "Library://") { }
+        public NewResourceDialog(IResourceService resSvc, Version siteVersion, NewItemTemplateService nits) : this(resSvc, siteVersion, nits, "Library://") { }
 
-        public NewResourceDialog(IResourceService resSvc, NewItemTemplateService nits, string startPoint) : this()
+        public NewResourceDialog(IResourceService resSvc, Version siteVersion, NewItemTemplateService nits, string startPoint)
+            : this()
         {
+            _siteVersion = siteVersion;
             _resSvc = resSvc;
             _nits = nits;
         }
@@ -64,7 +67,7 @@
             if (lstCategories.SelectedItem != null)
             {
                 string cat = lstCategories.SelectedItem.ToString();
-                LoadTemplates(_nits.GetItemTemplates(cat));
+                LoadTemplates(_nits.GetItemTemplates(cat, _siteVersion));
             }
         }
 

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeScriptCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeScriptCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeScriptCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -25,6 +25,7 @@
 using System.Text;
 using System.Windows.Forms;
 using Maestro.Shared.UI;
+using OSGeo.MapGuide.ObjectModels.WebLayout;
 
 namespace Maestro.Editors.WebLayout.Commands
 {
@@ -37,7 +38,7 @@
 
         private IEditorService _edsvc;
 
-        internal void Bind(OSGeo.MapGuide.ObjectModels.WebLayout.InvokeScriptCommandType invokeScriptCommandType, IEditorService service)
+        internal void Bind(IInvokeScriptCommand invokeScriptCommandType, IEditorService service)
         {
             _edsvc = service;
 

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeURLCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeURLCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/InvokeURLCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -37,14 +37,14 @@
         }
 
         private IEditorService _edsvc;
-        private OSGeo.MapGuide.ObjectModels.WebLayout.InvokeURLCommandType _cmd;
+        private IInvokeUrlCommand _cmd;
 
         public override void Bind(IEditorService service)
         {
             _edsvc = service;
         }
 
-        internal void Bind(OSGeo.MapGuide.ObjectModels.WebLayout.InvokeURLCommandType invokeUrlCommandType, IEditorService service)
+        internal void Bind(IInvokeUrlCommand invokeUrlCommandType, IEditorService service)
         {
             cmbTargetFrame.DataSource = Enum.GetValues(typeof(TargetType));
             Bind(service);

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/SearchCmdCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/SearchCmdCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/Commands/SearchCmdCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -42,8 +42,8 @@
         }
 
         private IEditorService _edsvc;
-        private WebLayoutType _wl;
-        private OSGeo.MapGuide.ObjectModels.WebLayout.SearchCommandType _cmd;
+        private IWebLayout _wl;
+        private ISearchCommand _cmd;
         private ClassDefinition _cls;
 
         private bool _init = true;
@@ -53,13 +53,13 @@
             _edsvc = service;
         }
 
-        internal void Bind(OSGeo.MapGuide.ObjectModels.WebLayout.SearchCommandType searchCommandType, IEditorService service)
+        internal void Bind(ISearchCommand searchCommandType, IEditorService service)
         {
             _init = true;
             Bind(service);
             _cmd = searchCommandType;
 
-            _wl = (WebLayoutType)_edsvc.GetEditedResource();
+            _wl = (IWebLayout)_edsvc.GetEditedResource();
             _wl.Map.PropertyChanged += OnWebLayoutPropertyChanged;
 
             LoadLayers();

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/CustomCommandPropertyCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/CustomCommandPropertyCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/CustomCommandPropertyCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -44,9 +44,9 @@
             _edsvc = service;
         }
 
-        private OSGeo.MapGuide.ObjectModels.WebLayout.CommandType _command;
+        private ICommand _command;
 
-        internal void Bind(OSGeo.MapGuide.ObjectModels.WebLayout.CommandType command, IEditorService service)
+        internal void Bind(ICommand command, IEditorService service)
         {
             Bind(service);
 
@@ -57,24 +57,24 @@
             TextBoxBinder.BindText(txtTitle, command, "Label");
             TextBoxBinder.BindText(txtTooltip, command, "Tooltip");
 
-            if (typeof(InvokeScriptCommandType).IsAssignableFrom(command.GetType()))
+            if (typeof(IInvokeScriptCommand).IsAssignableFrom(command.GetType()))
             {
                 var ctrl = new InvokeScriptCtrl();
-                ctrl.Bind((InvokeScriptCommandType)command, service);
+                ctrl.Bind((IInvokeScriptCommand)command, service);
                 ctrl.Dock = DockStyle.Fill;
                 TAB_ADVANCED.Controls.Add(ctrl);
             }
-            else if (typeof(InvokeURLCommandType).IsAssignableFrom(command.GetType()))
+            else if (typeof(IInvokeUrlCommand).IsAssignableFrom(command.GetType()))
             {
                 var ctrl = new InvokeURLCtrl();
-                ctrl.Bind((InvokeURLCommandType)command, service);
+                ctrl.Bind((IInvokeUrlCommand)command, service);
                 ctrl.Dock = DockStyle.Fill;
                 TAB_ADVANCED.Controls.Add(ctrl);
             }
-            else if (typeof(SearchCommandType).IsAssignableFrom(command.GetType()))
+            else if (typeof(ISearchCommand).IsAssignableFrom(command.GetType()))
             {
                 var ctrl = new SearchCmdCtrl();
-                ctrl.Bind((SearchCommandType)command, service);
+                ctrl.Bind((ISearchCommand)command, service);
                 ctrl.Dock = DockStyle.Fill;
                 TAB_ADVANCED.Controls.Add(ctrl);
             }

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/MenuEditorCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/MenuEditorCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/MenuEditorCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -51,18 +51,18 @@
         protected override void UnsubscribeEventHandlers()
         {
             if (_wl != null && _wl.CommandSet != null)
-                _wl.CommandSet.ListChanged -= CommandSet_ListChanged;
+                //_wl.CommandSet.ListChanged -= CommandSet_ListChanged;
 
             base.UnsubscribeEventHandlers();
         }
 
-        private WebLayoutType _wl;
+        private IWebLayout _wl;
 
-        public void Bind(IEditorService service, WebLayoutType wl)
+        public void Bind(IEditorService service, IWebLayout wl)
         {
             Bind(service);
             _wl = wl;
-            _wl.CommandSet.ListChanged += CommandSet_ListChanged;
+            //_wl.CommandSet.ListChanged += CommandSet_ListChanged;
 
             InitBuiltinCommandMenu();
             InitCustomCommandMenu();
@@ -103,7 +103,7 @@
             }
         }
 
-        private void RemoveCustomCommandEntry(ToolStripMenuItem tsi, OSGeo.MapGuide.ObjectModels.WebLayout.CommandType cmd)
+        private void RemoveCustomCommandEntry(ToolStripMenuItem tsi, ICommand cmd)
         {
             ToolStripItem find = null;
             foreach (ToolStripItem ti in tsi.DropDown.Items)
@@ -120,7 +120,7 @@
             }
         }
 
-        private void AddCustomCommandEntry(ToolStripMenuItem tsi, OSGeo.MapGuide.ObjectModels.WebLayout.CommandType cmd)
+        private void AddCustomCommandEntry(ToolStripMenuItem tsi, ICommand cmd)
         {
             var icon = CommandIconCache.GetStandardCommandIcon(cmd.ImageURL);
             if (icon == null)
@@ -147,7 +147,7 @@
             var tsi = sender as ToolStripItem;
             if (tsi != null && tsi.Tag != null)
             {
-                var cmd = (OSGeo.MapGuide.ObjectModels.WebLayout.CommandType)tsi.Tag;
+                var cmd = (ICommand)tsi.Tag;
 
                 //Append to end of model of active treeview
             }
@@ -178,9 +178,9 @@
 
     internal class CommandItem : ItemBase
     {
-        private CommandItemType _cmd;
+        private ICommandItem _cmd;
 
-        public CommandItem(CommandItemType item, Image icon)
+        public CommandItem(ICommandItem item, Image icon)
         {
             _cmd = item;
             if (icon == null)
@@ -207,9 +207,9 @@
 
     internal class SeparatorItem : ItemBase
     {
-        private SeparatorItemType _sep;
+        private ISeparatorItem _sep;
 
-        public SeparatorItem(SeparatorItemType sep)
+        public SeparatorItem(ISeparatorItem sep)
         {
             _sep = sep;
         }
@@ -227,9 +227,9 @@
 
     internal class FlyoutItem : ItemBase
     {
-        private FlyoutItemType _fly;
+        private IFlyoutItem _fly;
 
-        public FlyoutItem(FlyoutItemType fly)
+        public FlyoutItem(IFlyoutItem fly)
         {
             _fly = fly;
         }
@@ -244,20 +244,20 @@
             get { return Properties.Resources.ui_menu; }
         }
 
-        public IEnumerable<UIItemType> SubItem
+        public IEnumerable<IUIItem> SubItem
         {
-            get { return _fly.SubItem; }
+            get { return _fly.Items; }
         }
     }
 
     internal class MenuTreeModel : ITreeModel
     {
-        private IList<UIItemType> _items;
-        private WebLayoutType _wl;
+        private IMenu _menu;
+        private IWebLayout _wl;
 
-        public MenuTreeModel(IList<UIItemType> items, WebLayoutType wl)
+        public MenuTreeModel(IMenu menu, IWebLayout wl)
         {
-            _items = items;
+            _menu = menu;
             _wl = wl;
         }
 
@@ -265,20 +265,20 @@
         {
             if (treePath.IsEmpty())
             {
-                foreach (var item in _items)
+                foreach (var item in _menu.Items)
                 {
                     if (item.Function == UIItemFunctionType.Command)
                     {
-                        var ci = (CommandItemType)item;
+                        var ci = (ICommandItem)item;
                         var cmd = _wl.GetCommandByName(ci.Command);
                         Debug.Assert(cmd != null);
 
                         yield return new CommandItem(ci, CommandIconCache.GetStandardCommandIcon(cmd.ImageURL));
                     }
                     else if (item.Function == UIItemFunctionType.Flyout)
-                        yield return new FlyoutItem((FlyoutItemType)item);
+                        yield return new FlyoutItem((IFlyoutItem)item);
                     else
-                        yield return new SeparatorItem((SeparatorItemType)item);
+                        yield return new SeparatorItem((ISeparatorItem)item);
                 }
             }
             else
@@ -290,16 +290,16 @@
                     {
                         if (item.Function == UIItemFunctionType.Command)
                         {
-                            var ci = (CommandItemType)item;
+                            var ci = (ICommandItem)item;
                             var cmd = _wl.GetCommandByName(ci.Command);
                             Debug.Assert(cmd != null);
 
                             yield return new CommandItem(ci, CommandIconCache.GetStandardCommandIcon(cmd.ImageURL));
                         }
                         else if (item.Function == UIItemFunctionType.Flyout)
-                            yield return new FlyoutItem((FlyoutItemType)item);
+                            yield return new FlyoutItem((IFlyoutItem)item);
                         else
-                            yield return new SeparatorItem((SeparatorItemType)item);
+                            yield return new SeparatorItem((ISeparatorItem)item);
                     }
                 }
                 else

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutCommandsCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutCommandsCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutCommandsCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -37,25 +37,32 @@
         public WebLayoutCommandsCtrl()
         {
             InitializeComponent();
+            _commands = new BindingList<ICommand>();
+            _commands.ListChanged += OnCommandSetListChanged;
+            grdCommands.DataSource = _commands;
         }
 
-        private WebLayoutType _wl;
+        private IWebLayout _wl;
         private IEditorService _edsvc;
 
+        private BindingList<ICommand> _commands;
+
         public override void Bind(IEditorService service)
         {
             _edsvc = service;
             _edsvc.RegisterCustomNotifier(this);
 
-            _wl = (WebLayoutType)_edsvc.GetEditedResource();
-            _wl.CommandSet.ListChanged += OnCommandSetListChanged;
-            grdCommands.DataSource = _wl.CommandSet;
+            _wl = (IWebLayout)_edsvc.GetEditedResource();
+            //Populate command set
+            foreach (var cmd in _wl.CommandSet.Commands)
+            {
+                _commands.Add(cmd);
+            }
         }
 
         protected override void UnsubscribeEventHandlers()
         {
-            if (_wl != null && _wl.CommandSet != null)
-                _wl.CommandSet.ListChanged -= OnCommandSetListChanged;
+            _commands.ListChanged -= OnCommandSetListChanged;
 
             base.UnsubscribeEventHandlers();
         }
@@ -65,21 +72,21 @@
             OnResourceChanged();
         }
 
-        private OSGeo.MapGuide.ObjectModels.WebLayout.CommandType[] GetCustomCommands()
+        private ICommand[] GetCustomCommands()
         {
-            var cmds = new List<OSGeo.MapGuide.ObjectModels.WebLayout.CommandType>();
-            foreach (var c in _wl.CommandSet)
+            var cmds = new List<ICommand>();
+            foreach (var c in _wl.CommandSet.Commands)
             {
                 var type = c.GetType();
-                if (typeof(InvokeURLCommandType).IsAssignableFrom(type))
+                if (typeof(IInvokeUrlCommand).IsAssignableFrom(type))
                 {
                     cmds.Add(c);
                 }
-                else if (typeof(InvokeScriptCommandType).IsAssignableFrom(type))
+                else if (typeof(IInvokeScriptCommand).IsAssignableFrom(type))
                 {
                     cmds.Add(c);
                 }
-                else if (typeof(SearchCommandType).IsAssignableFrom(type))
+                else if (typeof(ISearchCommand).IsAssignableFrom(type))
                 {
                     cmds.Add(c);
                 }
@@ -87,22 +94,22 @@
             return cmds.ToArray();
         }
 
-        private OSGeo.MapGuide.ObjectModels.WebLayout.CommandType[] GetSelectedCustomCommands()
+        private ICommand[] GetSelectedCustomCommands()
         {
-            var cmds = new List<OSGeo.MapGuide.ObjectModels.WebLayout.CommandType>();
+            var cmds = new List<ICommand>();
             foreach (DataGridViewRow row in grdCommands.SelectedRows)
             {
-                if (typeof(InvokeScriptCommandType).IsAssignableFrom(row.DataBoundItem.GetType()))
+                if (typeof(IInvokeScriptCommand).IsAssignableFrom(row.DataBoundItem.GetType()))
                 {
-                    cmds.Add((OSGeo.MapGuide.ObjectModels.WebLayout.CommandType)row.DataBoundItem);
+                    cmds.Add((ICommand)row.DataBoundItem);
                 }
-                else if (typeof(InvokeURLCommandType).IsAssignableFrom(row.DataBoundItem.GetType()))
+                else if (typeof(IInvokeUrlCommand).IsAssignableFrom(row.DataBoundItem.GetType()))
                 {
-                    cmds.Add((OSGeo.MapGuide.ObjectModels.WebLayout.CommandType)row.DataBoundItem);
+                    cmds.Add((ICommand)row.DataBoundItem);
                 }
-                else if (typeof(SearchCommandType).IsAssignableFrom(row.DataBoundItem.GetType()))
+                else if (typeof(ISearchCommand).IsAssignableFrom(row.DataBoundItem.GetType()))
                 {
-                    cmds.Add((OSGeo.MapGuide.ObjectModels.WebLayout.CommandType)row.DataBoundItem);
+                    cmds.Add((ICommand)row.DataBoundItem);
                 }
             }
             return cmds.ToArray();
@@ -118,23 +125,23 @@
 
         private void invokeURLToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            var cmd = ObjectFactory.CreateInvokeUrlCommand();
+            var cmd = _wl.CreateInvokeUrlCommand();
             cmd.Description = cmd.Label = cmd.Tooltip = Properties.Resources.InvokeUrlCmdDescription;
-            _wl.CommandSet.Add(cmd);
+            _wl.CommandSet.AddCommand(cmd);
         }
 
         private void invokeScriptToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            var cmd = ObjectFactory.CreateInvokeScriptCommand();
+            var cmd = _wl.CreateInvokeScriptCommand();
             cmd.Description = cmd.Label = cmd.Tooltip = Properties.Resources.InvokeScriptCmdDescription;
-            _wl.CommandSet.Add(cmd);
+            _wl.CommandSet.AddCommand(cmd);
         }
 
         private void searchToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            var cmd = ObjectFactory.CreateSearchCommand();
+            var cmd = _wl.CreateSearchCommand();
             cmd.Description = cmd.Label = cmd.Tooltip = Properties.Resources.SearchCmdDescription;
-            _wl.CommandSet.Add(cmd);
+            _wl.CommandSet.AddCommand(cmd);
         }
 
         private void grdCommands_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -148,7 +155,7 @@
 
                 var cmdCtrl = new CustomCommandPropertyCtrl();
                 cmdCtrl.Dock = DockStyle.Fill;
-                cmdCtrl.Bind((OSGeo.MapGuide.ObjectModels.WebLayout.CommandType)row.DataBoundItem, _edsvc);
+                cmdCtrl.Bind((ICommand)row.DataBoundItem, _edsvc);
 
                 grpCommand.Controls.Add(cmdCtrl);
 
@@ -174,9 +181,9 @@
         {
             if (grdCommands.SelectedRows.Count == 1)
             {
-                var iurl = grdCommands.SelectedRows[0].DataBoundItem as InvokeURLCommandType;
-                var iscr = grdCommands.SelectedRows[0].DataBoundItem as InvokeScriptCommandType;
-                var srch = grdCommands.SelectedRows[0].DataBoundItem as SearchCommandType;
+                var iurl = grdCommands.SelectedRows[0].DataBoundItem as IInvokeUrlCommand;
+                var iscr = grdCommands.SelectedRows[0].DataBoundItem as IInvokeScriptCommand;
+                var srch = grdCommands.SelectedRows[0].DataBoundItem as ISearchCommand;
 
                 WebLayoutRegion[] regions;
                 if (iurl != null)
@@ -189,7 +196,7 @@
 
                     using (new WaitCursor(this))
                     {
-                        _wl.CommandSet.Remove(iurl);
+                        _wl.CommandSet.RemoveCommand(iurl);
                         int deleted = _wl.RemoveAllReferences(iurl.Name);
                         ClearCommandUI();
                     }
@@ -204,7 +211,7 @@
 
                     using (new WaitCursor(this))
                     {
-                        _wl.CommandSet.Remove(iscr);
+                        _wl.CommandSet.RemoveCommand(iscr);
                         _wl.RemoveAllReferences(iscr.Name);
                         ClearCommandUI();
                     }
@@ -219,7 +226,7 @@
 
                     using (new WaitCursor(this))
                     {
-                        _wl.CommandSet.Remove(srch);
+                        _wl.CommandSet.RemoveCommand(srch);
                         _wl.RemoveAllReferences(srch.Name);
                         ClearCommandUI();
                     }

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutMenusCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutMenusCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutMenusCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -42,19 +42,19 @@
             InitializeComponent();
         }
 
-        private WebLayoutType _wl;
+        private IWebLayout _wl;
 
         public override void Bind(IEditorService service)
         {
-            _wl = (WebLayoutType)service.GetEditedResource();
+            _wl = (IWebLayout)service.GetEditedResource();
 
             edContextMenu.Bind(service, _wl);
             edTaskMenu.Bind(service, _wl);
             edToolbar.Bind(service, _wl);
 
-            edContextMenu.Model = new MenuTreeModel(_wl.ContextMenu.MenuItem, _wl);
-            edTaskMenu.Model = new MenuTreeModel(_wl.TaskPane.TaskBar.MenuButton, _wl);
-            edToolbar.Model = new MenuTreeModel(_wl.ToolBar.Button, _wl);
+            edContextMenu.Model = new MenuTreeModel(_wl.ContextMenu, _wl);
+            edTaskMenu.Model = new MenuTreeModel(_wl.TaskPane.TaskBar, _wl);
+            edToolbar.Model = new MenuTreeModel(_wl.ToolBar, _wl);
 
             grdCommands.DataSource = _wl.CommandSet;
         }

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.Designer.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.Designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -66,6 +66,7 @@
             this.label11 = new System.Windows.Forms.Label();
             this.txtAjaxViewerUrl = new System.Windows.Forms.TextBox();
             this.btnShowInBrowser = new System.Windows.Forms.Button();
+            this.chkPingServer = new System.Windows.Forms.CheckBox();
             this.contentPanel.SuspendLayout();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
@@ -76,6 +77,7 @@
             // 
             // contentPanel
             // 
+            this.contentPanel.Controls.Add(this.chkPingServer);
             this.contentPanel.Controls.Add(this.btnShowInBrowser);
             this.contentPanel.Controls.Add(this.txtAjaxViewerUrl);
             this.contentPanel.Controls.Add(this.label11);
@@ -91,7 +93,7 @@
             this.contentPanel.Controls.Add(this.label2);
             this.contentPanel.Controls.Add(this.txtBrowserTitle);
             this.contentPanel.Controls.Add(this.label1);
-            this.contentPanel.Size = new System.Drawing.Size(662, 398);
+            this.contentPanel.Size = new System.Drawing.Size(662, 426);
             // 
             // label1
             // 
@@ -152,7 +154,7 @@
             this.groupBox1.Controls.Add(this.label5);
             this.groupBox1.Controls.Add(this.label4);
             this.groupBox1.Controls.Add(this.label3);
-            this.groupBox1.Location = new System.Drawing.Point(19, 68);
+            this.groupBox1.Location = new System.Drawing.Point(19, 95);
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.Size = new System.Drawing.Size(624, 55);
             this.groupBox1.TabIndex = 5;
@@ -161,7 +163,7 @@
             // chkCustomView
             // 
             this.chkCustomView.AutoSize = true;
-            this.chkCustomView.Location = new System.Drawing.Point(6, -1);
+            this.chkCustomView.Location = new System.Drawing.Point(6, 0);
             this.chkCustomView.Name = "chkCustomView";
             this.chkCustomView.Size = new System.Drawing.Size(229, 17);
             this.chkCustomView.TabIndex = 7;
@@ -233,7 +235,7 @@
             this.groupBox2.Controls.Add(this.groupBox5);
             this.groupBox2.Controls.Add(this.groupBox4);
             this.groupBox2.Controls.Add(this.groupBox3);
-            this.groupBox2.Location = new System.Drawing.Point(19, 130);
+            this.groupBox2.Location = new System.Drawing.Point(19, 157);
             this.groupBox2.Name = "groupBox2";
             this.groupBox2.Size = new System.Drawing.Size(624, 176);
             this.groupBox2.TabIndex = 6;
@@ -398,7 +400,7 @@
             // label9
             // 
             this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(16, 319);
+            this.label9.Location = new System.Drawing.Point(16, 346);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(111, 13);
             this.label9.TabIndex = 7;
@@ -408,7 +410,7 @@
             // 
             this.txtInitialTaskPaneUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                         | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtInitialTaskPaneUrl.Location = new System.Drawing.Point(152, 316);
+            this.txtInitialTaskPaneUrl.Location = new System.Drawing.Point(152, 343);
             this.txtInitialTaskPaneUrl.Name = "txtInitialTaskPaneUrl";
             this.txtInitialTaskPaneUrl.Size = new System.Drawing.Size(491, 20);
             this.txtInitialTaskPaneUrl.TabIndex = 8;
@@ -417,7 +419,7 @@
             // 
             this.txtHyperlinkFrame.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                         | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtHyperlinkFrame.Location = new System.Drawing.Point(259, 342);
+            this.txtHyperlinkFrame.Location = new System.Drawing.Point(259, 369);
             this.txtHyperlinkFrame.Name = "txtHyperlinkFrame";
             this.txtHyperlinkFrame.Size = new System.Drawing.Size(384, 20);
             this.txtHyperlinkFrame.TabIndex = 9;
@@ -426,7 +428,7 @@
             // 
             this.cmbHyperlinkTarget.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbHyperlinkTarget.FormattingEnabled = true;
-            this.cmbHyperlinkTarget.Location = new System.Drawing.Point(152, 342);
+            this.cmbHyperlinkTarget.Location = new System.Drawing.Point(152, 369);
             this.cmbHyperlinkTarget.Name = "cmbHyperlinkTarget";
             this.cmbHyperlinkTarget.Size = new System.Drawing.Size(98, 21);
             this.cmbHyperlinkTarget.TabIndex = 10;
@@ -435,7 +437,7 @@
             // label10
             // 
             this.label10.AutoSize = true;
-            this.label10.Location = new System.Drawing.Point(16, 345);
+            this.label10.Location = new System.Drawing.Point(16, 372);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(124, 13);
             this.label10.TabIndex = 11;
@@ -444,7 +446,7 @@
             // label11
             // 
             this.label11.AutoSize = true;
-            this.label11.Location = new System.Drawing.Point(16, 372);
+            this.label11.Location = new System.Drawing.Point(16, 399);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(93, 13);
             this.label11.TabIndex = 12;
@@ -454,7 +456,7 @@
             // 
             this.txtAjaxViewerUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                         | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtAjaxViewerUrl.Location = new System.Drawing.Point(152, 369);
+            this.txtAjaxViewerUrl.Location = new System.Drawing.Point(152, 396);
             this.txtAjaxViewerUrl.Name = "txtAjaxViewerUrl";
             this.txtAjaxViewerUrl.ReadOnly = true;
             this.txtAjaxViewerUrl.Size = new System.Drawing.Size(389, 20);
@@ -463,20 +465,30 @@
             // btnShowInBrowser
             // 
             this.btnShowInBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnShowInBrowser.Location = new System.Drawing.Point(547, 367);
+            this.btnShowInBrowser.Location = new System.Drawing.Point(547, 394);
             this.btnShowInBrowser.Name = "btnShowInBrowser";
             this.btnShowInBrowser.Size = new System.Drawing.Size(96, 23);
             this.btnShowInBrowser.TabIndex = 14;
             this.btnShowInBrowser.Text = "Show in browser";
             this.btnShowInBrowser.UseVisualStyleBackColor = true;
             // 
+            // chkPingServer
+            // 
+            this.chkPingServer.AutoSize = true;
+            this.chkPingServer.Location = new System.Drawing.Point(152, 67);
+            this.chkPingServer.Name = "chkPingServer";
+            this.chkPingServer.Size = new System.Drawing.Size(134, 17);
+            this.chkPingServer.TabIndex = 15;
+            this.chkPingServer.Text = "Keep Connection Alive";
+            this.chkPingServer.UseVisualStyleBackColor = true;
+            // 
             // WebLayoutSettingsCtrl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.HeaderText = "General Settings";
             this.Name = "WebLayoutSettingsCtrl";
-            this.Size = new System.Drawing.Size(662, 425);
+            this.Size = new System.Drawing.Size(662, 453);
             this.contentPanel.ResumeLayout(false);
             this.contentPanel.PerformLayout();
             this.groupBox1.ResumeLayout(false);
@@ -532,5 +544,6 @@
         private System.Windows.Forms.TextBox txtHyperlinkFrame;
         private System.Windows.Forms.TextBox txtInitialTaskPaneUrl;
         private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.CheckBox chkPingServer;
     }
 }

Modified: sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.Editors/WebLayout/WebLayoutSettingsCtrl.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -45,21 +45,21 @@
         }
 
         private IEditorService _edsvc;
-        private WebLayoutType _wl;
+        private IWebLayout _wl;
 
-        private MapViewType _view;
+        private IMapView _view;
 
         public override void Bind(IEditorService service)
         {
             _edsvc = service;
             _edsvc.RegisterCustomNotifier(this);
 
-            _wl = (WebLayoutType)_edsvc.GetEditedResource();
+            _wl = (IWebLayout)_edsvc.GetEditedResource();
 
             _view = _wl.Map.InitialView;
             if (_view == null)
             {
-                _view = new MapViewType();
+                _view = _wl.CreateDefaultView();
                 chkCustomView.Checked = false;
             }
             else 
@@ -68,6 +68,12 @@
             }
             CheckInitialView();
 
+            var wl2 = _wl as IWebLayout2;
+            if (wl2 != null)
+                CheckBoxBinder.BindChecked(chkPingServer, wl2, "EnablePingServer");
+            else
+                chkPingServer.Visible = false;
+
             TextBoxBinder.BindText(numX, _view, "CenterX");
             TextBoxBinder.BindText(numY, _view, "CenterY");
             TextBoxBinder.BindText(numScale, _view, "Scale");

Modified: sandbox/maestro-3.0/Maestro.ResourceValidation/LoadProcedureValidator.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/LoadProcedureValidator.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/LoadProcedureValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -25,67 +25,11 @@
 
 namespace Maestro.ResourceValidation
 {
-    public class LoadProcedureValidator : IResourceValidator
+    public class LoadProcedureValidator : BaseLoadProcedureValidator
     {
-        public ResourceTypeDescriptor SupportedResourceAndVersion
+        public override ResourceTypeDescriptor SupportedResourceAndVersion
         {
             get { return new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.LoadProcedure, "1.0.0"); }
         }
-
-        public ValidationIssue[] Validate(IResource resource, bool recurse)
-        {
-            if (resource.ResourceType != OSGeo.MapGuide.MaestroAPI.ResourceTypes.LoadProcedure)
-                return null;
-
-            if (resource.ResourceVersion != new Version(1, 0, 0))
-                return null;
-
-            var set = new ValidationResultSet();
-
-            var loadProc = (resource as ILoadProcedure).SubType;
-
-            if (loadProc.Type == LoadType.Dwg)
-            {
-                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_DWGNotSupported));
-                return set.GetAllIssues(); //all she wrote
-            }
-
-            if (loadProc.Type == LoadType.Raster)
-            {
-                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_RasterNotSupported));
-                return set.GetAllIssues(); //all she wrote
-            }
-
-            if (loadProc.Type == LoadType.Sdf)
-            {
-                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_Sdf2OptionsNotSupported));
-                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_GeneralizationNotSupported));
-            }
-
-            if (loadProc.Type == LoadType.Shp)
-            {
-                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_ConvertToSdf3NotSupported));
-                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_GeneralizationNotSupported));
-            }
-
-            if (loadProc.Type == LoadType.Sqlite)
-            {
-                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_GeneralizationNotSupported));
-            }
-
-            var fproc = loadProc as IBaseLoadProcedure;
-            if (fproc != null)
-            {
-                foreach (var fn in fproc.SourceFile)
-                {
-                    if (!System.IO.File.Exists(fn))
-                    {
-                        set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, string.Format(Properties.Resources.LPROC_SourceFileNotFound, fn)));
-                    }
-                }
-            }
-
-            return set.GetAllIssues();
-        }
     }
 }

Modified: sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.Designer.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.Designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -205,69 +205,6 @@
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to Convert to SDF option is not supported by Maestro.
-        /// </summary>
-        internal static string LPROC_ConvertToSdf3NotSupported {
-            get {
-                return ResourceManager.GetString("LPROC_ConvertToSdf3NotSupported", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to DWF Load Procedures cannot be executed by Maestro.
-        /// </summary>
-        internal static string LPROC_DWFNotSupported {
-            get {
-                return ResourceManager.GetString("LPROC_DWFNotSupported", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to DWG Load Procedures cannot be executed by Maestro.
-        /// </summary>
-        internal static string LPROC_DWGNotSupported {
-            get {
-                return ResourceManager.GetString("LPROC_DWGNotSupported", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Generalization of source data is not supported by Maestro.
-        /// </summary>
-        internal static string LPROC_GeneralizationNotSupported {
-            get {
-                return ResourceManager.GetString("LPROC_GeneralizationNotSupported", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Raster Load Procedures cannot be executed by Maestro.
-        /// </summary>
-        internal static string LPROC_RasterNotSupported {
-            get {
-                return ResourceManager.GetString("LPROC_RasterNotSupported", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to SDF 2 Migration options are not supported by Maestro. Ensure your source files are SDF3 files..
-        /// </summary>
-        internal static string LPROC_Sdf2OptionsNotSupported {
-            get {
-                return ResourceManager.GetString("LPROC_Sdf2OptionsNotSupported", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Source file not found: {0}.
-        /// </summary>
-        internal static string LPROC_SourceFileNotFound {
-            get {
-                return ResourceManager.GetString("LPROC_SourceFileNotFound", resourceCulture);
-            }
-        }
-        
-        /// <summary>
         ///   Looks up a localized string similar to Data from {0} is not visible in the map&apos;s start extent.
         /// </summary>
         internal static string MDF_DataOutsideMapWarning {
@@ -401,77 +338,5 @@
                 return ResourceManager.GetString("MDF_UnsupportedLayerTypeWarning", resourceCulture);
             }
         }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to There web layout has more than one command named: {0}.
-        /// </summary>
-        internal static string WL_DuplicateCommandName {
-            get {
-                return ResourceManager.GetString("WL_DuplicateCommandName", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The search command {0} references more than one property named {1}.
-        /// </summary>
-        internal static string WL_DuplicateSearchResultColumn {
-            get {
-                return ResourceManager.GetString("WL_DuplicateSearchResultColumn", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Error validating MapDefinition {0}, message: {1}.
-        /// </summary>
-        internal static string WL_MapValidationError {
-            get {
-                return ResourceManager.GetString("WL_MapValidationError", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Layout does not specify a map.
-        /// </summary>
-        internal static string WL_MissingMapError {
-            get {
-                return ResourceManager.GetString("WL_MissingMapError", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Context Menu contains a reference to a command that doesn&apos;t exist: {0}.
-        /// </summary>
-        internal static string WL_NonExistentMenuCommandReference {
-            get {
-                return ResourceManager.GetString("WL_NonExistentMenuCommandReference", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Task Pane contains a reference to a command that does not exist: {0}.
-        /// </summary>
-        internal static string WL_NonExistentTaskPaneCommandReference {
-            get {
-                return ResourceManager.GetString("WL_NonExistentTaskPaneCommandReference", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Toolbar contains a reference to a command that does not exist: {0}.
-        /// </summary>
-        internal static string WL_NonExistentToolbarCommandReference {
-            get {
-                return ResourceManager.GetString("WL_NonExistentToolbarCommandReference", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Layout specifies a start view that is outside the map&apos;s initial extents.
-        /// </summary>
-        internal static string WL_StartViewOutsideExtentsWarning {
-            get {
-                return ResourceManager.GetString("WL_StartViewOutsideExtentsWarning", resourceCulture);
-            }
-        }
     }
 }

Modified: sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.resx	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/Properties/Resources.resx	2010-10-19 06:23:47 UTC (rev 5294)
@@ -179,34 +179,6 @@
     <value>Failed to read spatial context: {0}</value>
     <comment>An error message that is displayed if the spatial context could not be read</comment>
   </data>
-  <data name="LPROC_ConvertToSdf3NotSupported" xml:space="preserve">
-    <value>Convert to SDF option is not supported by Maestro</value>
-    <comment>A warning message about the lack of SDF conversion support</comment>
-  </data>
-  <data name="LPROC_DWFNotSupported" xml:space="preserve">
-    <value>DWF Load Procedures cannot be executed by Maestro</value>
-    <comment>A warning message indicating the lack of DWF support in Maestro</comment>
-  </data>
-  <data name="LPROC_DWGNotSupported" xml:space="preserve">
-    <value>DWG Load Procedures cannot be executed by Maestro</value>
-    <comment>A warning message indicating the lack of DWG support in Maestro</comment>
-  </data>
-  <data name="LPROC_GeneralizationNotSupported" xml:space="preserve">
-    <value>Generalization of source data is not supported by Maestro</value>
-    <comment>A warning message about the lack of Generalization support</comment>
-  </data>
-  <data name="LPROC_RasterNotSupported" xml:space="preserve">
-    <value>Raster Load Procedures cannot be executed by Maestro</value>
-    <comment>A warning message about the lack of Raster support</comment>
-  </data>
-  <data name="LPROC_Sdf2OptionsNotSupported" xml:space="preserve">
-    <value>SDF 2 Migration options are not supported by Maestro. Ensure your source files are SDF3 files.</value>
-    <comment>A warning message about the lack of SDF2 support</comment>
-  </data>
-  <data name="LPROC_SourceFileNotFound" xml:space="preserve">
-    <value>Source file not found: {0}</value>
-    <comment>An error message indicating that a source file in the load procedure does not exist</comment>
-  </data>
   <data name="MDF_DataOutsideMapWarning" xml:space="preserve">
     <value>Data from {0} is not visible in the map's start extent</value>
     <comment>A warning message that is displayed if a layer reports an extent that is outside the map's extent</comment>
@@ -267,31 +239,4 @@
     <value>Layer {0} is a type that is unsupported by Maestro</value>
     <comment>A warning message that is displayed if a layer has a type that is not supported by Maestro</comment>
   </data>
-  <data name="WL_DuplicateCommandName" xml:space="preserve">
-    <value>There web layout has more than one command named: {0}</value>
-  </data>
-  <data name="WL_DuplicateSearchResultColumn" xml:space="preserve">
-    <value>The search command {0} references more than one property named {1}</value>
-  </data>
-  <data name="WL_MapValidationError" xml:space="preserve">
-    <value>Error validating MapDefinition {0}, message: {1}</value>
-    <comment>An error message that is displayed if the map validation fails</comment>
-  </data>
-  <data name="WL_MissingMapError" xml:space="preserve">
-    <value>Layout does not specify a map</value>
-    <comment>An error message that is displayed if no map is specified in the layout</comment>
-  </data>
-  <data name="WL_NonExistentMenuCommandReference" xml:space="preserve">
-    <value>Context Menu contains a reference to a command that doesn't exist: {0}</value>
-  </data>
-  <data name="WL_NonExistentTaskPaneCommandReference" xml:space="preserve">
-    <value>Task Pane contains a reference to a command that does not exist: {0}</value>
-  </data>
-  <data name="WL_NonExistentToolbarCommandReference" xml:space="preserve">
-    <value>Toolbar contains a reference to a command that does not exist: {0}</value>
-  </data>
-  <data name="WL_StartViewOutsideExtentsWarning" xml:space="preserve">
-    <value>Layout specifies a start view that is outside the map's initial extents</value>
-    <comment>A warning message that is displayed if the layout specifies a start center point that is outside the map's specified extents</comment>
-  </data>
 </root>
\ No newline at end of file

Modified: sandbox/maestro-3.0/Maestro.ResourceValidation/WebLayoutValidator.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/WebLayoutValidator.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/WebLayoutValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -29,110 +29,10 @@
 
 namespace Maestro.ResourceValidation
 {
-    public class WebLayoutValidator : IResourceValidator
+    public class WebLayoutValidator : BaseWebLayoutValidator
     {
-        public ValidationIssue[] Validate(IResource resource, bool recurse)
+        public override ResourceTypeDescriptor SupportedResourceAndVersion
         {
-            if (resource.ResourceType != OSGeo.MapGuide.MaestroAPI.ResourceTypes.WebLayout)
-                return null;
-
-            List<ValidationIssue> issues = new List<ValidationIssue>();
-
-            WebLayoutType layout = resource as WebLayoutType;
-            if (layout.Map == null || layout.Map.ResourceId == null)
-            {
-                issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_MissingMapError)));
-            }
-            else
-            {
-                //Check for duplicate command names
-                var cmdSet = layout.CommandSet;
-                Dictionary<string, CommandType> cmds = new Dictionary<string, CommandType>();
-                foreach (CommandType cmd in cmdSet)
-                {
-                    if (cmds.ContainsKey(cmd.Name))
-                        issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_DuplicateCommandName, cmd.Name)));
-                    else
-                        cmds[cmd.Name] = cmd;
-                }
-
-                //Check for duplicate property references in search commands
-                foreach (CommandType cmd in cmdSet)
-                {
-                    if (cmd is SearchCommandType)
-                    {
-                        SearchCommandType search = (SearchCommandType)cmd;
-                        Dictionary<string, string> resColProps = new Dictionary<string, string>();
-                        foreach (ResultColumnType resCol in search.ResultColumns)
-                        {
-                            if (resColProps.ContainsKey(resCol.Property))
-                                issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_DuplicateSearchResultColumn, search.Name, resCol.Property)));
-                            else
-                                resColProps.Add(resCol.Property, resCol.Property);
-                        }
-                    }
-                }
-
-                //Check for command references to non-existent commands
-                foreach (UIItemType item in layout.ContextMenu.MenuItem)
-                {
-                    if (item.Function == UIItemFunctionType.Command)
-                    {
-                        CommandItemType cmdRef = (CommandItemType)item;
-                        if (!cmds.ContainsKey(cmdRef.Command))
-                            issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_NonExistentMenuCommandReference, cmdRef.Command)));
-                    }
-                }
-
-                foreach (UIItemType item in layout.TaskPane.TaskBar.MenuButton)
-                {
-                    if (item.Function == UIItemFunctionType.Command)
-                    {
-                        CommandItemType cmdRef = (CommandItemType)item;
-                        if (!cmds.ContainsKey(cmdRef.Command))
-                            issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_NonExistentTaskPaneCommandReference, cmdRef.Command)));
-                    }
-                }
-
-                foreach (UIItemType item in layout.ToolBar.Button)
-                {
-                    if (item.Function == UIItemFunctionType.Command)
-                    {
-                        CommandItemType cmdRef = (CommandItemType)item;
-                        if (!cmds.ContainsKey(cmdRef.Command))
-                            issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_NonExistentToolbarCommandReference, cmdRef.Command)));
-                    }
-                }
-
-                if (recurse)
-                {
-                    try
-                    {
-                        MapDefinition mdef = (MapDefinition)layout.CurrentConnection.ResourceService.GetResource(layout.Map.ResourceId);
-
-                        issues.AddRange(ResourceValidatorSet.Validate(mdef, true));
-
-                        if (layout.Map.InitialView != null)
-                        {
-                            var mapEnv = ObjectFactory.CreateEnvelope(mdef.Extents.MinX, mdef.Extents.MaxX, mdef.Extents.MinY, mdef.Extents.MaxY);
-                            if (!mapEnv.Contains(layout.Map.InitialView.CenterX, layout.Map.InitialView.CenterY))
-                                issues.Add(new ValidationIssue(mdef, ValidationStatus.Warning, string.Format(Properties.Resources.WL_StartViewOutsideExtentsWarning)));
-                        }
-
-                    }
-                    catch (Exception ex)
-                    {
-                        string msg = NestedExceptionMessageProcessor.GetFullMessage(ex);
-                        issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_MapValidationError, layout.Map.ResourceId, msg)));
-                    }
-                }
-            }
-
-            return issues.ToArray();
-        }
-
-        public ResourceTypeDescriptor SupportedResourceAndVersion
-        {
             get { return new ResourceTypeDescriptor(OSGeo.MapGuide.MaestroAPI.ResourceTypes.WebLayout, "1.0.0"); }
         }
     }

Modified: sandbox/maestro-3.0/MaestroAPITests/ResourceTests.cs
===================================================================
--- sandbox/maestro-3.0/MaestroAPITests/ResourceTests.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/MaestroAPITests/ResourceTests.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -68,7 +68,7 @@
             var md2 = md.Clone();
             Assert.AreNotSame(md, md2);
 
-            var wl = new WebLayoutType();
+            var wl = ObjectFactory.CreateWebLayout(conn, new Version(1, 0, 0), "Library://Test.MapDefinition");
             var wl2 = wl.Clone();
             Assert.AreNotSame(wl, wl2);
 
@@ -194,7 +194,7 @@
             }
             #endregion
 
-            res = ObjectFactory.CreateWebLayout(conn, "Library://Test.MapDefinition");
+            res = ObjectFactory.CreateWebLayout(conn, new Version(1, 0, 0), "Library://Test.MapDefinition");
             #region Web Layout
             try
             {
@@ -485,7 +485,7 @@
             var md2 = conv.Upgrade(md, targetVer);
             Assert.AreSame(md, md2);
 
-            var wl = ObjectFactory.CreateWebLayout(conn, "Library://Test.MapDefinition");
+            var wl = ObjectFactory.CreateWebLayout(conn, new Version(1, 0, 0), "Library://Test.MapDefinition");
             var wl2 = conv.Upgrade(wl, targetVer);
             Assert.AreSame(wl, wl2);
 
@@ -645,7 +645,7 @@
         {
             var conn = _mocks.NewMock<IServerConnection>();
 
-            var wl = ObjectFactory.CreateWebLayout(conn, "Library://Test.MapDefinition");
+            var wl = ObjectFactory.CreateWebLayout(conn, new Version(1, 0, 0), "Library://Test.MapDefinition");
             Assert.IsNotNull(wl.CommandSet);
             Assert.IsNotNull(wl.ContextMenu);
             Assert.IsNotNull(wl.InformationPane);
@@ -655,9 +655,9 @@
             Assert.IsNotNull(wl.ToolBar);
             Assert.IsNotNull(wl.ZoomControl);
 
-            Assert.IsTrue(wl.CommandSet.Count > 0);
-            Assert.IsTrue(wl.ContextMenu.MenuItem.Count > 0);
-            Assert.IsTrue(wl.ToolBar.Button.Count > 0);
+            Assert.IsTrue(wl.CommandSet.CommandCount > 0);
+            Assert.IsTrue(wl.ContextMenu.ItemCount > 0);
+            Assert.IsTrue(wl.ToolBar.ItemCount > 0);
 
             Assert.AreEqual(wl.Map.ResourceId, "Library://Test.MapDefinition");
 
@@ -666,7 +666,7 @@
             foreach (var cmdName in cmdNames)
             {
                 bool found = false;
-                foreach (var cmd in wl.CommandSet)
+                foreach (var cmd in wl.CommandSet.Commands)
                 {
                     if (cmd.Name == cmdName.ToString())
                     {

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-10-19 06:23:47 UTC (rev 5294)
@@ -217,6 +217,7 @@
     <Compile Include="ObjectModels\UnmanagedDataList.cs" />
     <Compile Include="ObjectModels\UntypedResource.cs" />
     <Compile Include="ObjectModels\WebLayout.cs" />
+    <Compile Include="ObjectModels\WebLayoutInterfaces.cs" />
     <Compile Include="Platform.cs" />
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
@@ -225,6 +226,8 @@
     </Compile>
     <Compile Include="ResourceTypeRegistry.cs" />
     <Compile Include="Resource\BaseLayerDefinitionValidator.cs" />
+    <Compile Include="Resource\BaseLoadProcedureValidator.cs" />
+    <Compile Include="Resource\BaseWebLayoutValidator.cs" />
     <Compile Include="Resource\Conversion\IResourceConverter.cs" />
     <Compile Include="Resource\Conversion\ResourceConverter.cs" />
     <Compile Include="Resource\Conversion\ResourceUpgrader.cs" />

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/LoadProcFactory.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/LoadProcFactory.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/LoadProcFactory.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -31,7 +31,7 @@
             lt.SourceFile = new System.ComponentModel.BindingList<string>();
         }
 
-        internal static ILoadProcedure CreateDefaultSdf()
+        public static ILoadProcedure CreateDefaultSdf()
         {
             var proc = new LoadProcedure()
             {
@@ -41,7 +41,7 @@
             return proc;
         }
 
-        internal static ILoadProcedure CreateDefaultShp()
+        public static ILoadProcedure CreateDefaultShp()
         {
             var proc = new LoadProcedure()
             {
@@ -51,7 +51,7 @@
             return proc;
         }
 
-        internal static ILoadProcedure CreateDefaultDwf()
+        public static ILoadProcedure CreateDefaultDwf()
         {
             var proc = new LoadProcedure()
             {
@@ -73,11 +73,11 @@
 
 #if LP220
 
-        internal static ILoadProcedure CreateDefaultSqlite()
+        public static ILoadProcedure CreateDefaultSqlite()
         {
             var proc = new LoadProcedure()
             {
-                Item = new SqliteLoadProcedureType() { Generalization = 100.0 }
+                Item = new SQLiteLoadProcedureType() { Generalization = 100.0 }
             };
             ApplyDefaults(proc.Item);
             return proc;

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/ObjectFactory.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -39,6 +39,7 @@
 {
     public delegate ILayerDefinition LayerCreatorFunc(LayerType type);
     public delegate ILoadProcedure LoadProcCreatorFunc();
+    public delegate IWebLayout WebLayoutCreatorFunc(string mapDefinitionId);
 
     /// <summary>
     /// Factory class to create MapGuide resource objects with either pre-defined or
@@ -59,14 +60,18 @@
     {
         private static Dictionary<Version, LayerCreatorFunc> _layerFactories;
         private static Dictionary<LoadType, LoadProcCreatorFunc> _loadProcFactories;
+        private static Dictionary<Version, WebLayoutCreatorFunc> _wlFactories;
 
         static ObjectFactory()
         {
             _layerFactories = new Dictionary<Version,LayerCreatorFunc>();
+            _wlFactories = new Dictionary<Version, WebLayoutCreatorFunc>();
+            _loadProcFactories = new Dictionary<LoadType, LoadProcCreatorFunc>();
+
             _layerFactories.Add(
                 new Version(1, 0, 0),
                 new LayerCreatorFunc(OSGeo.MapGuide.ObjectModels.LayerDefinition_1_0_0.LdfEntryPoint.CreateDefault));
-            _loadProcFactories = new Dictionary<LoadType, LoadProcCreatorFunc>();
+            
             _loadProcFactories.Add(
                 LoadType.Sdf,
                 new LoadProcCreatorFunc(OSGeo.MapGuide.ObjectModels.LoadProcedure_1_0_0.LoadProcEntryPoint.CreateDefaultSdf));
@@ -76,6 +81,10 @@
             _loadProcFactories.Add(
                 LoadType.Dwf,
                 new LoadProcCreatorFunc(OSGeo.MapGuide.ObjectModels.LoadProcedure_1_0_0.LoadProcEntryPoint.CreateDefaultDwf));
+
+            _wlFactories.Add(
+                new Version(1, 0, 0),
+                new WebLayoutCreatorFunc(OSGeo.MapGuide.ObjectModels.WebLayout_1_0_0.WebLayoutEntryPoint.CreateDefault));
         }
 
         public static void RegisterLayerFactoryMethod(Version ver, LayerCreatorFunc method)
@@ -86,6 +95,35 @@
             _layerFactories[ver] = method;
         }
 
+        public static void RegisterLoadProcedureFactoryMethod(LoadType type, LoadProcCreatorFunc method)
+        {
+            if (_loadProcFactories.ContainsKey(type))
+                throw new ArgumentException("Factory method already registered for load procedure type: " + type); //LOCALIZEME
+
+            _loadProcFactories[type] = method;
+        }
+
+        public static void RegisterWebLayoutFactoryMethod(Version version, WebLayoutCreatorFunc method)
+        {
+            if (_wlFactories.ContainsKey(version))
+                throw new ArgumentException("Factory method already registered for version: " + version); //LOCALIZEME
+
+            _wlFactories[version] = method;
+        }
+
+        public static IWebLayout CreateWebLayout(IServerConnection owner, Version version, string mapDefinitionId)
+        {
+            Check.NotNull(owner, "owner");
+
+            if (!_wlFactories.ContainsKey(version))
+                throw new ArgumentException("Unknown web layout version: " + version.ToString()); //LOCALIZEME
+
+            var wl = _wlFactories[version](mapDefinitionId);
+            wl.CurrentConnection = owner;
+
+            return wl;
+        }
+
         public static ILayerDefinition CreateDefaultLayer(IServerConnection owner, LayerType type, Version version)
         {
             Check.NotNull(owner, "owner");
@@ -162,425 +200,6 @@
             return map;
         }
 
-        #region WebLayout helpers
-
-        private static BasicCommandType CreateBasicCommand(string label, string tooltip, string description, string iconName, TargetViewerType targets, BasicCommandActionType action)
-        {
-            var cmd = new BasicCommandType()
-            {
-                Name = action.ToString(),
-                Label = label,
-                Tooltip = tooltip,
-                Description = description,
-                
-                TargetViewer = targets,
-                Action = action
-            };
-
-            if (!string.IsNullOrEmpty(iconName))
-            {
-                cmd.ImageURL = "../stdicons/" + iconName + ".gif";
-                cmd.DisabledImageURL = "../stdicons/" + iconName + "_disabled.gif";
-            }
-
-            return cmd;
-        }
-
-        private static T CreateTargetedCommand<T>(string name, string label, string tooltip, string description, string iconName, TargetViewerType targets, TargetType target, string targetFrame) where T : TargetedCommandType, new()
-        {
-            var cmd = new T()
-            {
-                Name = name,
-                Label = label,
-                Tooltip = tooltip,
-                Description = description,
-                TargetViewer = targets,
-                Target = target,
-            };
-
-            if (!string.IsNullOrEmpty(targetFrame) && target == TargetType.SpecifiedFrame)
-            {
-                cmd.TargetFrame = targetFrame;
-            }
-
-            if (!string.IsNullOrEmpty(iconName))
-            {
-                cmd.ImageURL = "../stdicons/" + iconName + ".gif";
-                cmd.DisabledImageURL = "../stdicons/" + iconName + "_disabled.gif";
-            }
-
-            return cmd;
-        }
-
-        private static OSGeo.MapGuide.ObjectModels.WebLayout.FlyoutItemType CreateFlyout(
-            string label,
-            string tooltip,
-            string description,
-            string imageUrl,
-            string disabledImageUrl,
-            params UIItemType[] subItems)
-        {
-            return new OSGeo.MapGuide.ObjectModels.WebLayout.FlyoutItemType()
-            {
-                Function = UIItemFunctionType.Flyout,
-                Description = description,
-                DisabledImageURL = disabledImageUrl,
-                ImageURL = imageUrl,
-                Label = label,
-                SubItem = new System.ComponentModel.BindingList<UIItemType>(subItems),
-                Tooltip = tooltip
-            };
-        }
-
-        private static T CreateCommand<T>(string cmdName) where T : CommandItemType, new()
-        {
-            return new T() { Function = UIItemFunctionType.Command, Command = cmdName };
-        }
-
-        private static OSGeo.MapGuide.ObjectModels.WebLayout.SeparatorItemType CreateSeparator()
-        {
-            return new OSGeo.MapGuide.ObjectModels.WebLayout.SeparatorItemType() { Function = UIItemFunctionType.Separator };
-        }
-
-#endregion
-
-        public static WebLayoutType CreateWebLayout(IServerConnection owner, string mapDefinitionId)
-        {
-            Check.NotNull(owner, "owner");
-
-            //TODO: Localize these strings. Once localized we can have *translatable*
-            //web layouts!
-
-            var wl = new WebLayoutType()
-            {
-                CurrentConnection = owner,
-                CommandSet = new System.ComponentModel.BindingList<CommandType>()
-                {
-                    CreateBasicCommand("Pan", 
-                                       "Pan Mode",
-                                       "Drag the map to view areas out of range",
-                                       "icon_pan",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.Pan),
-                    CreateBasicCommand("Pan Up",
-                                       "Pan Up",
-                                       "Pan up by a preset increment",
-                                       "icon_panup",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.PanUp),
-                    CreateBasicCommand("Pan Down",
-                                       "Pan Down",
-                                       "Pan down by a preset increment",
-                                       "icon_pandown",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.PanDown),
-                    CreateBasicCommand("Pan Right",
-                                       "Pan Right",
-                                       "Pan right by a preset increment",
-                                       "icon_panright",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.PanRight),
-                    CreateBasicCommand("Pan Left",
-                                       "Pan Left",
-                                       "Pan left by a preset increment",
-                                       "icon_panleft",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.PanLeft),
-                    CreateBasicCommand("Zoom",
-                                       "Zoom Dynamic",
-                                       "Zoom dynamically by clicking and dragging",
-                                       "icon_zoom",
-                                       TargetViewerType.Dwf,
-                                       BasicCommandActionType.Zoom),
-                    CreateBasicCommand("Zoom In",
-                                       "Zoom In",
-                                       "Zoom in by a preset increment",
-                                       "icon_zoomin",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.ZoomIn),
-                    CreateBasicCommand("Zoom Out",
-                                       "Zoom Out",
-                                       "Zoom out by a preset increment",
-                                       "icon_zoomout",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.ZoomOut),
-                    CreateBasicCommand("Zoom Rectangle",
-                                       "Zoom Rectangle",
-                                       "Zoom in on an area",
-                                       "icon_zoomrect",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.ZoomRectangle),
-                    CreateBasicCommand("Zoom Selection",
-                                       "Zoom to selection",
-                                       "Zoom to extents of selected features",
-                                       "icon_zoomselect",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.ZoomToSelection),
-                    CreateBasicCommand("Initial Map View",
-                                       "Initial Map View",
-                                       "Fit the extents of the map to the window",
-                                       "icon_fitwindow",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.FitToWindow),
-                    CreateBasicCommand("Previous View",
-                                       "Previous View",
-                                       "Go to previous view",
-                                       "icon_zoomprev",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.PreviousView),
-                    CreateBasicCommand("Next View",
-                                       "Next View",
-                                       "Go to next view",
-                                       "icon_zoomnext",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.NextView),
-                    CreateBasicCommand("Initial Center and Scale",
-                                       "Initial Center and Scale",
-                                       "Zoom to initial map center and scale",
-                                       "icon_restorecenter.gif",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.RestoreView),
-                    CreateBasicCommand("Select",
-                                       "Select Mode",
-                                       "Select features by clicking and dragging",
-                                       "icon_select",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.Select),
-                    CreateBasicCommand("Select Radius",
-                                       "Select Radius",
-                                       "Click and drag to select all features inside the circle",
-                                       "icon_selectradius",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.SelectRadius),
-                    CreateBasicCommand("Select Polygon",
-                                       "Select Polygon",
-                                       "Create a polygon to select all features that fall within",
-                                       "icon_selectpolygon",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.SelectPolygon),
-                    CreateBasicCommand("Clear Selection",
-                                       "Clear Selection",
-                                       "Clear the current selections",
-                                       "icon_clearselect",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.ClearSelection),
-                    CreateBasicCommand("Refresh Map",
-                                       "Refresh Map",
-                                       "Refresh map to reload all layers keeping current center and scale",
-                                       "icon_refreshmap",
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.Refresh),
-                    CreateBasicCommand("Copy",
-                                       "Copy",
-                                       "Copy current view of map to clipboard",
-                                       "icon_copy",
-                                       TargetViewerType.Dwf,
-                                       BasicCommandActionType.CopyMap),
-                    CreateBasicCommand("About",
-                                       "About",
-                                       "Display information about this application",
-                                       null,
-                                       TargetViewerType.All,
-                                       BasicCommandActionType.About),
-                    CreateTargetedCommand<BufferCommandType>(BuiltInCommandType.Buffer.ToString(),
-                                                             "Buffer",
-                                                             "Buffer",
-                                                             "Create buffers around the selected features",
-                                                             "icon_buffer",
-                                                             TargetViewerType.All,
-                                                             TargetType.TaskPane, 
-                                                             null),
-                    CreateTargetedCommand<SelectWithinCommandType>(BuiltInCommandType.SelectWithin.ToString(),
-                                                             "Select Within",
-                                                             "Select Within",
-                                                             "Select features that fall within currently selected areas",
-                                                             "icon_selectwithin",
-                                                             TargetViewerType.All,
-                                                             TargetType.TaskPane, 
-                                                             null),
-                    CreateTargetedCommand<MeasureCommandType>(BuiltInCommandType.Measure.ToString(),
-                                                              "Measure",
-                                                              "Measure",
-                                                              "Measure distances on the map",
-                                                              "icon_measure",
-                                                              TargetViewerType.All,
-                                                              TargetType.TaskPane,
-                                                              null),
-                    new PrintCommandType() 
-                    {
-                        Name = "Print",
-                        Label = "Print",
-                        Tooltip = "Print",
-                        Description = "Print with optional layout",
-                        ImageURL = "../stdicons/icon_print.gif",
-                        DisabledImageURL = "../stdicons/icon_print_disabled.gif",
-                        TargetViewer = TargetViewerType.Dwf
-                    },
-                    CreateTargetedCommand<ViewOptionsCommandType>(BuiltInCommandType.ViewOptions.ToString(),
-                                                                  "View Options",
-                                                                  "View Options",
-                                                                  "View Options",
-                                                                  "icon_viewoptions",
-                                                                  TargetViewerType.All, 
-                                                                  TargetType.TaskPane,
-                                                                  null),
-                    CreateTargetedCommand<GetPrintablePageCommandType>(BuiltInCommandType.GetPrintablePage.ToString(),
-                                                                  "Get Printable Page",
-                                                                  "Get Printable Page",
-                                                                  "Get Printer-friendly page",
-                                                                  "icon_printablepage",
-                                                                  TargetViewerType.Ajax,
-                                                                  TargetType.NewWindow,
-                                                                  null),
-                    new HelpCommandType()
-                    {
-                        Name = BuiltInCommandType.Help.ToString(),
-                        Label = "Help",
-                        Tooltip = "Help",
-                        Description = "Launch help for this application", 
-                        ImageURL = "../stdicons/icon_help.gif",
-                        DisabledImageURL = "../stdicons/icon_help_disabled.gif",
-                        TargetViewer = TargetViewerType.All,
-                        Target = TargetType.TaskPane
-                    },
-
-                },
-                ContextMenu = new ContextMenuType()
-                {
-                    Visible = true,
-                    MenuItem = new System.ComponentModel.BindingList<UIItemType>()
-                    {
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Select.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ClearSelection.ToString()),
-                        CreateFlyout("Select More", null, null, null, null, 
-                            CreateCommand<CommandItemType>(BuiltInCommandType.SelectRadius.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.SelectPolygon.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.SelectWithin.ToString())
-                        ),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Pan.ToString()),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ZoomRectangle.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ZoomIn.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ZoomOut.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Zoom.ToString()),
-                        CreateFlyout("Zoom", null, null, null, null,
-                            CreateCommand<CommandItemType>(BuiltInCommandType.PreviousView.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.NextView.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.FitToWindow.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.RestoreView.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.ZoomToSelection.ToString())
-                        ),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Measure.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Buffer.ToString()),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Refresh.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.CopyMap.ToString()),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Print.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.GetPrintablePage.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ViewOptions.ToString()),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Help.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.About.ToString())
-                    }
-                },
-                InformationPane = new InformationPaneType()
-                {
-                    LegendVisible = true,
-                    PropertiesVisible = true,
-                    Visible = true,
-                    Width = 200
-                },
-                Map = new OSGeo.MapGuide.ObjectModels.WebLayout.MapType()
-                {
-                    HyperlinkTarget = TargetType.TaskPane,
-                    ResourceId = mapDefinitionId,
-                    //null InitialView = Use map's initial view
-                },
-                StatusBar = new StatusBarType()
-                {
-                    Visible = true
-                },
-                TaskPane = new TaskPaneType()
-                {
-                    TaskBar = new TaskBarType()
-                    {
-                        Back = new TaskButtonType()
-                        {
-                            Name = "Back",
-                            Tooltip = "Return to previous task page",
-                            Description = "Return to previous task page",
-                            ImageURL = "../stdicons/icon_back.gif",
-                            DisabledImageURL = "../stdicons/icon_back_disabled.gif"
-                        },
-                        Forward = new TaskButtonType()
-                        {
-                            Name = "Forward",
-                            Tooltip = "Forward to next task page",
-                            Description = "Forward to next task page",
-                            ImageURL = "../stdicons/icon_forward.gif",
-                            DisabledImageURL = "../stdicons/icon_forward_disabled.gif"
-                        },
-                        Home = new TaskButtonType()
-                        {
-                            Name = "Home",
-                            Tooltip = "Return to home task page",
-                            Description = "Return to home task page",
-                            ImageURL = "../stdicons/icon_home.gif",
-                            DisabledImageURL = "../stdicons/icon_home_disabled.gif"
-                        },
-                        //Task Pane menu buttons
-                        MenuButton = new System.ComponentModel.BindingList<UIItemType>(),
-                        Tasks = new TaskButtonType()
-                        {
-                            Name = "Tasks",
-                            Tooltip = "Task list",
-                            Description = "View a list of available tasks",
-                            ImageURL = "../stdicons/icon_tasks.gif",
-                            DisabledImageURL = "../stdicons/icon_tasks_disabled.gif"
-                        },
-                        Visible = true,
-                    },
-                    Visible = true,
-                    Width = 250,
-                },
-                Title = string.Empty,
-                ToolBar = new ToolBarType()
-                {
-                    Visible = true,
-                    Button = new System.ComponentModel.BindingList<UIItemType>()
-                    {
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Print.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.GetPrintablePage.ToString()),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Measure.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Buffer.ToString()),
-                        CreateSeparator(),
-                        CreateFlyout("Zoom", null, null, null, null,
-                            CreateCommand<CommandItemType>(BuiltInCommandType.PreviousView.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.NextView.ToString()),
-                            CreateCommand<CommandItemType>(BuiltInCommandType.RestoreView.ToString())
-                        ),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ZoomRectangle.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ZoomIn.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.ZoomOut.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Zoom.ToString()),
-                        CreateSeparator(),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Select.ToString()),
-                        CreateCommand<CommandItemType>(BuiltInCommandType.Pan.ToString())
-                    }
-                },
-                ZoomControl = new ZoomControlType()
-                {
-                    Visible = true
-                },
-            };
-
-            return wl;
-        }
-
         public static SimpleSymbolDefinition CreateSimpleSymbol(IServerConnection owner)
         {
             Check.NotNull(owner, "owner");
@@ -804,40 +423,6 @@
             };
         }
 
-        public static InvokeURLCommandType CreateInvokeUrlCommand()
-        {
-            return new InvokeURLCommandType()
-            {
-                Target = TargetType.TaskPane,
-                DisableIfSelectionEmpty = false,
-                ImageURL = "../stdicons/icon_invokeurl.gif",
-                DisabledImageURL = "../stdicons/icon_invokeurl_disabled.gif",
-                TargetViewer = TargetViewerType.All
-            };
-        }
-
-        public static SearchCommandType CreateSearchCommand()
-        {
-            return new SearchCommandType()
-            {
-                ResultColumns = new System.ComponentModel.BindingList<ResultColumnType>(),
-                Target = TargetType.TaskPane,
-                TargetViewer = TargetViewerType.All,
-                DisabledImageURL = "../stdicons/icon_search_disabled.gif",
-                ImageURL = "../stdicons/icon_search.gif"
-            };
-        }
-
-        public static InvokeScriptCommandType CreateInvokeScriptCommand()
-        {
-            return new InvokeScriptCommandType()
-            {
-                DisabledImageURL = "../stdicons/icon_invokescript_disabled.gif",
-                ImageURL = "../stdicons/icon_invokescript.gif",
-                TargetViewer = TargetViewerType.All
-            };
-        }
-
         public static IFeatureSourceExtension CreateFeatureSourceExtension()
         {
             return new FeatureSourceTypeExtension()

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayout.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayout.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayout.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -23,54 +23,44 @@
 using OSGeo.MapGuide.MaestroAPI.Resource;
 using System.Xml.Serialization;
 using OSGeo.MapGuide.MaestroAPI;
+using OSGeo.MapGuide.ObjectModels.WebLayout;
+using System.ComponentModel;
+using System.IO;
 
-namespace OSGeo.MapGuide.ObjectModels.WebLayout
+#if WL110
+namespace OSGeo.MapGuide.ObjectModels.WebLayout_1_1_0
+#else
+namespace OSGeo.MapGuide.ObjectModels.WebLayout_1_0_0
+#endif
 {
-    /// <summary>
-    /// Encompasses all built-in commands usable by the web layout (AJAX and DWF)
-    /// </summary>
-    public enum BuiltInCommandType : int
+    public static class WebLayoutEntryPoint
     {
-        Pan = BasicCommandActionType.Pan,
-        PanUp = BasicCommandActionType.PanUp,
-        PanDown = BasicCommandActionType.PanDown,
-        PanRight = BasicCommandActionType.PanRight,
-        PanLeft=  BasicCommandActionType.PanLeft,
-        Zoom = BasicCommandActionType.Zoom,
-        ZoomIn = BasicCommandActionType.ZoomIn,
-        ZoomOut = BasicCommandActionType.ZoomOut,
-        ZoomRectangle = BasicCommandActionType.ZoomRectangle,
-        ZoomToSelection = BasicCommandActionType.ZoomToSelection,
-        FitToWindow = BasicCommandActionType.FitToWindow,
-        PreviousView = BasicCommandActionType.PreviousView,
-        NextView = BasicCommandActionType.NextView,
-        RestoreView = BasicCommandActionType.RestoreView,
-        Select = BasicCommandActionType.Select,
-        SelectRadius = BasicCommandActionType.SelectRadius,
-        SelectPolygon = BasicCommandActionType.SelectPolygon,
-        ClearSelection = BasicCommandActionType.ClearSelection,
-        Refresh = BasicCommandActionType.Refresh,
-        CopyMap = BasicCommandActionType.CopyMap,
-        About = BasicCommandActionType.About,
-        Buffer,
-        SelectWithin,
-        Print,
-        GetPrintablePage,
-        Measure,
-        ViewOptions,
-        Help,
-    }
+        public static IWebLayout CreateDefault(string mapDefinitionId)
+        {
+            IWebLayout wl = WebLayoutType.CreateDefault(mapDefinitionId);
+            return wl;
+        }
 
-    public interface IWebLayout : IResource
-    {
-        
+        public static IResource Deserialize(string xml)
+        {
+            return WebLayoutType.Deserialize(xml);
+        }
+
+        public static Stream Serialize(IResource res)
+        {
+            return res.SerializeToStream();
+        }
     }
 
-    partial class WebLayoutType : IWebLayout
+    partial class WebLayoutType : IWebLayout, ICommandSet
     {
         internal WebLayoutType() { }
 
+#if WL110
+        private static readonly Version RES_VERSION = new Version(1, 1, 0);
+#else
         private static readonly Version RES_VERSION = new Version(1, 0, 0);
+#endif
 
         [XmlIgnore]
         public OSGeo.MapGuide.MaestroAPI.IServerConnection CurrentConnection
@@ -126,9 +116,13 @@
         }
 
         [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
-        public string ValidatingSchema 
-        { 
+        public string ValidatingSchema
+        {
+#if WL110
+            get { return "WebLayout-1.1.0.xsd"; }
+#else
             get { return "WebLayout-1.0.0.xsd"; }
+#endif
             set { }
         }
 
@@ -137,7 +131,386 @@
         {
             get { return true; }
         }
-        
+
+        public static IWebLayout CreateDefault(string mapDefinitionId)
+        {
+            //TODO: Localize these strings. Once localized we can have *translatable*
+            //web layouts!
+
+            IWebLayout wl = new WebLayoutType()
+            {
+                CommandSet = new System.ComponentModel.BindingList<CommandType>(),
+                ContextMenu = new ContextMenuType()
+                {
+                    Visible = true,
+                    MenuItem = new System.ComponentModel.BindingList<UIItemType>()
+                },
+                InformationPane = new InformationPaneType()
+                {
+                    LegendVisible = true,
+                    PropertiesVisible = true,
+                    Visible = true,
+                    Width = 200
+                },
+                Map = new MapType()
+                {
+                    HyperlinkTarget = TargetType.TaskPane,
+                    ResourceId = mapDefinitionId,
+                    //null InitialView = Use map's initial view
+                },
+                StatusBar = new StatusBarType()
+                {
+                    Visible = true
+                },
+                TaskPane = new TaskPaneType()
+                {
+                    TaskBar = new TaskBarType()
+                    {
+                        Back = new TaskButtonType()
+                        {
+                            Name = "Back",
+                            Tooltip = "Return to previous task page",
+                            Description = "Return to previous task page",
+                            ImageURL = "../stdicons/icon_back.gif",
+                            DisabledImageURL = "../stdicons/icon_back_disabled.gif"
+                        },
+                        Forward = new TaskButtonType()
+                        {
+                            Name = "Forward",
+                            Tooltip = "Forward to next task page",
+                            Description = "Forward to next task page",
+                            ImageURL = "../stdicons/icon_forward.gif",
+                            DisabledImageURL = "../stdicons/icon_forward_disabled.gif"
+                        },
+                        Home = new TaskButtonType()
+                        {
+                            Name = "Home",
+                            Tooltip = "Return to home task page",
+                            Description = "Return to home task page",
+                            ImageURL = "../stdicons/icon_home.gif",
+                            DisabledImageURL = "../stdicons/icon_home_disabled.gif"
+                        },
+                        //Task Pane menu buttons
+                        MenuButton = new System.ComponentModel.BindingList<UIItemType>(),
+                        Tasks = new TaskButtonType()
+                        {
+                            Name = "Tasks",
+                            Tooltip = "Task list",
+                            Description = "View a list of available tasks",
+                            ImageURL = "../stdicons/icon_tasks.gif",
+                            DisabledImageURL = "../stdicons/icon_tasks_disabled.gif"
+                        },
+                        Visible = true,
+                    },
+                    Visible = true,
+                    Width = 250,
+                },
+                Title = string.Empty,
+                ToolBar = new ToolBarType()
+                {
+                    Visible = true,
+                    Button = new System.ComponentModel.BindingList<UIItemType>()
+                },
+                ZoomControl = new ZoomControlType()
+                {
+                    Visible = true
+                },
+            };
+
+            CreateDefaultCommandSet(wl);
+            CreateDefaultContextMenu(wl);
+            CreateDefaultToolbar(wl);
+
+            return wl;
+        }
+
+        private static void CreateDefaultToolbar(IWebLayout wl)
+        {
+            wl.ToolBar.AddItems(
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.Print.ToString()),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.GetPrintablePage.ToString()),
+            wl.CreateSeparator(),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.Measure.ToString()),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.Buffer.ToString()),
+            wl.CreateSeparator(),
+            wl.CreateFlyout("Zoom", null, null, null, null,
+                wl.CreateCommand<CommandItemType>(BuiltInCommandType.PreviousView.ToString()),
+                wl.CreateCommand<CommandItemType>(BuiltInCommandType.NextView.ToString()),
+                wl.CreateCommand<CommandItemType>(BuiltInCommandType.RestoreView.ToString())
+            ),
+            wl.CreateSeparator(),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.ZoomRectangle.ToString()),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.ZoomIn.ToString()),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.ZoomOut.ToString()),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.Zoom.ToString()),
+            wl.CreateSeparator(),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.Select.ToString()),
+            wl.CreateCommand<CommandItemType>(BuiltInCommandType.Pan.ToString())
+            );
+        }
+        private static void CreateDefaultContextMenu(IWebLayout wl)
+        {
+            wl.ContextMenu.AddItems(
+                            wl.CreateCommand<CommandItemType>(BuiltInCommandType.Select.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.ClearSelection.ToString()),
+                                wl.CreateFlyout("Select More", null, null, null, null,
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.SelectRadius.ToString()),
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.SelectPolygon.ToString()),
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.SelectWithin.ToString())
+                                ),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.Pan.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.ZoomRectangle.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.ZoomIn.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.ZoomOut.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.Zoom.ToString()),
+                                wl.CreateFlyout("Zoom", null, null, null, null,
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.PreviousView.ToString()),
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.NextView.ToString()),
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.FitToWindow.ToString()),
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.RestoreView.ToString()),
+                                    wl.CreateCommand<CommandItemType>(BuiltInCommandType.ZoomToSelection.ToString())
+                                ),
+                                wl.CreateSeparator(),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.Measure.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.Buffer.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.Refresh.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.CopyMap.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.Print.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.GetPrintablePage.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.ViewOptions.ToString()),
+                                wl.CreateSeparator(),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.Help.ToString()),
+                                wl.CreateCommand<CommandItemType>(BuiltInCommandType.About.ToString())
+                                );
+        }
+
+        private static void CreateDefaultCommandSet(IWebLayout wl)
+        {
+            wl.CommandSet.AddCommand(
+                            wl.CreateBasicCommand("Pan",
+                                               "Pan Mode",
+                                               "Drag the map to view areas out of range",
+                                               "icon_pan",
+                                               TargetViewerType.All,
+                                               BasicCommandActionType.Pan));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Pan Up",
+                               "Pan Up",
+                               "Pan up by a preset increment",
+                               "icon_panup",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanUp));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Pan Down",
+                               "Pan Down",
+                               "Pan down by a preset increment",
+                               "icon_pandown",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanDown));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Pan Right",
+                               "Pan Right",
+                               "Pan right by a preset increment",
+                               "icon_panright",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanRight));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Pan Left",
+                               "Pan Left",
+                               "Pan left by a preset increment",
+                               "icon_panleft",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PanLeft));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Zoom",
+                               "Zoom Dynamic",
+                               "Zoom dynamically by clicking and dragging",
+                               "icon_zoom",
+                               TargetViewerType.Dwf,
+                               BasicCommandActionType.Zoom));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Zoom In",
+                               "Zoom In",
+                               "Zoom in by a preset increment",
+                               "icon_zoomin",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomIn));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Zoom Out",
+                               "Zoom Out",
+                               "Zoom out by a preset increment",
+                               "icon_zoomout",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomOut));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Zoom Rectangle",
+                               "Zoom Rectangle",
+                               "Zoom in on an area",
+                               "icon_zoomrect",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomRectangle));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Zoom Selection",
+                               "Zoom to selection",
+                               "Zoom to extents of selected features",
+                               "icon_zoomselect",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ZoomToSelection));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Initial Map View",
+                               "Initial Map View",
+                               "Fit the extents of the map to the window",
+                               "icon_fitwindow",
+                               TargetViewerType.All,
+                               BasicCommandActionType.FitToWindow));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Previous View",
+                               "Previous View",
+                               "Go to previous view",
+                               "icon_zoomprev",
+                               TargetViewerType.All,
+                               BasicCommandActionType.PreviousView));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Next View",
+                               "Next View",
+                               "Go to next view",
+                               "icon_zoomnext",
+                               TargetViewerType.All,
+                               BasicCommandActionType.NextView));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Initial Center and Scale",
+                               "Initial Center and Scale",
+                               "Zoom to initial map center and scale",
+                               "icon_restorecenter.gif",
+                               TargetViewerType.All,
+                               BasicCommandActionType.RestoreView));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Select",
+                               "Select Mode",
+                               "Select features by clicking and dragging",
+                               "icon_select",
+                               TargetViewerType.All,
+                               BasicCommandActionType.Select));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Select Radius",
+                               "Select Radius",
+                               "Click and drag to select all features inside the circle",
+                               "icon_selectradius",
+                               TargetViewerType.All,
+                               BasicCommandActionType.SelectRadius));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Select Polygon",
+                               "Select Polygon",
+                               "Create a polygon to select all features that fall within",
+                               "icon_selectpolygon",
+                               TargetViewerType.All,
+                               BasicCommandActionType.SelectPolygon));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Clear Selection",
+                               "Clear Selection",
+                               "Clear the current selections",
+                               "icon_clearselect",
+                               TargetViewerType.All,
+                               BasicCommandActionType.ClearSelection));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Refresh Map",
+                               "Refresh Map",
+                               "Refresh map to reload all layers keeping current center and scale",
+                               "icon_refreshmap",
+                               TargetViewerType.All,
+                               BasicCommandActionType.Refresh));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("Copy",
+                               "Copy",
+                               "Copy current view of map to clipboard",
+                               "icon_copy",
+                               TargetViewerType.Dwf,
+                               BasicCommandActionType.CopyMap));
+            wl.CommandSet.AddCommand(
+            wl.CreateBasicCommand("About",
+                               "About",
+                               "Display information about this application",
+                               null,
+                               TargetViewerType.All,
+                               BasicCommandActionType.About));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<BufferCommandType>(BuiltInCommandType.Buffer.ToString(),
+                                                     "Buffer",
+                                                     "Buffer",
+                                                     "Create buffers around the selected features",
+                                                     "icon_buffer",
+                                                     TargetViewerType.All,
+                                                     TargetType.TaskPane,
+                                                     null));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<SelectWithinCommandType>(BuiltInCommandType.SelectWithin.ToString(),
+                                                     "Select Within",
+                                                     "Select Within",
+                                                     "Select features that fall within currently selected areas",
+                                                     "icon_selectwithin",
+                                                     TargetViewerType.All,
+                                                     TargetType.TaskPane,
+                                                     null));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<MeasureCommandType>(BuiltInCommandType.Measure.ToString(),
+                                                      "Measure",
+                                                      "Measure",
+                                                      "Measure distances on the map",
+                                                      "icon_measure",
+                                                      TargetViewerType.All,
+                                                      TargetType.TaskPane,
+                                                      null));
+            wl.CommandSet.AddCommand(
+            new PrintCommandType()
+            {
+                Name = "Print",
+                Label = "Print",
+                Tooltip = "Print",
+                Description = "Print with optional layout",
+                ImageURL = "../stdicons/icon_print.gif",
+                DisabledImageURL = "../stdicons/icon_print_disabled.gif",
+                TargetViewer = TargetViewerType.Dwf
+            });
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<ViewOptionsCommandType>(BuiltInCommandType.ViewOptions.ToString(),
+                                                          "View Options",
+                                                          "View Options",
+                                                          "View Options",
+                                                          "icon_viewoptions",
+                                                          TargetViewerType.All,
+                                                          TargetType.TaskPane,
+                                                          null));
+            wl.CommandSet.AddCommand(
+            wl.CreateTargetedCommand<GetPrintablePageCommandType>(BuiltInCommandType.GetPrintablePage.ToString(),
+                                                          "Get Printable Page",
+                                                          "Get Printable Page",
+                                                          "Get Printer-friendly page",
+                                                          "icon_printablepage",
+                                                          TargetViewerType.Ajax,
+                                                          TargetType.NewWindow,
+                                                          null));
+            wl.CommandSet.AddCommand(
+            new HelpCommandType()
+            {
+                Name = BuiltInCommandType.Help.ToString(),
+                Label = "Help",
+                Tooltip = "Help",
+                Description = "Launch help for this application",
+                ImageURL = "../stdicons/icon_help.gif",
+                DisabledImageURL = "../stdicons/icon_help_disabled.gif",
+                TargetViewer = TargetViewerType.All,
+                Target = TargetType.TaskPane
+            });
+        }
+
+        public IMapView CreateDefaultView()
+        {
+            return new MapViewType();
+        }
+
         /// <summary>
         /// Indicates whether a given command is referenced in the user interface
         /// </summary>
@@ -148,17 +521,17 @@
         {
             region = new WebLayoutRegion[0];
             List<WebLayoutRegion> regions = new List<WebLayoutRegion>();
-            if (FindCommand(name, contextMenuField.MenuItem))
+            if (FindCommand(name, this.ContextMenu))
             {
                 regions.Add(WebLayoutRegion.ContextMenu);
             }
 
-            if (FindCommand(name, toolBarField.Button))
+            if (FindCommand(name, this.ToolBar))
             {
                 regions.Add(WebLayoutRegion.Toolbar);
             }
 
-            if (FindCommand(name, taskPaneField.TaskBar.MenuButton))
+            if (FindCommand(name, this.TaskPane.TaskBar))
             {
                 regions.Add(WebLayoutRegion.TaskBar);
             }
@@ -213,7 +586,7 @@
             return foundCount;
         }
 
-        public CommandType GetCommandByName(string cmdName)
+        public ICommand GetCommandByName(string cmdName)
         {
             foreach (var cmd in this.CommandSet)
             {
@@ -224,7 +597,7 @@
             return null;
         }
 
-        public IEnumerable<CommandType> GetCustomCommands()
+        public IEnumerable<ICommand> GetCustomCommands()
         {
             foreach (var cmd in this.CommandSet)
             {
@@ -238,9 +611,9 @@
             }
         }
 
-        private bool FindCommand(string name, IEnumerable<UIItemType> items)
+        public bool FindCommand(string name, IMenu menu)
         {
-            foreach (var item in items)
+            foreach (var item in menu.Items)
             {
                 if (item.Function == UIItemFunctionType.Command)
                 {
@@ -249,17 +622,658 @@
                 }
                 else if (item.Function == UIItemFunctionType.Flyout)
                 {
-                    return FindCommand(name, ((FlyoutItemType)item).SubItem);
+                    return FindCommand(name, ((IFlyoutItem)item));
                 }
             }
             return false;
         }
+
+        public IBasicCommand CreateBasicCommand(string label, string tooltip, string description, string iconName, TargetViewerType targets, BasicCommandActionType action)
+        {
+            var cmd = new BasicCommandType()
+            {
+                Name = action.ToString(),
+                Label = label,
+                Tooltip = tooltip,
+                Description = description,
+
+                TargetViewer = targets,
+                Action = action
+            };
+
+            if (!string.IsNullOrEmpty(iconName))
+            {
+                cmd.ImageURL = "../stdicons/" + iconName + ".gif";
+                cmd.DisabledImageURL = "../stdicons/" + iconName + "_disabled.gif";
+            }
+
+            return cmd;
+        }
+
+        public IInvokeUrlCommand CreateInvokeUrlCommand()
+        {
+            return new InvokeURLCommandType()
+            {
+                Target = TargetType.TaskPane,
+                DisableIfSelectionEmpty = false,
+                ImageURL = "../stdicons/icon_invokeurl.gif",
+                DisabledImageURL = "../stdicons/icon_invokeurl_disabled.gif",
+                TargetViewer = TargetViewerType.All
+            };
+        }
+
+        public ISearchCommand CreateSearchCommand()
+        {
+            return new SearchCommandType()
+            {
+                ResultColumns = new System.ComponentModel.BindingList<ResultColumnType>(),
+                Target = TargetType.TaskPane,
+                TargetViewer = TargetViewerType.All,
+                DisabledImageURL = "../stdicons/icon_search_disabled.gif",
+                ImageURL = "../stdicons/icon_search.gif"
+            };
+        }
+
+        public IInvokeScriptCommand CreateInvokeScriptCommand()
+        {
+            return new InvokeScriptCommandType()
+            {
+                DisabledImageURL = "../stdicons/icon_invokescript_disabled.gif",
+                ImageURL = "../stdicons/icon_invokescript.gif",
+                TargetViewer = TargetViewerType.All
+            };
+        }
+
+        public T CreateTargetedCommand<T>(string name, string label, string tooltip, string description, string iconName, TargetViewerType targets, TargetType target, string targetFrame) where T : ITargetedCommand, new()
+        {
+            var cmd = new T()
+            {
+                Name = name,
+                Label = label,
+                Tooltip = tooltip,
+                Description = description,
+                TargetViewer = targets,
+                Target = target,
+            };
+
+            if (!string.IsNullOrEmpty(targetFrame) && target == TargetType.SpecifiedFrame)
+            {
+                cmd.TargetFrame = targetFrame;
+            }
+
+            if (!string.IsNullOrEmpty(iconName))
+            {
+                cmd.ImageURL = "../stdicons/" + iconName + ".gif";
+                cmd.DisabledImageURL = "../stdicons/" + iconName + "_disabled.gif";
+            }
+
+            return cmd;
+        }
+
+        public IFlyoutItem CreateFlyout(
+            string label,
+            string tooltip,
+            string description,
+            string imageUrl,
+            string disabledImageUrl,
+            params IUIItem[] subItems)
+        {
+            IFlyoutItem flyout = new FlyoutItemType()
+            {
+                Function = UIItemFunctionType.Flyout,
+                Description = description,
+                DisabledImageURL = disabledImageUrl,
+                ImageURL = imageUrl,
+                Label = label,
+                SubItem = new System.ComponentModel.BindingList<UIItemType>(),
+                Tooltip = tooltip
+            };
+            flyout.AddItems(subItems);
+            return flyout;
+        }
+
+        public T CreateCommand<T>(string cmdName) where T : ICommandItem, new()
+        {
+            return new T() { Function = UIItemFunctionType.Command, Command = cmdName };
+        }
+
+        public ISeparatorItem CreateSeparator()
+        {
+            return new SeparatorItemType() { Function = UIItemFunctionType.Separator };
+        }
+
+        ICommandSet IWebLayout.CommandSet
+        {
+            get { return this; }
+        }
+
+
+        void ICommandSet.Clear()
+        {
+            this.CommandSet.Clear();
+        }
+
+        int ICommandSet.CommandCount
+        {
+            get { return this.CommandSet.Count; }
+        }
+
+        IEnumerable<ICommand> ICommandSet.Commands
+        {
+            get
+            {
+                foreach (var cmd in this.CommandSet)
+                {
+                    yield return cmd;
+                }
+            }
+        }
+
+        void ICommandSet.AddCommand(ICommand cmd)
+        {
+            var c = cmd as CommandType;
+            if (c != null)
+            {
+                this.CommandSet.Add(c);
+                OnPropertyChanged("CommandSet");
+            }
+        }
+
+        void ICommandSet.RemoveCommand(ICommand cmd)
+        {
+            var c = cmd as CommandType;
+            if (c != null)
+            {
+                this.CommandSet.Remove(c);
+                OnPropertyChanged("CommandSet");
+            }
+        }
+
+        string IWebLayout.Title
+        {
+            get
+            {
+                throw new NotImplementedException();
+            }
+            set
+            {
+                throw new NotImplementedException();
+            }
+        }
+
+        IMap IWebLayout.Map
+        {
+            get { return this.Map; }
+        }
+
+        ITaskPane IWebLayout.TaskPane
+        {
+            get { return this.TaskPane; }
+        }
+
+        IToolbar IWebLayout.ToolBar
+        {
+            get { return this.ToolBar; }
+        }
+
+        IInformationPane IWebLayout.InformationPane
+        {
+            get { return this.InformationPane; }
+        }
+
+        IContextMenu IWebLayout.ContextMenu
+        {
+            get { return this.ContextMenu; }
+        }
+
+        IStatusBar IWebLayout.StatusBar
+        {
+            get { return this.StatusBar; }
+        }
+
+        IZoomControl IWebLayout.ZoomControl
+        {
+            get { return this.ZoomControl; }
+        }
     }
 
-    public enum WebLayoutRegion
+    partial class TaskPaneType : ITaskPane
     {
-        ContextMenu,
-        Toolbar,
-        TaskBar
+        ITaskBar ITaskPane.TaskBar
+        {
+            get
+            {
+                return this.TaskBar;
+            }
+        }
     }
+
+    partial class MapType : IMap
+    {
+
+        IMapView IMap.InitialView
+        {
+            get
+            {
+                return this.InitialView;
+            }
+            set
+            {
+                this.InitialView = (MapViewType)value;
+            }
+        }
+    }
+
+    partial class MapViewType : IMapView
+    {
+
+    }
+
+    partial class ToolBarType : IToolbar
+    {
+        public int ItemCount
+        {
+            get { return this.Button.Count; }
+        }
+
+        public IEnumerable<IUIItem> Items
+        {
+            get 
+            {
+                foreach (var item in this.Button)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.Button.Add(it);
+                OnPropertyChanged("Button");
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.Button.Remove(it);
+                OnPropertyChanged("Button");
+            }
+        }
+    }
+
+    partial class InformationPaneType : IInformationPane
+    {
+
+    }
+
+    partial class ContextMenuType : IContextMenu
+    {
+        public int ItemCount
+        {
+            get { return this.MenuItem.Count; }
+        }
+
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var item in this.MenuItem)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuItem.Add(it);
+                OnPropertyChanged("MenuItem");
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuItem.Remove(it);
+                OnPropertyChanged("MenuItem");
+            }
+        }
+    }
+
+    partial class TaskBarType : ITaskBar
+    {
+        public int ItemCount
+        {
+            get { return this.MenuButton.Count; }
+        }
+
+        public IEnumerable<IUIItem> Items
+        {
+            get
+            {
+                foreach (var item in this.MenuButton)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuButton.Add(it);
+                OnPropertyChanged("MenuButton");
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var it = item as UIItemType;
+            if (it != null)
+            {
+                this.MenuButton.Remove(it);
+                OnPropertyChanged("MenuButton");
+            }
+        }
+
+        ITaskButton ITaskBar.Home
+        {
+            get { return this.Home; }
+        }
+
+        ITaskButton ITaskBar.Forward
+        {
+            get { return this.Forward; }
+        }
+
+        ITaskButton ITaskBar.Back
+        {
+            get { return this.Back; }
+        }
+
+        ITaskButton ITaskBar.Tasks
+        {
+            get { return this.Tasks; }
+        }
+    }
+
+    partial class TaskButtonType : ITaskButton
+    {
+        
+    }
+
+    partial class StatusBarType : IStatusBar
+    {
+    }
+
+    partial class ZoomControlType : IZoomControl
+    {
+    }
+
+    partial class CommandType : ICommand
+    {
+    }
+
+    partial class ResourceReferenceType : IResourceReference
+    {
+    }
+
+    partial class PrintCommandType : IPrintCommand
+    {
+        public void Clear()
+        {
+            this.PrintLayout.Clear();
+        }
+
+        IEnumerable<IResourceReference> IPrintCommand.PrintLayout
+        {
+            get 
+            {
+                foreach (var refer in this.PrintLayout)
+                {
+                    yield return refer;
+                }
+            }
+        }
+
+        public IResourceReference CreatePrintLayout(string resourceId)
+        {
+            return new ResourceReferenceType() { ResourceId = resourceId };
+        }
+
+        public void AddPrintLayout(IResourceReference reference)
+        {
+            var r = reference as ResourceReferenceType;
+            if (r != null)
+            {
+                this.PrintLayout.Add(r);
+                OnPropertyChanged("PrintLayout");
+            }
+        }
+
+        public void RemovePrintLayout(IResourceReference reference)
+        {
+            var r = reference as ResourceReferenceType;
+            if (r != null)
+            {
+                this.PrintLayout.Remove(r);
+                OnPropertyChanged("PrintLayout");
+            }
+        }
+    }
+
+    partial class SeparatorItemType : ISeparatorItem
+    {
+    }
+
+    partial class BasicCommandType : IBasicCommand
+    {
+    }
+
+    partial class TargetedCommandType : ITargetedCommand
+    {
+    }
+
+    partial class FlyoutItemType : IFlyoutItem
+    {
+        public int ItemCount
+        {
+            get { return this.SubItem.Count; }
+        }
+
+        public IEnumerable<IUIItem> Items
+        {
+            get 
+            {
+                foreach (var item in this.SubItem)
+                {
+                    yield return item;
+                }
+            }
+        }
+
+        public void AddItem(IUIItem item)
+        {
+            var i = item as UIItemType;
+            if (i != null)
+            {
+                this.SubItem.Add(i);
+                OnPropertyChanged("SubItem");
+            }
+        }
+
+        public void RemoveItem(IUIItem item)
+        {
+            var i = item as UIItemType;
+            if (i != null)
+            {
+                this.SubItem.Remove(i);
+                OnPropertyChanged("SubItem");
+            };
+        }
+    }
+
+    partial class UIItemType : IUIItem
+    {
+        
+    }
+
+    partial class CommandItemType : ICommandItem
+    {
+        
+    }
+
+    partial class InvokeURLCommandType : IInvokeUrlCommand, ILayerSet
+    {
+
+        ILayerSet IInvokeUrlCommand.LayerSet
+        {
+            get
+            {
+                return this;
+            }
+        }
+
+        IEnumerable<IParameterPair> IInvokeUrlCommand.AdditionalParameter
+        {
+            get 
+            {
+                foreach (var pair in this.AdditionalParameter)
+                {
+                    yield return pair;
+                }
+            }
+        }
+
+        public IParameterPair CreateParameter(string name, string value)
+        {
+            return new ParameterPairType() { Key = name, Value = value };
+        }
+
+        public void AddParameter(IParameterPair param)
+        {
+            var p = param as ParameterPairType;
+            if (p != null)
+            {
+                this.AdditionalParameter.Add(p);
+                OnPropertyChanged("AdditionalParameter");
+            }
+        }
+
+        public void RemoveParameter(IParameterPair param)
+        {
+            var p = param as ParameterPairType;
+            if (p != null)
+            {
+                this.AdditionalParameter.Remove(p);
+                OnPropertyChanged("AdditionalParameter");
+            }
+        }
+
+        public BindingList<string> Layer
+        {
+            get 
+            {
+                return this.LayerSet;
+            }
+        }
+    }
+
+    partial class ParameterPairType : IParameterPair
+    {
+    }
+
+    partial class SearchCommandType : ISearchCommand, IResultColumnSet
+    {
+        IResultColumnSet ISearchCommand.ResultColumns
+        {
+            get 
+            {
+                return this;
+            }
+        }
+
+        int? ISearchCommand.MatchLimit
+        {
+            get
+            {
+                int i;
+                if (int.TryParse(this.MatchLimit, out i))
+                    return i;
+
+                return null;
+            }
+            set
+            {
+                if (value.HasValue)
+                {
+                    this.MatchLimit = value.Value.ToString();
+                }
+                else
+                {
+                    this.MatchLimit = string.Empty;
+                }
+            }
+        }
+
+        public void Clear()
+        {
+            this.ResultColumns.Clear();
+        }
+
+        public IEnumerable<IResultColumn> Column
+        {
+            get
+            {
+                foreach (var col in this.ResultColumns)
+                {
+                    yield return col;
+                }
+            }
+        }
+
+        public void AddResultColumn(IResultColumn col)
+        {
+            var c = col as ResultColumnType;
+            if (c != null)
+            {
+                this.ResultColumns.Add(c);
+                OnPropertyChanged("ResultColumns");
+            }
+        }
+
+        public void RemoveResultColumn(IResultColumn col)
+        {
+            var c = col as ResultColumnType;
+            if (c != null)
+            {
+                this.ResultColumns.Remove(c);
+                OnPropertyChanged("ResultColumns");
+            }
+        }
+    }
+
+    partial class ResultColumnType : IResultColumn
+    {
+
+    }
+
+    partial class InvokeScriptCommandType : IInvokeScriptCommand
+    {
+        
+    }
 }

Added: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayoutInterfaces.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayoutInterfaces.cs	                        (rev 0)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/WebLayoutInterfaces.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,486 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+using System.ComponentModel;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace OSGeo.MapGuide.ObjectModels.WebLayout
+{
+    public enum WebLayoutRegion
+    {
+        ContextMenu,
+        Toolbar,
+        TaskBar
+    }
+
+    /// <summary>
+    /// Encompasses all built-in commands usable by the web layout (AJAX and DWF)
+    /// </summary>
+    public enum BuiltInCommandType : int
+    {
+        Pan = BasicCommandActionType.Pan,
+        PanUp = BasicCommandActionType.PanUp,
+        PanDown = BasicCommandActionType.PanDown,
+        PanRight = BasicCommandActionType.PanRight,
+        PanLeft = BasicCommandActionType.PanLeft,
+        Zoom = BasicCommandActionType.Zoom,
+        ZoomIn = BasicCommandActionType.ZoomIn,
+        ZoomOut = BasicCommandActionType.ZoomOut,
+        ZoomRectangle = BasicCommandActionType.ZoomRectangle,
+        ZoomToSelection = BasicCommandActionType.ZoomToSelection,
+        FitToWindow = BasicCommandActionType.FitToWindow,
+        PreviousView = BasicCommandActionType.PreviousView,
+        NextView = BasicCommandActionType.NextView,
+        RestoreView = BasicCommandActionType.RestoreView,
+        Select = BasicCommandActionType.Select,
+        SelectRadius = BasicCommandActionType.SelectRadius,
+        SelectPolygon = BasicCommandActionType.SelectPolygon,
+        ClearSelection = BasicCommandActionType.ClearSelection,
+        Refresh = BasicCommandActionType.Refresh,
+        CopyMap = BasicCommandActionType.CopyMap,
+        About = BasicCommandActionType.About,
+        Buffer,
+        SelectWithin,
+        Print,
+        GetPrintablePage,
+        Measure,
+        ViewOptions,
+        Help,
+    }
+
+    [System.SerializableAttribute()]
+    public enum BasicCommandActionType
+    {
+        /// <remarks/>
+        Pan,
+
+        /// <remarks/>
+        PanUp,
+
+        /// <remarks/>
+        PanDown,
+
+        /// <remarks/>
+        PanRight,
+
+        /// <remarks/>
+        PanLeft,
+
+        /// <remarks/>
+        Zoom,
+
+        /// <remarks/>
+        ZoomIn,
+
+        /// <remarks/>
+        ZoomOut,
+
+        /// <remarks/>
+        ZoomRectangle,
+
+        /// <remarks/>
+        ZoomToSelection,
+
+        /// <remarks/>
+        FitToWindow,
+
+        /// <remarks/>
+        PreviousView,
+
+        /// <remarks/>
+        NextView,
+
+        /// <remarks/>
+        RestoreView,
+
+        /// <remarks/>
+        Select,
+
+        /// <remarks/>
+        SelectRadius,
+
+        /// <remarks/>
+        SelectPolygon,
+
+        /// <remarks/>
+        ClearSelection,
+
+        /// <remarks/>
+        Refresh,
+
+        /// <remarks/>
+        CopyMap,
+
+        /// <remarks/>
+        About,
+    }
+
+    [System.SerializableAttribute()]
+    public enum UIItemFunctionType
+    {
+
+        /// <remarks/>
+        Separator,
+
+        /// <remarks/>
+        Command,
+
+        /// <remarks/>
+        Flyout,
+    }
+    
+    [System.SerializableAttribute()]
+    public enum TargetType
+    {
+
+        /// <remarks/>
+        TaskPane,
+
+        /// <remarks/>
+        NewWindow,
+
+        /// <remarks/>
+        SpecifiedFrame,
+    }
+
+    [System.SerializableAttribute()]
+    public enum TargetViewerType
+    {
+
+        /// <remarks/>
+        Dwf,
+
+        /// <remarks/>
+        Ajax,
+
+        /// <remarks/>
+        All,
+    }
+
+    public interface IWebLayout : IResource, INotifyPropertyChanged
+    {
+        bool IsCommandReferenced(string name, out WebLayoutRegion[] region);
+
+        int RemoveAllReferences(string cmdName);
+
+        ICommand GetCommandByName(string cmdName);
+
+        IEnumerable<ICommand> GetCustomCommands();
+
+        bool FindCommand(string name, IMenu menu);
+
+        string Title { get; set; }
+
+        IMapView CreateDefaultView();
+
+        IMap Map { get; }
+
+        ITaskPane TaskPane { get; }
+
+        IToolbar ToolBar { get; }
+
+        IInformationPane InformationPane { get; }
+
+        IContextMenu ContextMenu { get; }
+
+        IStatusBar StatusBar { get; }
+
+        IZoomControl ZoomControl { get; }
+
+        ICommandSet CommandSet { get; }
+
+        IBasicCommand CreateBasicCommand(string label, string tooltip, string description, string iconName, TargetViewerType targets, BasicCommandActionType action);
+
+        IFlyoutItem CreateFlyout(
+            string label,
+            string tooltip,
+            string description,
+            string imageUrl,
+            string disabledImageUrl,
+            params IUIItem[] subItems);
+
+        T CreateTargetedCommand<T>(string name, string label, string tooltip, string description, string iconName, TargetViewerType targets, TargetType target, string targetFrame) where T : ITargetedCommand, new();
+
+        T CreateCommand<T>(string cmdName) where T : ICommandItem, new();
+
+        IInvokeUrlCommand CreateInvokeUrlCommand();
+
+        ISearchCommand CreateSearchCommand();
+
+        IInvokeScriptCommand CreateInvokeScriptCommand();
+
+        ISeparatorItem CreateSeparator();
+    }
+
+    public interface IWebLayout2 : IWebLayout
+    {
+        bool EnablePingServer { get; set; }
+    }
+
+    public interface IMap : INotifyPropertyChanged
+    {
+        string ResourceId { get; set; }
+
+        IMapView InitialView { get; set; }
+
+        TargetType HyperlinkTarget { get; set; }
+
+        string HyperlinkTargetFrame { get; set; }
+    }
+
+    public interface IMapView : INotifyPropertyChanged
+    {
+        double CenterX { get; set; }
+
+        double CenterY { get; set; }
+
+        double Scale { get; set; }
+    }
+
+    public interface IWebLayoutControl : INotifyPropertyChanged
+    {
+        bool Visible { get; set; }
+    }
+
+    public interface IWebLayoutResizableControl
+    {
+        int Width { get; set; }
+    }
+
+    public interface IUIItem
+    {
+        UIItemFunctionType Function { get; set; }
+    }
+
+    public interface ILocalizable
+    {
+        string Tooltip { get; set; }
+
+        string Description { get; set; }
+
+        string ImageURL { get; set; }
+
+        string DisabledImageURL { get; set; }
+    }
+
+    public interface ISeparatorItem : IUIItem { }
+
+    public interface ICommandItem : IUIItem
+    {
+        string Command { get; set; }
+    }
+
+    public interface IFlyoutItem : IUIItem, IMenu, ILocalizable 
+    {
+        string Label { get; set; }
+    }
+
+    public interface IMenu
+    {
+        int ItemCount { get; }
+
+        IEnumerable<IUIItem> Items { get; }
+
+        void AddItem(IUIItem item);
+
+        void RemoveItem(IUIItem item);
+    }
+
+    public static class MenuExtensions
+    {
+        public static void AddItems(this IMenu mnu, params IUIItem[] items)
+        {
+            Check.NotNull(mnu, "mnu");
+            Check.NotNull(items, "items");
+            foreach (var item in items)
+            {
+                mnu.AddItem(item);
+            }
+        }
+    }
+
+    public interface IToolbar : IMenu, IWebLayoutControl
+    { 
+        
+    }
+
+    public interface IInformationPane : IWebLayoutResizableControl
+    {
+        bool LegendVisible { get; set; }
+
+        bool PropertiesVisible { get; set; }
+    }
+
+    public interface IContextMenu : IMenu, IWebLayoutControl
+    {
+    }
+
+    public interface ITaskPane : IWebLayoutResizableControl
+    {
+        string InitialTask { get; set; }
+
+        ITaskBar TaskBar { get; }
+    }
+
+    public interface ITaskBar : IWebLayoutControl, IMenu
+    {
+        ITaskButton Home { get; }
+
+        ITaskButton Forward { get; }
+
+        ITaskButton Back { get; }
+
+        ITaskButton Tasks { get; }
+    }
+
+    public interface ITaskButton : ILocalizable
+    {
+
+    }
+
+    public interface IStatusBar : IWebLayoutControl
+    {
+    }
+
+    public interface IZoomControl : IWebLayoutControl
+    {
+    }
+
+    public interface ICommandSet
+    {
+        int CommandCount { get; }
+
+        void Clear();
+
+        IEnumerable<ICommand> Commands { get; }
+
+        void AddCommand(ICommand cmd);
+
+        void RemoveCommand(ICommand cmd);
+    }
+
+    public interface ICommand : ILocalizable, INotifyPropertyChanged
+    {
+        string Name { get; set; }
+
+        string Label { get; set; }
+
+        TargetViewerType TargetViewer { get; set; }
+    }
+
+    public interface IBasicCommand : ICommand
+    {
+        BasicCommandActionType Action { get; set; }
+    }
+
+    public interface ICustomCommand : ICommand
+    {
+
+    }
+
+    public interface ITargetedCommand : ICustomCommand
+    {
+        TargetType Target { get; set; }
+
+        string TargetFrame { get; set; }
+    }
+
+    public interface ISearchCommand : ITargetedCommand
+    {
+        string Layer { get; set; }
+
+        string Prompt { get; set; }
+
+        IResultColumnSet ResultColumns { get; }
+        
+        string Filter { get; set; }
+
+        int? MatchLimit { get; set; }
+    }
+
+    public interface IResultColumnSet
+    {
+        void Clear();
+
+        IEnumerable<IResultColumn> Column { get; }
+
+        void AddResultColumn(IResultColumn col);
+
+        void RemoveResultColumn(IResultColumn col);
+    }
+
+    public interface IResultColumn
+    {
+        string Name { get; set; }
+
+        string Property { get; set; }
+    }
+
+    public interface IInvokeUrlCommand : ITargetedCommand
+    {
+        string URL { get; set; }
+
+        ILayerSet LayerSet { get; }
+
+        IEnumerable<IParameterPair> AdditionalParameter { get; }
+
+        IParameterPair CreateParameter(string name, string value);
+
+        void AddParameter(IParameterPair param);
+
+        void RemoveParameter(IParameterPair param);
+
+        bool DisableIfSelectionEmpty { get; set; }
+    }
+
+    public interface ILayerSet
+    {
+        BindingList<string> Layer { get; }
+    }
+
+    public interface IParameterPair
+    {
+        string Key { get; set; }
+
+        string Value { get; set; }
+    }
+
+    public interface IBufferCommand : ITargetedCommand { }
+
+    public interface ISelectWithinCommand : ITargetedCommand { }
+
+    public interface IResourceReference : INotifyPropertyChanged
+    {
+        string ResourceId { get; set; }
+    }
+
+    public interface IPrintCommand : ICustomCommand 
+    {
+        void Clear();
+
+        IEnumerable<IResourceReference> PrintLayout { get; }
+
+        IResourceReference CreatePrintLayout(string resourceId);
+
+        void AddPrintLayout(IResourceReference reference);
+
+        void RemovePrintLayout(IResourceReference reference);
+    }
+
+    public interface IGetPrintablePageCommand : ITargetedCommand { }
+
+    public interface IMeasureCommand : ITargetedCommand { }
+
+    public interface IViewOptionsCommand : ITargetedCommand { }
+
+    public interface IHelpCommand : ITargetedCommand
+    {
+        string URL { get; set; }
+    }
+
+    public interface IInvokeScriptCommand : ICustomCommand
+    {
+        string Script { get; set; }
+    }
+}

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.Designer.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -293,5 +293,140 @@
                 return ResourceManager.GetString("LDF_UnsupportedLayerTypeWarning", resourceCulture);
             }
         }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Convert to SDF option is not supported by Maestro.
+        /// </summary>
+        internal static string LPROC_ConvertToSdf3NotSupported {
+            get {
+                return ResourceManager.GetString("LPROC_ConvertToSdf3NotSupported", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DWF Load Procedures cannot be executed by Maestro.
+        /// </summary>
+        internal static string LPROC_DWFNotSupported {
+            get {
+                return ResourceManager.GetString("LPROC_DWFNotSupported", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DWG Load Procedures cannot be executed by Maestro.
+        /// </summary>
+        internal static string LPROC_DWGNotSupported {
+            get {
+                return ResourceManager.GetString("LPROC_DWGNotSupported", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Generalization of source data is not supported by Maestro.
+        /// </summary>
+        internal static string LPROC_GeneralizationNotSupported {
+            get {
+                return ResourceManager.GetString("LPROC_GeneralizationNotSupported", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Raster Load Procedures cannot be executed by Maestro.
+        /// </summary>
+        internal static string LPROC_RasterNotSupported {
+            get {
+                return ResourceManager.GetString("LPROC_RasterNotSupported", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to SDF 2 Migration options are not supported by Maestro. Ensure your source files are SDF3 files..
+        /// </summary>
+        internal static string LPROC_Sdf2OptionsNotSupported {
+            get {
+                return ResourceManager.GetString("LPROC_Sdf2OptionsNotSupported", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Source file not found: {0}.
+        /// </summary>
+        internal static string LPROC_SourceFileNotFound {
+            get {
+                return ResourceManager.GetString("LPROC_SourceFileNotFound", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to There web layout has more than one command named: {0}.
+        /// </summary>
+        internal static string WL_DuplicateCommandName {
+            get {
+                return ResourceManager.GetString("WL_DuplicateCommandName", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The search command {0} references more than one property named {1}.
+        /// </summary>
+        internal static string WL_DuplicateSearchResultColumn {
+            get {
+                return ResourceManager.GetString("WL_DuplicateSearchResultColumn", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Error validating MapDefinition {0}, message: {1}.
+        /// </summary>
+        internal static string WL_MapValidationError {
+            get {
+                return ResourceManager.GetString("WL_MapValidationError", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Layout does not specify a map.
+        /// </summary>
+        internal static string WL_MissingMapError {
+            get {
+                return ResourceManager.GetString("WL_MissingMapError", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Context Menu contains a reference to a command that doesn&apos;t exist: {0}.
+        /// </summary>
+        internal static string WL_NonExistentMenuCommandReference {
+            get {
+                return ResourceManager.GetString("WL_NonExistentMenuCommandReference", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Task Pane contains a reference to a command that does not exist: {0}.
+        /// </summary>
+        internal static string WL_NonExistentTaskPaneCommandReference {
+            get {
+                return ResourceManager.GetString("WL_NonExistentTaskPaneCommandReference", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Toolbar contains a reference to a command that does not exist: {0}.
+        /// </summary>
+        internal static string WL_NonExistentToolbarCommandReference {
+            get {
+                return ResourceManager.GetString("WL_NonExistentToolbarCommandReference", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Layout specifies a start view that is outside the map&apos;s initial extents.
+        /// </summary>
+        internal static string WL_StartViewOutsideExtentsWarning {
+            get {
+                return ResourceManager.GetString("WL_StartViewOutsideExtentsWarning", resourceCulture);
+            }
+        }
     }
 }

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Properties/Resources.resx	2010-10-19 06:23:47 UTC (rev 5294)
@@ -210,4 +210,59 @@
     <value>The layer has no type, or the type is unsupported by Maestro</value>
     <comment>A  warning message that is displayed if the layer type is unknown</comment>
   </data>
+  <data name="LPROC_ConvertToSdf3NotSupported" xml:space="preserve">
+    <value>Convert to SDF option is not supported by Maestro</value>
+    <comment>A warning message about the lack of SDF conversion support</comment>
+  </data>
+  <data name="LPROC_DWFNotSupported" xml:space="preserve">
+    <value>DWF Load Procedures cannot be executed by Maestro</value>
+    <comment>A warning message indicating the lack of DWF support in Maestro</comment>
+  </data>
+  <data name="LPROC_DWGNotSupported" xml:space="preserve">
+    <value>DWG Load Procedures cannot be executed by Maestro</value>
+    <comment>A warning message indicating the lack of DWG support in Maestro</comment>
+  </data>
+  <data name="LPROC_GeneralizationNotSupported" xml:space="preserve">
+    <value>Generalization of source data is not supported by Maestro</value>
+    <comment>A warning message about the lack of Generalization support</comment>
+  </data>
+  <data name="LPROC_RasterNotSupported" xml:space="preserve">
+    <value>Raster Load Procedures cannot be executed by Maestro</value>
+    <comment>A warning message about the lack of Raster support</comment>
+  </data>
+  <data name="LPROC_Sdf2OptionsNotSupported" xml:space="preserve">
+    <value>SDF 2 Migration options are not supported by Maestro. Ensure your source files are SDF3 files.</value>
+    <comment>A warning message about the lack of SDF2 support</comment>
+  </data>
+  <data name="LPROC_SourceFileNotFound" xml:space="preserve">
+    <value>Source file not found: {0}</value>
+    <comment>An error message indicating that a source file in the load procedure does not exist</comment>
+  </data>
+  <data name="WL_DuplicateCommandName" xml:space="preserve">
+    <value>There web layout has more than one command named: {0}</value>
+  </data>
+  <data name="WL_DuplicateSearchResultColumn" xml:space="preserve">
+    <value>The search command {0} references more than one property named {1}</value>
+  </data>
+  <data name="WL_MapValidationError" xml:space="preserve">
+    <value>Error validating MapDefinition {0}, message: {1}</value>
+    <comment>An error message that is displayed if the map validation fails</comment>
+  </data>
+  <data name="WL_MissingMapError" xml:space="preserve">
+    <value>Layout does not specify a map</value>
+    <comment>An error message that is displayed if no map is specified in the layout</comment>
+  </data>
+  <data name="WL_NonExistentMenuCommandReference" xml:space="preserve">
+    <value>Context Menu contains a reference to a command that doesn't exist: {0}</value>
+  </data>
+  <data name="WL_NonExistentTaskPaneCommandReference" xml:space="preserve">
+    <value>Task Pane contains a reference to a command that does not exist: {0}</value>
+  </data>
+  <data name="WL_NonExistentToolbarCommandReference" xml:space="preserve">
+    <value>Toolbar contains a reference to a command that does not exist: {0}</value>
+  </data>
+  <data name="WL_StartViewOutsideExtentsWarning" xml:space="preserve">
+    <value>Layout specifies a start view that is outside the map's initial extents</value>
+    <comment>A warning message that is displayed if the layout specifies a start center point that is outside the map's specified extents</comment>
+  </data>
 </root>
\ No newline at end of file

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLayerDefinitionValidator.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLayerDefinitionValidator.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLayerDefinitionValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -34,7 +34,7 @@
     {
         public virtual ValidationIssue[] Validate(IResource resource, bool recurse)
         {
-            if (resource.GetResourceTypeDescriptor() != this.SupportedResourceAndVersion)
+            if (!resource.GetResourceTypeDescriptor().Equals(this.SupportedResourceAndVersion))
                 return null;
 
             return ValidateBase(resource, recurse);

Added: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLoadProcedureValidator.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLoadProcedureValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseLoadProcedureValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.ObjectModels.LoadProcedure;
+
+namespace OSGeo.MapGuide.MaestroAPI.Resource
+{
+    public abstract class BaseLoadProcedureValidator : IResourceValidator
+    {
+        public abstract ResourceTypeDescriptor SupportedResourceAndVersion { get; }
+
+        public virtual ValidationIssue[] Validate(IResource resource, bool recurse)
+        {
+            if (!resource.GetResourceTypeDescriptor().Equals(this.SupportedResourceAndVersion))
+                return null;
+
+            return ValidateBase(resource, recurse);
+        }
+
+        protected static ValidationIssue[] ValidateBase(IResource resource, bool recurse)
+        {
+            if (resource.ResourceType != OSGeo.MapGuide.MaestroAPI.ResourceTypes.LoadProcedure)
+                return null;
+
+            if (resource.ResourceVersion != new Version(1, 0, 0))
+                return null;
+
+            var set = new ValidationResultSet();
+
+            var loadProc = (resource as ILoadProcedure).SubType;
+
+            if (loadProc.Type == LoadType.Dwg)
+            {
+                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_DWGNotSupported));
+                return set.GetAllIssues(); //all she wrote
+            }
+
+            if (loadProc.Type == LoadType.Raster)
+            {
+                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_RasterNotSupported));
+                return set.GetAllIssues(); //all she wrote
+            }
+
+            if (loadProc.Type == LoadType.Sdf)
+            {
+                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_Sdf2OptionsNotSupported));
+                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_GeneralizationNotSupported));
+            }
+
+            if (loadProc.Type == LoadType.Shp)
+            {
+                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_ConvertToSdf3NotSupported));
+                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_GeneralizationNotSupported));
+            }
+
+            if (loadProc.Type == LoadType.Sqlite)
+            {
+                set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, Properties.Resources.LPROC_GeneralizationNotSupported));
+            }
+
+            var fproc = loadProc as IBaseLoadProcedure;
+            if (fproc != null)
+            {
+                foreach (var fn in fproc.SourceFile)
+                {
+                    if (!System.IO.File.Exists(fn))
+                    {
+                        set.AddIssue(new ValidationIssue(resource, ValidationStatus.Warning, string.Format(Properties.Resources.LPROC_SourceFileNotFound, fn)));
+                    }
+                }
+            }
+
+            return set.GetAllIssues();
+        }
+    }
+}

Added: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseWebLayoutValidator.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseWebLayoutValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Resource/BaseWebLayoutValidator.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -0,0 +1,127 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.ObjectModels.Common;
+using OSGeo.MapGuide.ObjectModels.MapDefinition;
+using OSGeo.MapGuide.ObjectModels.WebLayout;
+using OSGeo.MapGuide.MaestroAPI.Exceptions;
+using OSGeo.MapGuide.MaestroAPI.ObjectModels;
+
+namespace OSGeo.MapGuide.MaestroAPI.Resource
+{
+    public abstract class BaseWebLayoutValidator : IResourceValidator
+    {
+        public abstract ResourceTypeDescriptor SupportedResourceAndVersion
+        {
+            get;
+        }
+
+        public virtual ValidationIssue[] Validate(IResource resource, bool recurse)
+        {
+            if (!resource.GetResourceTypeDescriptor().Equals(this.SupportedResourceAndVersion))
+                return null;
+
+            return ValidateBase(resource, recurse);
+        }
+
+        protected static ValidationIssue[] ValidateBase(IResource resource, bool recurse)
+        {
+            if (resource.ResourceType != OSGeo.MapGuide.MaestroAPI.ResourceTypes.WebLayout)
+                return null;
+
+            List<ValidationIssue> issues = new List<ValidationIssue>();
+
+            IWebLayout layout = resource as IWebLayout;
+            if (layout.Map == null || layout.Map.ResourceId == null)
+            {
+                issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_MissingMapError)));
+            }
+            else
+            {
+                //Check for duplicate command names
+                var cmdSet = layout.CommandSet;
+                Dictionary<string, ICommand> cmds = new Dictionary<string, ICommand>();
+                foreach (ICommand cmd in cmdSet.Commands)
+                {
+                    if (cmds.ContainsKey(cmd.Name))
+                        issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_DuplicateCommandName, cmd.Name)));
+                    else
+                        cmds[cmd.Name] = cmd;
+                }
+
+                //Check for duplicate property references in search commands
+                foreach (ICommand cmd in cmdSet.Commands)
+                {
+                    if (cmd is ISearchCommand)
+                    {
+                        ISearchCommand search = (ISearchCommand)cmd;
+                        Dictionary<string, string> resColProps = new Dictionary<string, string>();
+                        foreach (IResultColumn resCol in search.ResultColumns.Column)
+                        {
+                            if (resColProps.ContainsKey(resCol.Property))
+                                issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_DuplicateSearchResultColumn, search.Name, resCol.Property)));
+                            else
+                                resColProps.Add(resCol.Property, resCol.Property);
+                        }
+                    }
+                }
+
+                //Check for command references to non-existent commands
+                foreach (IUIItem item in layout.ContextMenu.Items)
+                {
+                    if (item.Function == UIItemFunctionType.Command)
+                    {
+                        ICommandItem cmdRef = (ICommandItem)item;
+                        if (!cmds.ContainsKey(cmdRef.Command))
+                            issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_NonExistentMenuCommandReference, cmdRef.Command)));
+                    }
+                }
+
+                foreach (IUIItem item in layout.TaskPane.TaskBar.Items)
+                {
+                    if (item.Function == UIItemFunctionType.Command)
+                    {
+                        ICommandItem cmdRef = (ICommandItem)item;
+                        if (!cmds.ContainsKey(cmdRef.Command))
+                            issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_NonExistentTaskPaneCommandReference, cmdRef.Command)));
+                    }
+                }
+
+                foreach (IUIItem item in layout.ToolBar.Items)
+                {
+                    if (item.Function == UIItemFunctionType.Command)
+                    {
+                        ICommandItem cmdRef = (ICommandItem)item;
+                        if (!cmds.ContainsKey(cmdRef.Command))
+                            issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_NonExistentToolbarCommandReference, cmdRef.Command)));
+                    }
+                }
+
+                if (recurse)
+                {
+                    try
+                    {
+                        IMapDefinition mdef = (IMapDefinition)layout.CurrentConnection.ResourceService.GetResource(layout.Map.ResourceId);
+
+                        issues.AddRange(ResourceValidatorSet.Validate(mdef, true));
+
+                        if (layout.Map.InitialView != null)
+                        {
+                            var mapEnv = ObjectFactory.CreateEnvelope(mdef.Extents.MinX, mdef.Extents.MaxX, mdef.Extents.MinY, mdef.Extents.MaxY);
+                            if (!mapEnv.Contains(layout.Map.InitialView.CenterX, layout.Map.InitialView.CenterY))
+                                issues.Add(new ValidationIssue(mdef, ValidationStatus.Warning, string.Format(Properties.Resources.WL_StartViewOutsideExtentsWarning)));
+                        }
+
+                    }
+                    catch (Exception ex)
+                    {
+                        string msg = NestedExceptionMessageProcessor.GetFullMessage(ex);
+                        issues.Add(new ValidationIssue(layout, ValidationStatus.Error, string.Format(Properties.Resources.WL_MapValidationError, layout.Map.ResourceId, msg)));
+                    }
+                }
+            }
+
+            return issues.ToArray();
+        }
+    }
+}

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs	2010-10-18 15:26:47 UTC (rev 5293)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs	2010-10-19 06:23:47 UTC (rev 5294)
@@ -163,7 +163,7 @@
                 new ResourceSerializer()
                 {
                     Serialize = (res) => { return res.SerializeToStream(); },
-                    Deserialize = (xml) => { return WebLayoutType.Deserialize(xml); }
+                    Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.WebLayout_1_0_0.WebLayoutType.Deserialize(xml); }
                 });
         }
 
@@ -188,46 +188,97 @@
         public static IResource Deserialize(ResourceTypes resourceType, Stream stream)
         {
             //UGLY: We have to peek inside the stream to determine the version number
-
-            //House the stream inside a rewindable memory stream
-            using (var ms = new MemoryStream())
+            //DOUBLE UGLY: WebLayout documents don't have the version attribute so we have to peek at the xsd schema name
+            if (resourceType == ResourceTypes.WebLayout)
             {
-                Utility.CopyStream(stream, ms);
-                string version = "1.0.0";
-                ms.Position = 0L; //Rewind
-                using (var xr = XmlReader.Create(ms))
+                //House the stream inside a rewindable memory stream
+                using (var ms = new MemoryStream())
                 {
-                    xr.MoveToContent();
-                    if (!xr.HasAttributes)
-                        throw new SerializationException();
+                    string version = "1.0.0";
+                    Utility.CopyStream(stream, ms);
+                    ms.Position = 0L; //Rewind
+                    using (var xr = XmlReader.Create(ms))
+                    {
+                        xr.MoveToContent();
+                        if (!xr.HasAttributes)
+                            throw new SerializationException();
+                        
+                        try
+                        {
+                            //Parse version number from WebLayout-x.y.z.xsd
+                            string xsd = xr.GetAttribute("xsi:noNamespaceSchemaLocation");
+                            int start = ("WebLayout-".Length);
+                            int end = xsd.IndexOf(".xsd") - 1;
+                            version = xsd.Substring(start, xsd.Length - end);
 
-                    //Resources post-1.0.0 have a version attribute, those without are assumed to be 1.0.0 version
-                    try
-                    {
-                        version = xr.GetAttribute("version");
+                        }
+                        catch
+                        {
+                            version = "1.0.0";
+                        }
+                        finally
+                        {
+                            if (string.IsNullOrEmpty(version))
+                                version = "1.0.0";
+                        }
+                        xr.Close();
                     }
-                    catch
+
+                    ms.Position = 0L; //Rewind
+
+                    var rd = new ResourceTypeDescriptor(resourceType, version);
+                    using (var reader = new StreamReader(ms))
                     {
-                        version = "1.0.0";
+                        var xml = reader.ReadToEnd();
+                        if (_serializers.ContainsKey(rd))
+                            return _serializers[rd].Deserialize(xml);
+                        else
+                            return new UntypedResource(xml, resourceType, version);
                     }
-                    finally
+                }
+            }
+            else
+            {
+                //House the stream inside a rewindable memory stream
+                using (var ms = new MemoryStream())
+                {
+                    Utility.CopyStream(stream, ms);
+                    string version = "1.0.0";
+                    ms.Position = 0L; //Rewind
+                    using (var xr = XmlReader.Create(ms))
                     {
-                        if (string.IsNullOrEmpty(version))
+                        xr.MoveToContent();
+                        if (!xr.HasAttributes)
+                            throw new SerializationException();
+
+                        //Resources post-1.0.0 have a version attribute, those without are assumed to be 1.0.0 version
+                        try
+                        {
+                            version = xr.GetAttribute("version");
+                        }
+                        catch
+                        {
                             version = "1.0.0";
+                        }
+                        finally
+                        {
+                            if (string.IsNullOrEmpty(version))
+                                version = "1.0.0";
+                        }
+                        xr.Close();
                     }
-                    xr.Close();
-                }
 
-                ms.Position = 0L; //Rewind
+                    ms.Position = 0L; //Rewind
 
-                var rd = new ResourceTypeDescriptor(resourceType, version);
-                using (var reader = new StreamReader(ms))
-                {
-                    var xml = reader.ReadToEnd();
-                    if (_serializers.ContainsKey(rd))
-                        return _serializers[rd].Deserialize(xml);
-                    else
-                        return new UntypedResource(xml, resourceType, version);
+                    var rd = new ResourceTypeDescriptor(resourceType, version);
+                    using (var reader = new StreamReader(ms))
+                    {
+                        var xml = reader.ReadToEnd();
+                        if (_serializers.ContainsKey(rd))
+                            return _serializers[rd].Deserialize(xml);
+                        else
+                            return new UntypedResource(xml, resourceType, version);
+                    }
                 }
             }
         }



More information about the mapguide-commits mailing list