[mapguide-commits] r4786 - in trunk/Tools/Maestro: Installer Maestro Maestro/FusionEditor Maestro/LoginForm Maestro/ResourceBrowser Maestro/ResourceEditors Maestro/ResourceEditors/FeatureSourcePreview Maestro/ResourceEditors/FeatureSourcePreview/Query Maestro/ResourceValidators MaestroAPI MaestroAPI/PackageBuilder MaestroAPI/XsdGenerator new w generics MgCooker

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Apr 13 10:24:59 EDT 2010


Author: jng
Date: 2010-04-13 10:24:58 -0400 (Tue, 13 Apr 2010)
New Revision: 4786

Added:
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.resx
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.resx
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.resx
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.resx
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.resx
Modified:
   trunk/Tools/Maestro/Installer/
   trunk/Tools/Maestro/Maestro/AssemblyInfo.cs
   trunk/Tools/Maestro/Maestro/FusionEditor/FusionEditor.csproj
   trunk/Tools/Maestro/Maestro/LoginForm/OSGeo.MapGuide.Maestro.LoginForm.csproj
   trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj
   trunk/Tools/Maestro/Maestro/ResourceBrowser/OSGeo.MapGuide.Maestro.ResourceBrowser.csproj
   trunk/Tools/Maestro/Maestro/ResourceEditors/
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.resx
   trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceEditors.csproj
   trunk/Tools/Maestro/Maestro/ResourceValidators/ResourceValidators.csproj
   trunk/Tools/Maestro/MaestroAPI/FeatureSetReader.cs
   trunk/Tools/Maestro/MaestroAPI/HttpServerConnection.cs
   trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs
   trunk/Tools/Maestro/MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
   trunk/Tools/Maestro/MaestroAPI/PackageBuilder/OSGeo.MapGuide.MaestroAPI.PackageBuilder.csproj
   trunk/Tools/Maestro/MaestroAPI/RequestBuilder.cs
   trunk/Tools/Maestro/MaestroAPI/ServerConnectionI.cs
   trunk/Tools/Maestro/MaestroAPI/XsdGenerator new w generics/
   trunk/Tools/Maestro/MgCooker/MgCooker.csproj
Log:
#1314: This submission adds local preview support for feature sources. However, this feature is broken and depends on a fix for #708 to be actually useful. Assuming the #708 fix makes it in the 2.2 release, this feature is currently disabled if the site version is less than 2.2.

Also in this submission is some file ignore pattern updates.


Property changes on: trunk/Tools/Maestro/Installer
___________________________________________________________________
Added: svn:ignore
   + bin
obj


Modified: trunk/Tools/Maestro/Maestro/AssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/AssemblyInfo.cs	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/AssemblyInfo.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -45,7 +45,7 @@
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("2.0.0.4513")]
+[assembly: AssemblyVersion("2.0.0.4781")]
 
 //
 // In order to sign your assembly you must specify a key to use. Refer to the 
@@ -75,4 +75,4 @@
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
 [assembly: AssemblyKeyName("")]
-[assembly: AssemblyFileVersionAttribute("2.0.0.4513")]
+[assembly: AssemblyFileVersionAttribute("2.0.0.4781")]

Modified: trunk/Tools/Maestro/Maestro/FusionEditor/FusionEditor.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/FusionEditor/FusionEditor.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/FusionEditor/FusionEditor.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -1,7 +1,7 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{A47D6F9A-F58D-4A2E-8E88-09CD833A160E}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -269,14 +269,17 @@
     <EmbeddedResource Include="Strings\ApplicationDefinitionEditor.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>ApplicationDefinitionEditor.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\EditWidgets.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>EditWidgets.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\WidgetDefaults.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>WidgetDefaults.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="WidgetEditor.resx">
       <DependentUpon>WidgetEditor.cs</DependentUpon>

Modified: trunk/Tools/Maestro/Maestro/LoginForm/OSGeo.MapGuide.Maestro.LoginForm.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/LoginForm/OSGeo.MapGuide.Maestro.LoginForm.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/LoginForm/OSGeo.MapGuide.Maestro.LoginForm.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{4B79021A-5117-4894-BBC0-39452E4F40E3}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -59,10 +59,12 @@
   <ItemGroup>
     <EmbeddedResource Include="FormLogin.resx">
       <DependentUpon>FormLogin.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\FormLogin.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>FormLogin.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>

Modified: trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/OSGeo.MapGuide.Maestro.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -1,7 +1,7 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{F3BADE4F-2581-4B65-9E15-412C294DB973}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -391,14 +391,17 @@
     <EmbeddedResource Include="PackageManager\Strings\AddResourceEntry.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>AddResourceEntry.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="PackageManager\Strings\CreatePackage.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>CreatePackage.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="PackageManager\Strings\PackageEditor.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>PackageEditor.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Profiling.resx">
       <SubType>Designer</SubType>
@@ -416,54 +419,67 @@
     <EmbeddedResource Include="Strings\BoundsPicker.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>BoundsPicker.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\BrowseUnmanagedData.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>BrowseUnmanagedData.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\EditorInterface.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>EditorInterface.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\FormAbout.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>FormAbout.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\FormExpression.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>FormExpression.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\FormMain.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>FormMain.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\LengthyOperation.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>LengthyOperation.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\Profiling.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Profiling.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\Program.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Program.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\ResourceEditorMap.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>ResourceEditorMap.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\ResourceProperties.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>ResourceProperties.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\TemplateNames.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>TemplateNames.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\ValidationResults.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>ValidationResults.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="ValidationResults.resx">
       <SubType>Designer</SubType>

Modified: trunk/Tools/Maestro/Maestro/ResourceBrowser/OSGeo.MapGuide.Maestro.ResourceBrowser.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceBrowser/OSGeo.MapGuide.Maestro.ResourceBrowser.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/ResourceBrowser/OSGeo.MapGuide.Maestro.ResourceBrowser.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{FD40B520-CC1B-41C7-B89B-693E0204EBCC}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -87,14 +87,17 @@
     <EmbeddedResource Include="Strings\BrowseResource.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>BrowseResource.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\RepositoryCache.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>RepositoryCache.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\ResourceTree.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>ResourceTree.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>


Property changes on: trunk/Tools/Maestro/Maestro/ResourceEditors
___________________________________________________________________
Modified: svn:ignore
   - bin
obj

   + bin
obj
*.user


Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -24,6 +24,7 @@
 using System.Data;
 using System.Windows.Forms;
 using OSGeo.MapGuide.Maestro;
+using OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview;
 
 namespace OSGeo.MapGuide.Maestro.ResourceEditors
 {
@@ -54,6 +55,7 @@
 		private System.Windows.Forms.Button EditExtensions;
         private Panel panel1;
         private Button EditConfigDocButton;
+        private TabPage LocalPreviewPage;
 
 		/// <summary> 
 		/// Required designer variable.
@@ -100,6 +102,19 @@
 
 				CoordinateSystemOverride.SetItem(m_editor, feature);
 			}
+
+            FeatureSourcePreviewCtrl ctl = new FeatureSourcePreviewCtrl(m_editor, ProviderName.Text, m_editor.ResourceId);
+            ctl.Dock = DockStyle.Fill;
+
+            LocalPreviewPage.Controls.Clear();
+            LocalPreviewPage.Controls.Add(ctl);
+
+            //This feature is broken for any MG release < 2.2 so disable it.
+            Version ver = editor.CurrentConnection.SiteVersion;
+            Version supported = new Version(2, 2);
+            if (ver < supported)
+                EditorTab.Controls.Remove(LocalPreviewPage);
+            
 		}
 
 		public FeatureSourceEditorBase(EditorInterface editor)
@@ -287,11 +302,12 @@
             this.label1 = new System.Windows.Forms.Label();
             this.ProviderName = new System.Windows.Forms.TextBox();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.CoordinateSystemOverride = new OSGeo.MapGuide.Maestro.ResourceEditors.CoordinateSystemOverride();
             this.EditJoinPanel = new System.Windows.Forms.Panel();
             this.EditConfigDocButton = new System.Windows.Forms.Button();
             this.EditExtensions = new System.Windows.Forms.Button();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.CoordinateSystemOverride = new OSGeo.MapGuide.Maestro.ResourceEditors.CoordinateSystemOverride();
+            this.LocalPreviewPage = new System.Windows.Forms.TabPage();
             this.EditorTab.SuspendLayout();
             this.TestConnectionPanel.SuspendLayout();
             this.groupBox1.SuspendLayout();
@@ -303,6 +319,7 @@
             // 
             this.EditorTab.Controls.Add(this.CustomEditorPage);
             this.EditorTab.Controls.Add(this.GenericEditorPage);
+            this.EditorTab.Controls.Add(this.LocalPreviewPage);
             resources.ApplyResources(this.EditorTab, "EditorTab");
             this.EditorTab.Name = "EditorTab";
             this.EditorTab.SelectedIndex = 0;
@@ -312,11 +329,13 @@
             // 
             resources.ApplyResources(this.CustomEditorPage, "CustomEditorPage");
             this.CustomEditorPage.Name = "CustomEditorPage";
+            this.CustomEditorPage.UseVisualStyleBackColor = true;
             // 
             // GenericEditorPage
             // 
             resources.ApplyResources(this.GenericEditorPage, "GenericEditorPage");
             this.GenericEditorPage.Name = "GenericEditorPage";
+            this.GenericEditorPage.UseVisualStyleBackColor = true;
             // 
             // TestConnectionPanel
             // 
@@ -355,11 +374,6 @@
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.TabStop = false;
             // 
-            // CoordinateSystemOverride
-            // 
-            resources.ApplyResources(this.CoordinateSystemOverride, "CoordinateSystemOverride");
-            this.CoordinateSystemOverride.Name = "CoordinateSystemOverride";
-            // 
             // EditJoinPanel
             // 
             this.EditJoinPanel.Controls.Add(this.EditConfigDocButton);
@@ -386,6 +400,17 @@
             resources.ApplyResources(this.panel1, "panel1");
             this.panel1.Name = "panel1";
             // 
+            // CoordinateSystemOverride
+            // 
+            resources.ApplyResources(this.CoordinateSystemOverride, "CoordinateSystemOverride");
+            this.CoordinateSystemOverride.Name = "CoordinateSystemOverride";
+            // 
+            // LocalPreviewPage
+            // 
+            resources.ApplyResources(this.LocalPreviewPage, "LocalPreviewPage");
+            this.LocalPreviewPage.Name = "LocalPreviewPage";
+            this.LocalPreviewPage.UseVisualStyleBackColor = true;
+            // 
             // FeatureSourceEditorBase
             // 
             resources.ApplyResources(this, "$this");

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.resx	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.resx	2010-04-13 14:24:58 UTC (rev 4786)
@@ -167,7 +167,34 @@
   <data name="&gt;&gt;GenericEditorPage.ZOrder" xml:space="preserve">
     <value>1</value>
   </data>
+  <data name="LocalPreviewPage.Location" type="System.Drawing.Point, System.Drawing">
+    <value>4, 22</value>
+  </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="LocalPreviewPage.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>3, 3, 3, 3</value>
+  </data>
+  <data name="LocalPreviewPage.Size" type="System.Drawing.Size, System.Drawing">
+    <value>584, 270</value>
+  </data>
+  <data name="LocalPreviewPage.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="LocalPreviewPage.Text" xml:space="preserve">
+    <value>Local Preview</value>
+  </data>
+  <data name="&gt;&gt;LocalPreviewPage.Name" xml:space="preserve">
+    <value>LocalPreviewPage</value>
+  </data>
+  <data name="&gt;&gt;LocalPreviewPage.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;LocalPreviewPage.Parent" xml:space="preserve">
+    <value>EditorTab</value>
+  </data>
+  <data name="&gt;&gt;LocalPreviewPage.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
   <data name="EditorTab.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
@@ -231,6 +258,9 @@
   <data name="btnTest.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
     <value>System</value>
   </data>
+  <data name="btnTest.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
   <data name="btnTest.Location" type="System.Drawing.Point, System.Drawing">
     <value>424, 8</value>
   </data>
@@ -282,6 +312,9 @@
   <data name="label1.Font" type="System.Drawing.Font, System.Drawing">
     <value>Microsoft Sans Serif, 8.25pt</value>
   </data>
+  <data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
   <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
     <value>0, 0</value>
   </data>
@@ -349,7 +382,7 @@
     <value>CoordinateSystemOverride</value>
   </data>
   <data name="&gt;&gt;CoordinateSystemOverride.Type" xml:space="preserve">
-    <value>OSGeo.MapGuide.Maestro.ResourceEditors.CoordinateSystemOverride, OSGeo.MapGuide.Maestro.ResourceEditors, Version=1.1.0.4347, Culture=neutral, PublicKeyToken=null</value>
+    <value>OSGeo.MapGuide.Maestro.ResourceEditors.CoordinateSystemOverride, OSGeo.MapGuide.Maestro.ResourceEditors, Version=2.0.0.4513, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;CoordinateSystemOverride.Parent" xml:space="preserve">
     <value>groupBox1</value>
@@ -387,6 +420,9 @@
   <data name="EditConfigDocButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Right</value>
   </data>
+  <data name="EditConfigDocButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
   <data name="EditConfigDocButton.Location" type="System.Drawing.Point, System.Drawing">
     <value>224, 8</value>
   </data>
@@ -414,6 +450,9 @@
   <data name="EditExtensions.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Right</value>
   </data>
+  <data name="EditExtensions.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
   <data name="EditExtensions.Location" type="System.Drawing.Point, System.Drawing">
     <value>408, 8</value>
   </data>
@@ -504,4 +543,4 @@
   <data name="&gt;&gt;$this.Type" xml:space="preserve">
     <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-</root>
\ No newline at end of file
+</root>

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.Designer.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,207 @@
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    partial class ClassPreviewCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClassPreviewCtrl));
+            this.grdResults = new System.Windows.Forms.DataGridView();
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.lblQueryMode = new System.Windows.Forms.ToolStripLabel();
+            this.cmbQueryMode = new System.Windows.Forms.ToolStripComboBox();
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+            this.btnQuery = new System.Windows.Forms.ToolStripButton();
+            this.btnCancel = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+            this.btnClear = new System.Windows.Forms.ToolStripButton();
+            this.lblResults = new System.Windows.Forms.Label();
+            this.queryPanel = new System.Windows.Forms.Panel();
+            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+            ((System.ComponentModel.ISupportInitialize)(this.grdResults)).BeginInit();
+            this.toolStrip1.SuspendLayout();
+            this.splitContainer1.Panel1.SuspendLayout();
+            this.splitContainer1.Panel2.SuspendLayout();
+            this.splitContainer1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // grdResults
+            // 
+            this.grdResults.AllowUserToAddRows = false;
+            this.grdResults.AllowUserToDeleteRows = false;
+            this.grdResults.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle1.NullValue = "(null)";
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.grdResults.DefaultCellStyle = dataGridViewCellStyle1;
+            this.grdResults.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.grdResults.Location = new System.Drawing.Point(0, 0);
+            this.grdResults.Name = "grdResults";
+            this.grdResults.ReadOnly = true;
+            this.grdResults.Size = new System.Drawing.Size(589, 280);
+            this.grdResults.TabIndex = 0;
+            // 
+            // toolStrip1
+            // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.lblQueryMode,
+            this.cmbQueryMode,
+            this.toolStripSeparator2,
+            this.btnQuery,
+            this.btnCancel,
+            this.toolStripSeparator1,
+            this.btnClear});
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.toolStrip1.Name = "toolStrip1";
+            this.toolStrip1.Size = new System.Drawing.Size(589, 25);
+            this.toolStrip1.TabIndex = 1;
+            this.toolStrip1.Text = "toolStrip1";
+            // 
+            // lblQueryMode
+            // 
+            this.lblQueryMode.Name = "lblQueryMode";
+            this.lblQueryMode.Size = new System.Drawing.Size(66, 22);
+            this.lblQueryMode.Text = "Query Mode";
+            // 
+            // cmbQueryMode
+            // 
+            this.cmbQueryMode.Name = "cmbQueryMode";
+            this.cmbQueryMode.Size = new System.Drawing.Size(121, 25);
+            this.cmbQueryMode.SelectedIndexChanged += new System.EventHandler(this.cmbQueryMode_SelectedIndexChanged);
+            // 
+            // toolStripSeparator2
+            // 
+            this.toolStripSeparator2.Name = "toolStripSeparator2";
+            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
+            // 
+            // btnQuery
+            // 
+            this.btnQuery.Image = ((System.Drawing.Image)(resources.GetObject("btnQuery.Image")));
+            this.btnQuery.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnQuery.Name = "btnQuery";
+            this.btnQuery.Size = new System.Drawing.Size(79, 22);
+            this.btnQuery.Text = "Run Query";
+            this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.Image")));
+            this.btnCancel.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(49, 22);
+            this.btnCancel.Text = "Stop";
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+            // 
+            // toolStripSeparator1
+            // 
+            this.toolStripSeparator1.Name = "toolStripSeparator1";
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+            // 
+            // btnClear
+            // 
+            this.btnClear.Image = ((System.Drawing.Image)(resources.GetObject("btnClear.Image")));
+            this.btnClear.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnClear.Name = "btnClear";
+            this.btnClear.Size = new System.Drawing.Size(52, 22);
+            this.btnClear.Text = "Clear";
+            this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
+            // 
+            // lblResults
+            // 
+            this.lblResults.AutoSize = true;
+            this.lblResults.Location = new System.Drawing.Point(5, 460);
+            this.lblResults.Name = "lblResults";
+            this.lblResults.Size = new System.Drawing.Size(0, 13);
+            this.lblResults.TabIndex = 3;
+            // 
+            // queryPanel
+            // 
+            this.queryPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.queryPanel.Location = new System.Drawing.Point(0, 0);
+            this.queryPanel.Name = "queryPanel";
+            this.queryPanel.Size = new System.Drawing.Size(589, 171);
+            this.queryPanel.TabIndex = 4;
+            // 
+            // splitContainer1
+            // 
+            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainer1.Location = new System.Drawing.Point(0, 25);
+            this.splitContainer1.Name = "splitContainer1";
+            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // splitContainer1.Panel1
+            // 
+            this.splitContainer1.Panel1.Controls.Add(this.queryPanel);
+            // 
+            // splitContainer1.Panel2
+            // 
+            this.splitContainer1.Panel2.Controls.Add(this.grdResults);
+            this.splitContainer1.Size = new System.Drawing.Size(589, 455);
+            this.splitContainer1.SplitterDistance = 171;
+            this.splitContainer1.TabIndex = 5;
+            // 
+            // ClassPreviewCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.splitContainer1);
+            this.Controls.Add(this.lblResults);
+            this.Controls.Add(this.toolStrip1);
+            this.Name = "ClassPreviewCtrl";
+            this.Size = new System.Drawing.Size(589, 480);
+            ((System.ComponentModel.ISupportInitialize)(this.grdResults)).EndInit();
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
+            this.splitContainer1.Panel1.ResumeLayout(false);
+            this.splitContainer1.Panel2.ResumeLayout(false);
+            this.splitContainer1.ResumeLayout(false);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.DataGridView grdResults;
+        private System.Windows.Forms.ToolStrip toolStrip1;
+        private System.Windows.Forms.ToolStripButton btnQuery;
+        private System.Windows.Forms.ToolStripButton btnCancel;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+        private System.Windows.Forms.ToolStripButton btnClear;
+        private System.Windows.Forms.Label lblResults;
+        private System.Windows.Forms.ToolStripLabel lblQueryMode;
+        private System.Windows.Forms.ToolStripComboBox cmbQueryMode;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+        private System.Windows.Forms.Panel queryPanel;
+        private System.Windows.Forms.SplitContainer splitContainer1;
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,145 @@
+#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.MaestroAPI;
+using OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview.Query;
+
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    public partial class ClassPreviewCtrl : UserControl
+    {
+        enum QueryMode
+        {
+            Standard,
+            Aggregate
+        }
+
+        private ServerConnectionI _conn;
+        private FdoProviderCapabilities _caps;
+        private FeatureSourceDescription.FeatureSourceSchema _schema;
+        private string _featureSourceId;
+        private string _provider;
+
+        private Dictionary<QueryMode, Control> _queryControls;
+
+        public ClassPreviewCtrl(EditorInterface ed, string provider, FeatureSourceDescription.FeatureSourceSchema schema, string featureSourceId)
+        {
+            InitializeComponent();
+            _conn = ed.CurrentConnection;
+            _caps = _conn.GetProviderCapabilities(provider);
+            _featureSourceId = featureSourceId;
+            _provider = provider;
+            _schema = schema;
+            _queryControls = new Dictionary<QueryMode, Control>();
+
+            List<QueryMode> modes = new List<QueryMode>();
+            foreach (FdoProviderCapabilitiesCommandName cmd in _caps.Command.SupportedCommands)
+            {
+                if (cmd == FdoProviderCapabilitiesCommandName.Select)
+                {
+                    modes.Add(QueryMode.Standard);
+                    _queryControls[QueryMode.Standard] = new StandardQueryCtrl(ed, _provider, _schema, _featureSourceId);
+                    _queryControls[QueryMode.Standard].Dock = DockStyle.Fill;
+                }
+            }
+            cmbQueryMode.ComboBox.DataSource = modes;
+            cmbQueryMode.ComboBox.SelectedIndex = 0;
+        }
+
+        private QueryMode _selectedMode;
+
+        private void btnQuery_Click(object sender, EventArgs e)
+        {
+            Control qc = _queryControls[_selectedMode];
+            FeatureSetReader reader = null;
+            if (typeof(StandardQueryCtrl).IsAssignableFrom(qc.GetType()))
+            {
+                StandardQueryCtrl std = (StandardQueryCtrl)qc;
+                reader = _conn.QueryFeatureSource(_featureSourceId, _schema.Fullname, std.Filter, std.Properties, std.ComputedProperties);
+            }
+
+            if (reader != null)
+            {
+                DataTable table = new DataTable();
+                foreach (FeatureSetColumn col in reader.Columns)
+                {
+                    if (col.Type == typeof(Topology.Geometries.IGeometry))
+                        table.Columns.Add(col.Name, typeof(string)); //We want to "visualise" the textual form
+                    else
+                        table.Columns.Add(col.Name, col.Type);
+                }
+                while (reader.Read())
+                {
+                    var drow = table.NewRow();
+                    var row = reader.Row;
+                    foreach (FeatureSetColumn col in reader.Columns)
+                    {
+                        if (!row.IsValueNull(col.Name))
+                        {
+                            if (col.Type == typeof(Topology.Geometries.IGeometry))
+                                drow[col.Name] = ((Topology.Geometries.IGeometry)row[col.Name]).AsText();
+                            else
+                                drow[col.Name] = row[col.Name];
+                        }
+                        else
+                        {
+                            drow[col.Name] = DBNull.Value;
+                        }
+                    }
+                    table.Rows.Add(drow);
+                }
+                grdResults.DataSource = table;
+            }
+        }
+
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void btnClear_Click(object sender, EventArgs e)
+        {
+            grdResults.DataSource = null;
+        }
+
+        private void btnPreviewMap_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void cmbQueryMode_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            _selectedMode = (QueryMode)cmbQueryMode.ComboBox.SelectedItem;
+            LoadQueryControl();
+        }
+
+        private void LoadQueryControl()
+        {
+            queryPanel.Controls.Clear();
+            queryPanel.Controls.Add(_queryControls[_selectedMode]);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.resx	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,169 @@
+<?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>
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnQuery.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAk1JREFUOE+l01tI
+        U3EcB/ATvfRUPhVJFEbS5SkJCbvQgzHqKfYQgomm1lpNNmsWuB3KOYZL0aaMTbtMdzPXhSQx0y6Y3cyV
+        URR0GT0JE63UbWdn29n27f8/Z0oPvcx+8IPz8Pt9/r//5TDM/4a81qdq7Q9E9DcD0PWS9HxDvesLLvR8
+        xnnHJ2hvfMS5q+9R2zUJjc2PGusb6LpeRGifuLbpTiDVMTyNbFNtGU2JAF15OaloGYUI6DzfsZyobnoi
+        AfXur2J/XEgiRpKPC4jwAkJ8AvNcHL/CPGbmogjOcpiaCeNHMCTWHzeNZAByYDQSqRQSyaQIRRMCuJgE
+        LUQF/I7EMBsi0DyP6Z9Rsb7cMCQB9LRpJAkgUIRknEA8gTg6DYHCBKrtPYCT3QUIzi2I9WUXByWAXpUI
+        pNMisAjFyXeMQgSh0GlXEQwDpSjp3Eam5FHK3pcA7fUPSwBFFiGNdz/UniIoXYWochSAvXcUt/ztqLt9
+        BDLLepTofRKgsb+VAJKpzCQUUbl3o3/ShrvvrGJjn98Cy+M6OF83Q+mVobBpFXaZmTWM2jqxdIvpDJIi
+        QDXZL21uG9Hg8kMVTA8UaBioROPgKXSOGVHWsw/5l5gkU9Mx/s9ncOzadvgmLPCOt8L5qhmOl2aCnIF9
+        rBEK7yHks6uRq2N2MvKzfT5l23PQl3XC/BSVpkeoMA5Dbt+Mw+0bUHxlLfa25KC8ew9szxpQ5ZZhC5uD
+        g1rDUFb/4Q7jCq7CWYxNemYql2W2ZtVMi/NYhtuoX4l1eibv7+Y/FR5+Jxf1bhgAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="btnCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAb1JREFUOE+tU0ur
+        QVEY9aP8JyP8hYOxFAkxMlAyMDBSyh5ISeTRJgMD7+fG8YiQ7+61s4+Ua3C7u1bKOevxrW8fm+2/T7fb
+        tUsYEqzT6QjOuWi326zZbBq1Ws3+1a/X6zkkka9WKzqdTnS/3xWOxyPN53OSArxarTo+ijzJ5uVyIRz8
+        7vd7Mk2Tzuez+g+ilUrFLJfL7yLP2FyTt9stbTYbEkIorNdrQiotUiwWucRrHMysX/iNvFgsCMDp9/uU
+        y+UMaxRZFEM8RNWubrebAJfLRT6fT5HRA/pAukwmwywB2bJAWbvdTgkgDYgaEJjNZjSdTpXQ9XqlVCol
+        LIFWq6UEEB/k5XJpkZ1OJ3m9XppMJgo6RTKZfAk0Gg2GxjGGnhWuIAIej0eRx+Ox2sxgMKBEIvEaQe7X
+        wMPH46EcdFztimej0YiGwyHdbjeSa6RYLPYqUe7WXiqVODrA+USEKwwgIsk8Go2+38pCoeDI5/Mmdo4X
+        D4eDlQaXCc4QkWQzGAx+vo3ZbNaRTqd5vV5XjaMTzIy9M8YoFArxQCDwmaxXItdjj8fjRiQSYeFwWEg3
+        IUnM7/cbUuD7x/SXL/sHCiZAjuFjQpEAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="btnClear.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgJJREFUOE+Vk21v
+        0lAYhhcTk8a/YEwT9Qs2hixb/DJt1ykvkqlkOlYoa+VFNnFANwikG4L6QRN/if+KmMVMRTqF0UJpe3to
+        whShJmtykpOc57qet3Rh4YIfcrkrnohTLtNOtcp4BQylLDMQxZIeS7AzMWMYtUM4VRWOosxIhpLEDFJZ
+        DHfz6EaffupGor5zyQRG4y0ccuz9Cob5/LnEheU0RoUSUG9gfNdCD0toNi+5EnKhbKVsO4evgQ8fYat1
+        jF7uYVyyC0spmHtFgLwbcgqngbCFpaXLU21AblKjV0XLrtSAd+9hlasYpLMwtp/DzBcA9ci9aw9CVovj
+        qLlzgixTg0zOGhUUoPEGOGoQsA7UVBhJCdr9oDc8MY4l/XjShkraESVAEIFKFdpawPbM/Hc5PUFiDHEb
+        INtALA482wKUA/wMhtFZWfFcsevoCQKjJ5IwszvAQYWAZaBI2iEDNDa3oN3jcOL3z5e4cFyEmckBZI26
+        kEBndc1q32Xts0dRYGcX/cdRtJfv4MTnm5a4MOnVTL8gWfehk9I7HO8ObHy+Li5b3UAISGdwFo7g220/
+        Pl+78UfS29jg+zEBZioDfVPAD3Z1atotmqO+3GKsXxwPPbKO7/5FHF+l+alVngYjfHf9CYG5udNu0TR1
+        fP2mNReemNosy/9vVa7k38wX/Jtnwn8DGRVJ7n3xXjwAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.Designer.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,109 @@
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    partial class FeatureSourcePreviewCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FeatureSourcePreviewCtrl));
+            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+            this.tabPreviews = new System.Windows.Forms.TabControl();
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.btnCloseTab = new System.Windows.Forms.ToolStripButton();
+            this.splitContainer1.Panel2.SuspendLayout();
+            this.splitContainer1.SuspendLayout();
+            this.toolStrip1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // splitContainer1
+            // 
+            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+            this.splitContainer1.Name = "splitContainer1";
+            // 
+            // splitContainer1.Panel2
+            // 
+            this.splitContainer1.Panel2.Controls.Add(this.tabPreviews);
+            this.splitContainer1.Panel2.Controls.Add(this.toolStrip1);
+            this.splitContainer1.Size = new System.Drawing.Size(621, 437);
+            this.splitContainer1.SplitterDistance = 207;
+            this.splitContainer1.TabIndex = 0;
+            // 
+            // tabPreviews
+            // 
+            this.tabPreviews.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.tabPreviews.Location = new System.Drawing.Point(0, 25);
+            this.tabPreviews.Name = "tabPreviews";
+            this.tabPreviews.SelectedIndex = 0;
+            this.tabPreviews.Size = new System.Drawing.Size(410, 412);
+            this.tabPreviews.TabIndex = 2;
+            // 
+            // toolStrip1
+            // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.btnCloseTab});
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.toolStrip1.Name = "toolStrip1";
+            this.toolStrip1.Size = new System.Drawing.Size(410, 25);
+            this.toolStrip1.TabIndex = 1;
+            this.toolStrip1.Text = "toolStrip1";
+            // 
+            // btnCloseTab
+            // 
+            this.btnCloseTab.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+            this.btnCloseTab.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.btnCloseTab.Enabled = false;
+            this.btnCloseTab.Image = ((System.Drawing.Image)(resources.GetObject("btnCloseTab.Image")));
+            this.btnCloseTab.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnCloseTab.Name = "btnCloseTab";
+            this.btnCloseTab.Size = new System.Drawing.Size(23, 22);
+            this.btnCloseTab.Click += new System.EventHandler(this.btnCloseTab_Click);
+            // 
+            // FeatureSourcePreviewCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.splitContainer1);
+            this.Name = "FeatureSourcePreviewCtrl";
+            this.Size = new System.Drawing.Size(621, 437);
+            this.splitContainer1.Panel2.ResumeLayout(false);
+            this.splitContainer1.Panel2.PerformLayout();
+            this.splitContainer1.ResumeLayout(false);
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.SplitContainer splitContainer1;
+        private System.Windows.Forms.TabControl tabPreviews;
+        private System.Windows.Forms.ToolStrip toolStrip1;
+        private System.Windows.Forms.ToolStripButton btnCloseTab;
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,155 @@
+#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    public partial class FeatureSourcePreviewCtrl : UserControl
+    {
+        private EditorInterface _ed;
+        private string _provider;
+        private string _featureSourceId;
+
+        private Dictionary<string, TabPage> _openPreviews;
+        private FeatureSourceDescription _schemas;
+        private SchemaViewCtrl _schemaView;
+
+        private string _sqlPreviewKey;
+
+        public FeatureSourcePreviewCtrl(EditorInterface ed, string provider, string featureSourceId)
+        {
+            InitializeComponent();
+            _ed = ed;
+            _provider = provider;
+            _featureSourceId = featureSourceId;
+            _openPreviews = new Dictionary<string, TabPage>();
+
+            var caps = ed.CurrentConnection.GetProviderCapabilities(provider);
+            bool sqlSupported = false;
+            foreach(FdoProviderCapabilitiesCommandName cmd in caps.Command.SupportedCommands)
+            {
+                if (cmd == FdoProviderCapabilitiesCommandName.SQLCommand)
+                    sqlSupported = true;
+            }
+
+            _schemaView = new SchemaViewCtrl();
+            _schemaView.Dock = DockStyle.Fill;
+            _schemaView.SqlSupported = sqlSupported;
+            _schemaView.OnRequestPreviewClass += new SchemaViewCtrl.PreviewClassEventHandler(OnRequestClassPreview);
+            _schemaView.RequestRefresh += new EventHandler(OnRequestRefresh);
+            _schemaView.RequestSqlQuery += new EventHandler(OnRequestSqlQuery);
+            splitContainer1.Panel1.Controls.Add(_schemaView);
+
+            _sqlPreviewKey = Guid.NewGuid().ToString();
+
+            try
+            {
+                RefreshSchemas();
+            }
+            catch { } //Can happen when initally loaded
+        }
+
+        void OnRequestSqlQuery(object sender, EventArgs e)
+        {
+            if (_openPreviews.ContainsKey(_sqlPreviewKey))
+            {
+                tabPreviews.SelectedTab = _openPreviews[_sqlPreviewKey];
+            }
+            else
+            {
+                TabPage page = new TabPage();
+                page.Name = _sqlPreviewKey;
+                page.Text = "SQL Query"; //TODO: Localize
+
+                SqlPreviewCtrl ctl = new SqlPreviewCtrl(_ed);
+                ctl.Dock = DockStyle.Fill;
+                page.Controls.Add(ctl);
+
+                _openPreviews[_sqlPreviewKey] = page;
+                tabPreviews.TabPages.Add(page);
+                tabPreviews.SelectedTab = page;
+            }
+            CheckCloseTabStatus();
+        }
+
+        void OnRequestRefresh(object sender, EventArgs e)
+        {
+            RefreshSchemas();
+        }
+
+        void RefreshSchemas()
+        {
+            _schemas = _ed.CurrentConnection.DescribeFeatureSource(_featureSourceId);
+            _schemaView.Schemas = _schemas;
+        }
+
+        void OnRequestClassPreview(string className)
+        {
+            if (_openPreviews.ContainsKey(className))
+            {
+                tabPreviews.SelectedTab = _openPreviews[className];
+            }
+            else
+            {
+                foreach (FeatureSourceDescription.FeatureSourceSchema cls in _schemas.Schemas)
+                {
+                    FeatureSourceDescription.FeatureSourceSchema c = cls;
+                    if (cls.Fullname == className)
+                    {
+                        TabPage page = new TabPage();
+                        page.Name = className;
+                        page.Text = className;
+
+                        ClassPreviewCtrl ctl = new ClassPreviewCtrl(_ed, _provider, c, _featureSourceId);
+                        ctl.Dock = DockStyle.Fill;
+                        page.Controls.Add(ctl);
+
+                        _openPreviews[className] = page;
+                        tabPreviews.TabPages.Add(page);
+                        tabPreviews.SelectedTab = page;
+                    }
+                }
+            }
+            CheckCloseTabStatus();
+        }
+
+        private void btnCloseTab_Click(object sender, EventArgs e)
+        {
+            TabPage page = tabPreviews.SelectedTab;
+            tabPreviews.TabPages.Remove(page);
+            _openPreviews.Remove(page.Name);
+            page.Dispose();
+
+            CheckCloseTabStatus();
+        }
+
+        private void CheckCloseTabStatus()
+        {
+            btnCloseTab.Enabled = tabPreviews.TabPages.Count > 0;
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/FeatureSourcePreviewCtrl.resx	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,139 @@
+<?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>
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnCloseTab.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgJJREFUOE+Vk21v
+        0lAYhhcTk8a/YEwT9Qs2hixb/DJt1ykvkqlkOlYoa+VFNnFANwikG4L6QRN/if+KmMVMRTqF0UJpe3to
+        whShJmtykpOc57qet3Rh4YIfcrkrnohTLtNOtcp4BQylLDMQxZIeS7AzMWMYtUM4VRWOosxIhpLEDFJZ
+        DHfz6EaffupGor5zyQRG4y0ccuz9Cob5/LnEheU0RoUSUG9gfNdCD0toNi+5EnKhbKVsO4evgQ8fYat1
+        jF7uYVyyC0spmHtFgLwbcgqngbCFpaXLU21AblKjV0XLrtSAd+9hlasYpLMwtp/DzBcA9ci9aw9CVovj
+        qLlzgixTg0zOGhUUoPEGOGoQsA7UVBhJCdr9oDc8MY4l/XjShkraESVAEIFKFdpawPbM/Hc5PUFiDHEb
+        INtALA482wKUA/wMhtFZWfFcsevoCQKjJ5IwszvAQYWAZaBI2iEDNDa3oN3jcOL3z5e4cFyEmckBZI26
+        kEBndc1q32Xts0dRYGcX/cdRtJfv4MTnm5a4MOnVTL8gWfehk9I7HO8ObHy+Li5b3UAISGdwFo7g220/
+        Pl+78UfS29jg+zEBZioDfVPAD3Z1atotmqO+3GKsXxwPPbKO7/5FHF+l+alVngYjfHf9CYG5udNu0TR1
+        fP2mNReemNosy/9vVa7k38wX/Jtnwn8DGRVJ7n3xXjwAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.Designer.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,225 @@
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview.Query
+{
+    partial class StandardQueryCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.txtFilter = new System.Windows.Forms.TextBox();
+            this.lblFilter = new System.Windows.Forms.Label();
+            this.tabProperties = new System.Windows.Forms.TabControl();
+            this.TAB_SELECTED = new System.Windows.Forms.TabPage();
+            this.btnCheckNone = new System.Windows.Forms.Button();
+            this.btnCheckAll = new System.Windows.Forms.Button();
+            this.chkProperties = new System.Windows.Forms.CheckedListBox();
+            this.TAB_COMPUTED = new System.Windows.Forms.TabPage();
+            this.btnDelete = new System.Windows.Forms.Button();
+            this.btnAdd = new System.Windows.Forms.Button();
+            this.grdExpressions = new System.Windows.Forms.DataGridView();
+            this.COL_ALIAS = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.COL_EXPR = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.tabProperties.SuspendLayout();
+            this.TAB_SELECTED.SuspendLayout();
+            this.TAB_COMPUTED.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.grdExpressions)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // txtFilter
+            // 
+            this.txtFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)));
+            this.txtFilter.Location = new System.Drawing.Point(15, 24);
+            this.txtFilter.Multiline = true;
+            this.txtFilter.Name = "txtFilter";
+            this.txtFilter.Size = new System.Drawing.Size(153, 139);
+            this.txtFilter.TabIndex = 7;
+            this.txtFilter.Enter += new System.EventHandler(this.txtFilter_Enter);
+            // 
+            // lblFilter
+            // 
+            this.lblFilter.AutoSize = true;
+            this.lblFilter.Location = new System.Drawing.Point(12, 8);
+            this.lblFilter.Name = "lblFilter";
+            this.lblFilter.Size = new System.Drawing.Size(29, 13);
+            this.lblFilter.TabIndex = 6;
+            this.lblFilter.Text = "Filter";
+            // 
+            // tabProperties
+            // 
+            this.tabProperties.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.tabProperties.Appearance = System.Windows.Forms.TabAppearance.FlatButtons;
+            this.tabProperties.Controls.Add(this.TAB_SELECTED);
+            this.tabProperties.Controls.Add(this.TAB_COMPUTED);
+            this.tabProperties.Location = new System.Drawing.Point(174, 8);
+            this.tabProperties.Name = "tabProperties";
+            this.tabProperties.SelectedIndex = 0;
+            this.tabProperties.Size = new System.Drawing.Size(326, 165);
+            this.tabProperties.TabIndex = 8;
+            // 
+            // TAB_SELECTED
+            // 
+            this.TAB_SELECTED.Controls.Add(this.btnCheckNone);
+            this.TAB_SELECTED.Controls.Add(this.btnCheckAll);
+            this.TAB_SELECTED.Controls.Add(this.chkProperties);
+            this.TAB_SELECTED.Location = new System.Drawing.Point(4, 25);
+            this.TAB_SELECTED.Name = "TAB_SELECTED";
+            this.TAB_SELECTED.Padding = new System.Windows.Forms.Padding(3);
+            this.TAB_SELECTED.Size = new System.Drawing.Size(318, 136);
+            this.TAB_SELECTED.TabIndex = 0;
+            this.TAB_SELECTED.Text = "Selected Properties";
+            this.TAB_SELECTED.UseVisualStyleBackColor = true;
+            // 
+            // btnCheckNone
+            // 
+            this.btnCheckNone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.btnCheckNone.Location = new System.Drawing.Point(89, 106);
+            this.btnCheckNone.Name = "btnCheckNone";
+            this.btnCheckNone.Size = new System.Drawing.Size(75, 23);
+            this.btnCheckNone.TabIndex = 2;
+            this.btnCheckNone.Text = "Check None";
+            this.btnCheckNone.UseVisualStyleBackColor = true;
+            // 
+            // btnCheckAll
+            // 
+            this.btnCheckAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.btnCheckAll.Location = new System.Drawing.Point(7, 106);
+            this.btnCheckAll.Name = "btnCheckAll";
+            this.btnCheckAll.Size = new System.Drawing.Size(75, 23);
+            this.btnCheckAll.TabIndex = 1;
+            this.btnCheckAll.Text = "Check All";
+            this.btnCheckAll.UseVisualStyleBackColor = true;
+            // 
+            // chkProperties
+            // 
+            this.chkProperties.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.chkProperties.FormattingEnabled = true;
+            this.chkProperties.Location = new System.Drawing.Point(0, 0);
+            this.chkProperties.Name = "chkProperties";
+            this.chkProperties.Size = new System.Drawing.Size(318, 94);
+            this.chkProperties.TabIndex = 0;
+            // 
+            // TAB_COMPUTED
+            // 
+            this.TAB_COMPUTED.Controls.Add(this.btnDelete);
+            this.TAB_COMPUTED.Controls.Add(this.btnAdd);
+            this.TAB_COMPUTED.Controls.Add(this.grdExpressions);
+            this.TAB_COMPUTED.Location = new System.Drawing.Point(4, 25);
+            this.TAB_COMPUTED.Name = "TAB_COMPUTED";
+            this.TAB_COMPUTED.Padding = new System.Windows.Forms.Padding(3);
+            this.TAB_COMPUTED.Size = new System.Drawing.Size(318, 136);
+            this.TAB_COMPUTED.TabIndex = 1;
+            this.TAB_COMPUTED.Text = "Computed Properties";
+            this.TAB_COMPUTED.UseVisualStyleBackColor = true;
+            // 
+            // btnDelete
+            // 
+            this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.btnDelete.Location = new System.Drawing.Point(88, 107);
+            this.btnDelete.Name = "btnDelete";
+            this.btnDelete.Size = new System.Drawing.Size(75, 23);
+            this.btnDelete.TabIndex = 2;
+            this.btnDelete.Text = "Delete";
+            this.btnDelete.UseVisualStyleBackColor = true;
+            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
+            // 
+            // btnAdd
+            // 
+            this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.btnAdd.Location = new System.Drawing.Point(6, 107);
+            this.btnAdd.Name = "btnAdd";
+            this.btnAdd.Size = new System.Drawing.Size(75, 23);
+            this.btnAdd.TabIndex = 1;
+            this.btnAdd.Text = "Add";
+            this.btnAdd.UseVisualStyleBackColor = true;
+            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+            // 
+            // grdExpressions
+            // 
+            this.grdExpressions.AllowUserToAddRows = false;
+            this.grdExpressions.AllowUserToDeleteRows = false;
+            this.grdExpressions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdExpressions.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdExpressions.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.COL_ALIAS,
+            this.COL_EXPR});
+            this.grdExpressions.Location = new System.Drawing.Point(0, 0);
+            this.grdExpressions.Name = "grdExpressions";
+            this.grdExpressions.Size = new System.Drawing.Size(318, 100);
+            this.grdExpressions.TabIndex = 0;
+            // 
+            // COL_ALIAS
+            // 
+            this.COL_ALIAS.HeaderText = "Alias";
+            this.COL_ALIAS.Name = "COL_ALIAS";
+            // 
+            // COL_EXPR
+            // 
+            this.COL_EXPR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.COL_EXPR.HeaderText = "Expression";
+            this.COL_EXPR.Name = "COL_EXPR";
+            // 
+            // StandardQueryCtl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.tabProperties);
+            this.Controls.Add(this.txtFilter);
+            this.Controls.Add(this.lblFilter);
+            this.Name = "StandardQueryCtl";
+            this.Size = new System.Drawing.Size(503, 176);
+            this.tabProperties.ResumeLayout(false);
+            this.TAB_SELECTED.ResumeLayout(false);
+            this.TAB_COMPUTED.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.grdExpressions)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.TextBox txtFilter;
+        private System.Windows.Forms.Label lblFilter;
+        private System.Windows.Forms.TabControl tabProperties;
+        private System.Windows.Forms.TabPage TAB_SELECTED;
+        private System.Windows.Forms.TabPage TAB_COMPUTED;
+        private System.Windows.Forms.Button btnCheckNone;
+        private System.Windows.Forms.Button btnCheckAll;
+        private System.Windows.Forms.CheckedListBox chkProperties;
+        private System.Windows.Forms.Button btnDelete;
+        private System.Windows.Forms.Button btnAdd;
+        private System.Windows.Forms.DataGridView grdExpressions;
+        private System.Windows.Forms.DataGridViewTextBoxColumn COL_ALIAS;
+        private System.Windows.Forms.DataGridViewTextBoxColumn COL_EXPR;
+
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,117 @@
+#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections.Specialized;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview.Query
+{
+    public partial class StandardQueryCtrl : UserControl
+    {
+        private EditorInterface _ed;
+        private FeatureSourceDescription.FeatureSourceSchema _schema;
+        private string _featureSourceId;
+        private string _provider;
+
+        public StandardQueryCtrl(EditorInterface ed, string provider, FeatureSourceDescription.FeatureSourceSchema schema, string featureSourceId)
+        {
+            InitializeComponent();
+            _ed = ed;
+            _schema = schema;
+            _featureSourceId = featureSourceId;
+            _provider = provider;
+
+            foreach (FeatureSetColumn col in schema.Columns)
+            {
+                chkProperties.Items.Add(col.Name, true);
+            }
+        }
+
+        public string Filter
+        {
+            get { return txtFilter.Text; }
+        }
+
+        public string[] Properties
+        {
+            get
+            {
+                List<string> props = new List<string>();
+                foreach (object obj in chkProperties.CheckedItems)
+                {
+                    props.Add(obj.ToString());
+                }
+                return props.ToArray();
+            }
+        }
+
+        public NameValueCollection ComputedProperties
+        {
+            get
+            {
+                NameValueCollection nvc = new NameValueCollection();
+                foreach (DataGridViewRow row in grdExpressions.Rows)
+                {
+                    if (row.Cells[0].Value != null && row.Cells[1].Value != null)
+                    {
+                        nvc.Add(row.Cells[0].Value.ToString(), row.Cells[1].Value.ToString());
+                    }
+                }
+                return nvc;
+            }
+        }
+
+        private void txtFilter_Enter(object sender, EventArgs e)
+        {
+            string filter = _ed.EditExpression(txtFilter.Text, _schema, _provider, _featureSourceId);
+            if (!string.IsNullOrEmpty(filter))
+            {
+                txtFilter.Text = filter;
+            }
+        }
+
+        private void btnDelete_Click(object sender, EventArgs e)
+        {
+            if (grdExpressions.SelectedRows.Count == 1)
+            {
+                grdExpressions.Rows.Remove(grdExpressions.SelectedRows[0]);
+            }
+        }
+
+        private int exprCounter = 0;
+
+        private void btnAdd_Click(object sender, EventArgs e)
+        {
+            string expr = _ed.EditExpression("", _schema, _provider, _featureSourceId);
+            if (!string.IsNullOrEmpty(expr))
+            {
+                string alias = "Expr" + exprCounter++;
+
+                grdExpressions.Rows.Add(alias, expr);
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/Query/StandardQueryCtrl.resx	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,126 @@
+<?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>
+  <metadata name="COL_ALIAS.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="COL_EXPR.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.Designer.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,113 @@
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    partial class SchemaViewCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SchemaViewCtrl));
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.btnRefresh = new System.Windows.Forms.ToolStripButton();
+            this.trvSchema = new System.Windows.Forms.TreeView();
+            this.btnStdQuery = new System.Windows.Forms.ToolStripButton();
+            this.btnSqlQuery = new System.Windows.Forms.ToolStripButton();
+            this.toolStrip1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // toolStrip1
+            // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.btnRefresh,
+            this.btnStdQuery,
+            this.btnSqlQuery});
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.toolStrip1.Name = "toolStrip1";
+            this.toolStrip1.Size = new System.Drawing.Size(229, 25);
+            this.toolStrip1.TabIndex = 0;
+            this.toolStrip1.Text = "toolStrip1";
+            // 
+            // btnRefresh
+            // 
+            this.btnRefresh.Image = ((System.Drawing.Image)(resources.GetObject("btnRefresh.Image")));
+            this.btnRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnRefresh.Name = "btnRefresh";
+            this.btnRefresh.Size = new System.Drawing.Size(65, 22);
+            this.btnRefresh.Text = "Refresh";
+            this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
+            // 
+            // trvSchema
+            // 
+            this.trvSchema.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.trvSchema.Location = new System.Drawing.Point(0, 25);
+            this.trvSchema.Name = "trvSchema";
+            this.trvSchema.Size = new System.Drawing.Size(229, 322);
+            this.trvSchema.TabIndex = 1;
+            this.trvSchema.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.trvSchema_AfterSelect);
+            // 
+            // btnStdQuery
+            // 
+            this.btnStdQuery.Enabled = false;
+            this.btnStdQuery.Image = ((System.Drawing.Image)(resources.GetObject("btnStdQuery.Image")));
+            this.btnStdQuery.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnStdQuery.Name = "btnStdQuery";
+            this.btnStdQuery.Size = new System.Drawing.Size(71, 22);
+            this.btnStdQuery.Text = "Standard";
+            this.btnStdQuery.Click += new System.EventHandler(this.btnStdQuery_Click);
+            // 
+            // btnSqlQuery
+            // 
+            this.btnSqlQuery.Enabled = false;
+            this.btnSqlQuery.Image = ((System.Drawing.Image)(resources.GetObject("btnSqlQuery.Image")));
+            this.btnSqlQuery.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnSqlQuery.Name = "btnSqlQuery";
+            this.btnSqlQuery.Size = new System.Drawing.Size(46, 22);
+            this.btnSqlQuery.Text = "SQL";
+            this.btnSqlQuery.Click += new System.EventHandler(this.btnSqlQuery_Click);
+            // 
+            // SchemaViewCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.trvSchema);
+            this.Controls.Add(this.toolStrip1);
+            this.Name = "SchemaViewCtrl";
+            this.Size = new System.Drawing.Size(229, 347);
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ToolStrip toolStrip1;
+        private System.Windows.Forms.ToolStripButton btnRefresh;
+        private System.Windows.Forms.TreeView trvSchema;
+        private System.Windows.Forms.ToolStripButton btnStdQuery;
+        private System.Windows.Forms.ToolStripButton btnSqlQuery;
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,124 @@
+#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    public partial class SchemaViewCtrl : UserControl
+    {
+        public bool SqlSupported
+        {
+            get { return btnSqlQuery.Enabled; }
+            set { btnSqlQuery.Enabled = value; }
+        }
+
+        public delegate void PreviewClassEventHandler(string className);
+
+        public event PreviewClassEventHandler OnRequestPreviewClass;
+
+        public event EventHandler RequestRefresh;
+
+        public event EventHandler RequestSqlQuery;
+
+        public SchemaViewCtrl()
+        {
+            InitializeComponent();
+        }
+
+        private FeatureSourceDescription _schemas;
+
+        public FeatureSourceDescription Schemas
+        {
+            get { return _schemas; }
+            set
+            {
+                _schemas = value;
+                trvSchema.Nodes.Clear();
+
+                Dictionary<string, List<FeatureSourceDescription.FeatureSourceSchema>> schemas = new Dictionary<string, List<FeatureSourceDescription.FeatureSourceSchema>>();
+
+                foreach (FeatureSourceDescription.FeatureSourceSchema sc in _schemas.Schemas)
+                {
+                    if (!schemas.ContainsKey(sc.Schema))
+                        schemas[sc.Schema] = new List<FeatureSourceDescription.FeatureSourceSchema>();
+
+                    schemas[sc.Schema].Add(sc);
+                }
+
+                foreach (string schemaName in schemas.Keys)
+                {
+                    TreeNode schemaNode = new TreeNode(schemaName);
+
+                    foreach (FeatureSourceDescription.FeatureSourceSchema classDef in schemas[schemaName])
+                    {
+                        TreeNode classNode = new TreeNode(classDef.Name);
+                        classNode.Tag = classDef.Fullname;
+                        schemaNode.Nodes.Add(classNode);
+
+                        foreach (FeatureSetColumn propDef in classDef.Columns)
+                        {
+                            TreeNode propNode = new TreeNode(propDef.Name);
+                            classNode.Nodes.Add(propNode);
+                        }
+                    }
+
+                    trvSchema.Nodes.Add(schemaNode);
+                }
+            }
+        }
+
+        private void btnRefresh_Click(object sender, EventArgs e)
+        {
+            var handler = this.RequestRefresh;
+            if (handler != null)
+                handler(this, EventArgs.Empty);
+        }
+
+        private void btnSqlQuery_Click(object sender, EventArgs e)
+        {
+            var handler = this.RequestSqlQuery;
+            if (handler != null)
+                handler(this, EventArgs.Empty);
+        }
+
+        private void btnStdQuery_Click(object sender, EventArgs e)
+        {
+            var node = trvSchema.SelectedNode;
+            if (node.Level == 1)
+            {
+                var handler = this.OnRequestPreviewClass;
+                if (handler != null)
+                    handler(node.Tag.ToString()); //Tag has full name
+            }
+        }
+
+        private void trvSchema_AfterSelect(object sender, TreeViewEventArgs e)
+        {
+            btnStdQuery.Enabled = (e.Node.Level == 1);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SchemaViewCtrl.resx	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,181 @@
+<?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>
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnRefresh.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAA0JJREFUOE9VkulP
+        E0EYxks0QT/5B/hBjVdEhXiGxJgoCRElavAgErWWUmoFr6p4oERQVDRqvJV4BKMBFRWsUFQoBKQcCorB
+        HshVRAtCKz13tt3dPk5XrOFNnplJJs9v3mPCYk/UysInhW8dFyZZxPOSCePHS8IkwQiuoAsCEi4Q6Hba
+        AroRy0CGsTjRL97/i9Vn6t8PuYhtyOHh7R4Wdvd/2VwsbC4Ck9WFLM13JF8xe+P2aMPHAOLz9EO/XQzf
+        aPGjuY9D83cOTRYO+l4fajtZvDF6wHJAmZlBVmkfUq6ZmDGQuDN1jNPrQ2s/j0/9HN05fBQhPtR1sXhn
+        9FKAgFYrj7zGq8jVWhBzrLowlEX8+QYSBHymgLYfHD7/4EXYhz4/6rt9qOpg0PvLI5ZyovowsnVZiM2s
+        48YAHB4f2ukLX6naBwR8oRBtpwG5jXlIq9wBpXYb5KVbcFJ3GMffHkD8rZ1CCLAmr4GMUIBpIAAjNRuo
+        KrtNyGnIwd2269B8K0Zpx1O8MBei2PQIRYYCqEt2Ifby8i4RspoC7BRgHgyIMlHd+lSAmy0X8arjGbJr
+        jmBrUQISH67FQU069r9UIeaC9H8Gq3IbiM3tg3HUHMzikG4/UjRJkD7fjIzyY2ihjW3s9UNWIMfux2mI
+        ydaTaHX0RDGD2FN6MkznbRwtIQgQS7EKaP8poK3fjyMlOfhIR7yvMBMOxodlR/Uk1IMgbdDJwvAzIBr+
+        iqdTYaiZQ3qRGtIHyWimf6OJQpT5KViUMR+R++YgQjnTIllxtJ5YHQSby1gklhFsKifYSM8bNSzW3juI
+        tKdypD7ejmXZS7A0cwGSbifgcvNpKB5uwwz5tHxJ9KFa0m8n2FsnoMAMPDABd41Awp0NUD2R4XbrJdxo
+        uYCrH85RYy4uNuVAVSTDjOSpLVN2TF4hiVbXeDsHnAFVjYCdOh6p1RwU1byouOt7Ib2fiKT8DYhSR2Bu
+        +izMVk7HTPlKXjQHY6Gqqsfq9Lo6B91CzzCDniEGXaMadtPO35Bh/dl1cBMeDg8r+Px+x2xphSHUxMWq
+        t+lRijdVC5SV9iilloSUSs9UkamvSYQqgY9UlJMIRcXIPHmFLjJZm/IP8AfUT6BhOCZnQgAAAABJRU5E
+        rkJggg==
+</value>
+  </data>
+  <data name="btnStdQuery.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAqBJREFUOE9jZICC
+        08tizJkYmSoYGZhsGBiZhf7/+8fw79efd39+/zrC8PNPh2XO2pMwtRj0+WWxqeeXJz4/uzTu3OkFUTVn
+        5kdqHJ0ZpHF8VkjN8Zlh545ND39+qD8gFasBIJvBmhdHt529/0nz3INPIecefs4//+hzzoWHH30vPfyg
+        dGiCf9vhCUHP93V7mWMYcnZZ3PqzS+LOnbn/SePcw0+ZQFx5/tGnsnOPvpScf/i5EGhQ9Pn77xUO9vmf
+        29vhvR7DgHPL4l+fXhBRc+HxpyCg5gqI5s/FUM055x59ygK6yGVvq1fN3g7f15gGLE/8e2ZmpAbQpmyY
+        rTAvgFx0/uGndJArdtS7aezr8vuLYcCZpQl/QQEGUgjSeO7B5zyQYWcffsoAiz36lHLh4edwkAF727wx
+        DTgxP/r18WkhNWcfffGAuOJTFljz40+pQHby+YcfE84++mS3vdq1ZkedG6YXjs0IXX9saug5UEAB/R0G
+        1Zhy/tHHRJBmoDf8Lz7+KrOj0fP71gpnzLRwqN/P/MjUkOcH+vzbzt77Jn/+8WdHkJOBhoVeePjJBqT5
+        0MSQX5dW5//fV+zwf12+TSRGOOzv8ks91O//fG+nz7ndze41IP+C8PZK55oDPYF/r22p/P/4zMz/9470
+        /t/T7P9/Y7K5OIYh+9q8zHe3eK3f3er9GhRYe1q8/m6rc/+wu9Hn/+397f9fXF38/+X1pf9v7W74vzrZ
+        9u8ybIZgS6rrC+xjD/ZF/L9/tP//88sL/j84Pvn/ydmJ/9vcNe5sSjPmwpk/kCXWZNnE7mkJ/H99a+3/
+        a1vr/x+eGPZ/dbrZ21WhWjxEGQBStDLVLHZpjPH/nQ0e/1clmz9bGmksQrRmmMKVyRZCsyIMWubH23PA
+        xADc/aN/uvCtcwAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="btnSqlQuery.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAqBJREFUOE9jZICC
+        08tizJkYmSoYGZhsGBiZhf7/+8fw79efd39+/zrC8PNPh2XO2pMwtRj0+WWxqeeXJz4/uzTu3OkFUTVn
+        5kdqHJ0ZpHF8VkjN8Zlh545ND39+qD8gFasBIJvBmhdHt529/0nz3INPIecefs4//+hzzoWHH30vPfyg
+        dGiCf9vhCUHP93V7mWMYcnZZ3PqzS+LOnbn/SePcw0+ZQFx5/tGnsnOPvpScf/i5EGhQ9Pn77xUO9vmf
+        29vhvR7DgHPL4l+fXhBRc+HxpyCg5gqI5s/FUM055x59ygK6yGVvq1fN3g7f15gGLE/8e2ZmpAbQpmyY
+        rTAvgFx0/uGndJArdtS7aezr8vuLYcCZpQl/QQEGUgjSeO7B5zyQYWcffsoAiz36lHLh4edwkAF727wx
+        DTgxP/r18WkhNWcfffGAuOJTFljz40+pQHby+YcfE84++mS3vdq1ZkedG6YXjs0IXX9saug5UEAB/R0G
+        1Zhy/tHHRJBmoDf8Lz7+KrOj0fP71gpnzLRwqN/P/MjUkOcH+vzbzt77Jn/+8WdHkJOBhoVeePjJBqT5
+        0MSQX5dW5//fV+zwf12+TSRGOOzv8ks91O//fG+nz7ndze41IP+C8PZK55oDPYF/r22p/P/4zMz/9470
+        /t/T7P9/Y7K5OIYh+9q8zHe3eK3f3er9GhRYe1q8/m6rc/+wu9Hn/+397f9fXF38/+X1pf9v7W74vzrZ
+        9u8ybIZgS6rrC+xjD/ZF/L9/tP//88sL/j84Pvn/ydmJ/9vcNe5sSjPmwpk/kCXWZNnE7mkJ/H99a+3/
+        a1vr/x+eGPZ/dbrZ21WhWjxEGQBStDLVLHZpjPH/nQ0e/1clmz9bGmksQrRmmMKVyRZCsyIMWubH23PA
+        xADc/aN/uvCtcwAAAABJRU5ErkJggg==
+</value>
+  </data>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.Designer.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,173 @@
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    partial class SqlPreviewCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SqlPreviewCtrl));
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.btnRunQuery = new System.Windows.Forms.ToolStripButton();
+            this.btnStop = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+            this.btnClear = new System.Windows.Forms.ToolStripButton();
+            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+            this.txtSql = new System.Windows.Forms.TextBox();
+            this.grdResults = new System.Windows.Forms.DataGridView();
+            this.toolStrip1.SuspendLayout();
+            this.splitContainer1.Panel1.SuspendLayout();
+            this.splitContainer1.Panel2.SuspendLayout();
+            this.splitContainer1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.grdResults)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // toolStrip1
+            // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.btnRunQuery,
+            this.btnStop,
+            this.toolStripSeparator1,
+            this.btnClear});
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.toolStrip1.Name = "toolStrip1";
+            this.toolStrip1.Size = new System.Drawing.Size(667, 25);
+            this.toolStrip1.TabIndex = 0;
+            this.toolStrip1.Text = "toolStrip1";
+            // 
+            // btnRunQuery
+            // 
+            this.btnRunQuery.Image = ((System.Drawing.Image)(resources.GetObject("btnRunQuery.Image")));
+            this.btnRunQuery.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnRunQuery.Name = "btnRunQuery";
+            this.btnRunQuery.Size = new System.Drawing.Size(79, 22);
+            this.btnRunQuery.Text = "Run Query";
+            this.btnRunQuery.Click += new System.EventHandler(this.btnRunQuery_Click);
+            // 
+            // btnStop
+            // 
+            this.btnStop.Image = ((System.Drawing.Image)(resources.GetObject("btnStop.Image")));
+            this.btnStop.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnStop.Name = "btnStop";
+            this.btnStop.Size = new System.Drawing.Size(49, 22);
+            this.btnStop.Text = "Stop";
+            this.btnStop.Click += new System.EventHandler(this.btnCancel_Click);
+            // 
+            // toolStripSeparator1
+            // 
+            this.toolStripSeparator1.Name = "toolStripSeparator1";
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+            // 
+            // btnClear
+            // 
+            this.btnClear.Image = ((System.Drawing.Image)(resources.GetObject("btnClear.Image")));
+            this.btnClear.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnClear.Name = "btnClear";
+            this.btnClear.Size = new System.Drawing.Size(52, 22);
+            this.btnClear.Text = "Clear";
+            this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
+            // 
+            // splitContainer1
+            // 
+            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainer1.Location = new System.Drawing.Point(0, 25);
+            this.splitContainer1.Name = "splitContainer1";
+            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // splitContainer1.Panel1
+            // 
+            this.splitContainer1.Panel1.Controls.Add(this.txtSql);
+            // 
+            // splitContainer1.Panel2
+            // 
+            this.splitContainer1.Panel2.Controls.Add(this.grdResults);
+            this.splitContainer1.Size = new System.Drawing.Size(667, 432);
+            this.splitContainer1.SplitterDistance = 170;
+            this.splitContainer1.TabIndex = 1;
+            // 
+            // txtSql
+            // 
+            this.txtSql.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.txtSql.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.txtSql.Location = new System.Drawing.Point(0, 0);
+            this.txtSql.Multiline = true;
+            this.txtSql.Name = "txtSql";
+            this.txtSql.Size = new System.Drawing.Size(667, 170);
+            this.txtSql.TabIndex = 0;
+            // 
+            // grdResults
+            // 
+            this.grdResults.AllowUserToAddRows = false;
+            this.grdResults.AllowUserToDeleteRows = false;
+            this.grdResults.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle1.NullValue = "(null)";
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.grdResults.DefaultCellStyle = dataGridViewCellStyle1;
+            this.grdResults.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.grdResults.Location = new System.Drawing.Point(0, 0);
+            this.grdResults.Name = "grdResults";
+            this.grdResults.ReadOnly = true;
+            this.grdResults.Size = new System.Drawing.Size(667, 258);
+            this.grdResults.TabIndex = 1;
+            // 
+            // SqlPreviewCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.splitContainer1);
+            this.Controls.Add(this.toolStrip1);
+            this.Name = "SqlPreviewCtrl";
+            this.Size = new System.Drawing.Size(667, 457);
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
+            this.splitContainer1.Panel1.ResumeLayout(false);
+            this.splitContainer1.Panel1.PerformLayout();
+            this.splitContainer1.Panel2.ResumeLayout(false);
+            this.splitContainer1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.grdResults)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ToolStrip toolStrip1;
+        private System.Windows.Forms.ToolStripButton btnRunQuery;
+        private System.Windows.Forms.ToolStripButton btnStop;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+        private System.Windows.Forms.ToolStripButton btnClear;
+        private System.Windows.Forms.SplitContainer splitContainer1;
+        private System.Windows.Forms.TextBox txtSql;
+        private System.Windows.Forms.DataGridView grdResults;
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,98 @@
+#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourcePreview
+{
+    public partial class SqlPreviewCtrl : UserControl
+    {
+        private EditorInterface _ed;
+
+        public SqlPreviewCtrl(EditorInterface ed)
+        {
+            InitializeComponent();
+            _ed = ed;
+        }
+
+        private void btnRunQuery_Click(object sender, EventArgs e)
+        {
+            string sql = txtSql.Text;
+            FeatureSetReader reader = null;
+            try
+            {
+                reader = _ed.CurrentConnection.ExecuteSqlQuery(_ed.ResourceId, sql);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+            }
+
+            if (reader != null)
+            {
+                DataTable table = new DataTable();
+                foreach (FeatureSetColumn col in reader.Columns)
+                {
+                    if (col.Type == typeof(Topology.Geometries.IGeometry))
+                        table.Columns.Add(col.Name, typeof(string)); //We want to "visualise" the textual form
+                    else
+                        table.Columns.Add(col.Name, col.Type);
+                }
+                while (reader.Read())
+                {
+                    var drow = table.NewRow();
+                    var row = reader.Row;
+                    foreach (FeatureSetColumn col in reader.Columns)
+                    {
+                        if (!row.IsValueNull(col.Name))
+                        {
+                            if (col.Type == typeof(Topology.Geometries.IGeometry))
+                                drow[col.Name] = ((Topology.Geometries.IGeometry)row[col.Name]).AsText();
+                            else
+                                drow[col.Name] = row[col.Name];
+                        }
+                        else
+                        {
+                            drow[col.Name] = DBNull.Value;
+                        }
+                    }
+                    table.Rows.Add(drow);
+                }
+                grdResults.DataSource = table;
+            }
+        }
+
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void btnClear_Click(object sender, EventArgs e)
+        {
+            grdResults.DataSource = null;
+        }
+    }
+}

Added: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/SqlPreviewCtrl.resx	2010-04-13 14:24:58 UTC (rev 4786)
@@ -0,0 +1,169 @@
+<?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>
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnRunQuery.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAk1JREFUOE+l01tI
+        U3EcB/ATvfRUPhVJFEZSviUhYRd6MEY9xR5CMNHUWquZs2aB2yjnGC5FmzK2dZvupq0LRmKm2c1u5soo
+        CiqlJ2Gilbrt7Gw7O/v2/58zpYdeZj/4wXn4/T7/3/9yGOZ/Q17rV7X2TkZ0PZPQdpP0fke9+yvOd33B
+        OednaG58wtmrH1B7ZRxqWwDV1rfQOl5GaJ+4tunOhNAxOI1M87TlqSACdOXlpKLlGURA653AcqKq6bEE
+        1Hu+if1xPokYSS7OI8LxCHEJzLNx/ApzmJmLIjjLYmomjB/BkFh/1DSUBsiB0UgIAhLJpAhFEzzYmAQt
+        RHn8jsQwGyLQPIfpn1GxvswwIAH0tGkkCcBThGScQByBWDoNgcIEqu3eh+Od+QjOLYj1pRf6JYBelQik
+        UiKwCMXJd4xCBKHQSXchDH0lKHZsI1NyKNHflwDN9Y9LAEUWIbVvL2q8hVC6C1DpzIe+9zBuBdpRd/sQ
+        ZJb1KNb5JUBtfycBJIX0JBRReXbi3rgNd99bxcabAQssw3VwvWmG0idDQdMq7DAza5ga69jSLabSiECA
+        KrJf2tw2pMalhyqYHijQ0FeBxv4TcIwYUdq1B7kXmSRT3TH6z2dw5Foe/GMW+EZb4XrdDOcrM0FOwT7S
+        CIXvAHL1q5GtZbYz8jM9fmXbC9CXdcz8BBWmRyg3DkJu34yD7RtQdHktdrdkoaxzF2zPG1DpkWGLPgv7
+        NYaBjP7DPOMKttxVhE06Zipbz2zNqJkW5+gYdqNuJdbpmJy/m/8AAll+H7GifwkAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="btnStop.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAcNJREFUOE+tU0ur
+        QVEYvT/KfzLCXzgYS6GQmSJlYGCklD2QkkdemwwMvJ8bxyNCvrvX7u6jW+4d3O6ulXLOenzr2+fj479P
+        r9ezSRgSrNvtCs65aLfbrNlsGrVazfarX7/ft0siX6/XdD6f6fF4KJxOJ1osFlStVnmlUrG/FQFZOprX
+        65Vw8Hs4HMg0TbpcLuo/iJbLZbNUKn0X+YrNNXm329F2uyUhhMJmsyGk0iKFQoFLvMbBzPqFn8jL5ZIA
+        nMFgQNls1rBG6XQ6DPEQVbu6XC4CnE4neb1eRUYP6APp0uk0swRarZZAWfv9XgkgDYgaEJjP5zSbzZTQ
+        7XajRCIhLAG5IiWA+CCvViuL7HA4yOPx0HQ6VdAp4vH4S6DRaDA0jjH0rHAFEXC73Yo8mUzUZobDIcVi
+        sdcI8oIYePh8PpWDjqtd8Ww8HtNoNKL7/U5yjRSNRl8lyt3aisUiRwc474hwhQFEJJlHIpHvtzKfz9tz
+        uZyJnePF4/FopcFlgjNEJNkMBALvb2Mmk7GnUiler9dV4+gEM2PvjDEKBoPc7/e/J+uVJJNJmyzICIfD
+        LBQKCekmJIn5fD5DCvz+Mf3ly/4E08xAcyCRlTQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="btnClear.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgJJREFUOE+Vk2tr
+        01AYx4cgBL+CSEB90wWpo+KbucTo1m5lapmuy5otsRe7WdfL2pKSrbbqCwU/id+qeIHiulbXdkmbJvl7
+        Eui0tBEWOHDgPL/fcyNzc5f8kE5f80TsUom2FYXxChhKKWYginktGmOnYhwYlSPYigq7UJiSDCWJGcRT
+        GO5ncBZ5/qUbjvguJGMYtfewybEOyxhmMhcSF5YTGGXzQLUG594JreVRr19xJeRCmfmiZR+9BT59hqVW
+        MXp9AKdkF5biMA5yAHnX5Tg6yyETgcDViTYg1ynjTc60yhXgw0eYJQWDRAr67ksYmSygHrv39uOg2eA4
+        auacIMuUnkybo2wBqL0DjmsErAIVFfqOhPajFW94bHQkfUG0oJJ2RAkQRKCsoM0vW56Z/y2nJ0iMLu4C
+        ZBuIbgMvtoBCEb+Dq2gvLnqu2HX0BIHRYjswUntAsUzAEpAj7ZAB6ptb6CxxaPr9syUuvC3CSKYBskZN
+        iOGU482TB6zVfxIB9vZx/jSC1r37aPp8kxIXJr0aiVck6yE0Uvop+9AdmHOadwNmdyUEJJLor4bx844f
+        X2/c+ivpbWzw51EBRjwJbVNAa4mbmHaD5qgf8/PmGcdDC6/jxL+A79dpfmKVv4Jhvrv+DC2WmzntBk1T
+        327eNmfCY1OLZfn/rcqRTGW+5N88Ff4H0NhJyJZReYIAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceEditors.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceEditors.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceEditors.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -364,6 +364,36 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>FeatureSourceExtension.resx</DependentUpon>
     </Compile>
+    <Compile Include="FeatureSourcePreview\ClassPreviewCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\ClassPreviewCtrl.Designer.cs">
+      <DependentUpon>ClassPreviewCtrl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\FeatureSourcePreviewCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\FeatureSourcePreviewCtrl.Designer.cs">
+      <DependentUpon>FeatureSourcePreviewCtrl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\Query\StandardQueryCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\Query\StandardQueryCtrl.Designer.cs">
+      <DependentUpon>StandardQueryCtrl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\SchemaViewCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\SchemaViewCtrl.Designer.cs">
+      <DependentUpon>SchemaViewCtrl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\SqlPreviewCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSourcePreview\SqlPreviewCtrl.Designer.cs">
+      <DependentUpon>SqlPreviewCtrl.cs</DependentUpon>
+    </Compile>
     <Compile Include="FiniteDisplayScales.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -1209,6 +1239,22 @@
       <LastGenOutput>FeatureSourceExtension.Designer.cs</LastGenOutput>
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSourcePreview\ClassPreviewCtrl.resx">
+      <DependentUpon>ClassPreviewCtrl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSourcePreview\FeatureSourcePreviewCtrl.resx">
+      <DependentUpon>FeatureSourcePreviewCtrl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSourcePreview\Query\StandardQueryCtrl.resx">
+      <DependentUpon>StandardQueryCtrl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSourcePreview\SchemaViewCtrl.resx">
+      <DependentUpon>SchemaViewCtrl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
     <EmbeddedResource Include="FiniteDisplayScales.resx">
       <SubType>Designer</SubType>
       <DependentUpon>FiniteDisplayScales.cs</DependentUpon>
@@ -1382,6 +1428,10 @@
     <None Include="Resources\GeometryStyleComboDataset.xml" />
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="FeatureSourcePreview\SqlPreviewCtrl.resx">
+      <DependentUpon>SqlPreviewCtrl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
     <EmbeddedResource Include="Icons\Unknown.ico" />
     <EmbeddedResource Include="LoadProcedureEditors\AffectedResourceIdsDlg.resx">
       <DependentUpon>AffectedResourceIdsDlg.cs</DependentUpon>

Modified: trunk/Tools/Maestro/Maestro/ResourceValidators/ResourceValidators.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceValidators/ResourceValidators.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/Maestro/ResourceValidators/ResourceValidators.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -1,7 +1,7 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{6CB2368F-3405-4E1D-8773-64CA49630AD4}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -147,22 +147,27 @@
     <EmbeddedResource Include="Strings\ApplicationDefinitionValidator.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>ApplicationDefinitionValidator.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\FeatureSourceValidator.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>FeatureSourceValidator.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\LayerDefinitionValidator.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>LayerDefinitionValidator.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\MapDefinitionValidator.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>MapDefinitionValidator.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\WebLayoutValidator.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>WebLayoutValidator.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

Modified: trunk/Tools/Maestro/MaestroAPI/FeatureSetReader.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/FeatureSetReader.cs	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MaestroAPI/FeatureSetReader.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -55,11 +55,11 @@
 			if (m_reader.Name != "xml")
 				throw new Exception("Bad document");
 			m_reader.Read();
-			if (m_reader.Name != "FeatureSet" && m_reader.Name != "PropertySet")
+			if (m_reader.Name != "FeatureSet" && m_reader.Name != "PropertySet" && m_reader.Name != "RowSet")
 				throw new Exception("Bad document");
 
             m_reader.Read();
-            if (m_reader.Name != "xs:schema" && m_reader.Name != "PropertyDefinitions")
+            if (m_reader.Name != "xs:schema" && m_reader.Name != "PropertyDefinitions" && m_reader.Name != "ColumnDefinitions")
                 throw new Exception("Bad document");
 
 			XmlDocument doc = new XmlDocument();
@@ -75,25 +75,30 @@
 				lst = doc.SelectNodes("xs:schema/xs:complexType/xs:sequence/xs:element", mgr);
             if (lst.Count == 0)
                 lst = doc.SelectNodes("PropertyDefinitions/PropertyDefinition");
+            if (lst.Count == 0)
+                lst = doc.SelectNodes("ColumnDefinitions/Column");
 			m_columns = new FeatureSetColumn[lst.Count];
 			for(int i = 0;i<lst.Count;i++)
 				m_columns[i] = new FeatureSetColumn(lst[i]);
 
 			m_row = null;
 
-			if (m_reader.Name != "Features" && m_reader.Name != "Properties")
+			if (m_reader.Name != "Features" && m_reader.Name != "Properties" && m_reader.Name != "Rows")
 				throw new Exception("Bad document");
 
 			m_reader.Read();
 
-			if (m_reader.Name == "Features")
-				m_reader = null; //No features :(
-            else if (m_reader.Name == "PropertyCollection")
+            if (m_reader.NodeType != XmlNodeType.EndElement)
             {
-                //OK
+                if (m_reader.Name == "Features")
+                    m_reader = null; //No features :(
+                else if (m_reader.Name == "PropertyCollection" || m_reader.Name == "Row")
+                {
+                    //OK
+                }
+                else if (m_reader.Name != "Feature")
+                    throw new Exception("Bad document");
             }
-            else if (m_reader.Name != "Feature")
-                throw new Exception("Bad document");
 		}
 
 		public FeatureSetColumn[] Columns
@@ -118,7 +123,7 @@
 			else
 			{
 
-				if (m_reader == null || (m_reader.Name != "Feature" && m_reader.Name != "PropertyCollection"))
+				if (m_reader == null || (m_reader.Name != "Feature" && m_reader.Name != "PropertyCollection" && m_reader.Name != "Row"))
 				{
 					m_row = null;
 					return false;
@@ -128,12 +133,14 @@
 				XmlDocument doc = new XmlDocument();
 				doc.LoadXml(xmlfragment);
 
-                if (doc["Feature"] == null)
+                if (doc["Row"] != null)
+                    m_row = new FeatureSetRow(this, doc["Row"]);
+                else if (doc["Feature"] == null)
                     m_row = new FeatureSetRow(this, doc["PropertyCollection"]);
                 else
 				    m_row = new FeatureSetRow(this, doc["Feature"]);
 
-                if (m_reader.Name != "Feature" && m_reader.Name != "PropertyCollection")
+                if (m_reader.Name != "Feature" && m_reader.Name != "PropertyCollection" && m_reader.Name != "Row")
 				{
 					m_reader.Close();
 					m_reader = null;
@@ -175,7 +182,7 @@
 
 		internal FeatureSetColumn(XmlNode node)
 		{
-            if (node.Name == "PropertyDefinition")
+            if (node.Name == "PropertyDefinition" || node.Name == "Column")
             {
                 m_name = node["Name"].InnerText;
                 m_allowNull = true;
@@ -229,7 +236,6 @@
             }
             else
             {
-
                 m_name = node.Attributes["name"].Value;
                 m_allowNull = node.Attributes["minOccurs"] != null && node.Attributes["minOccurs"].Value == "0";
                 if (node.Attributes["type"] != null && node.Attributes["type"].Value == "gml:AbstractGeometryType")
@@ -406,25 +412,29 @@
 		internal FeatureSetRow(FeatureSetReader parent, XmlNode node)
 			: this(parent)
 		{
-			foreach(XmlNode p in node.SelectNodes("Property"))
-			{
-				int ordinal = GetOrdinal(p["Name"].InnerText);
-				if (!m_nulls[ordinal])
-					throw new Exception("Bad document, multiple: " + p["Name"].InnerText + " values in a single feature");
-				m_nulls[ordinal] = false;
+            string nodeName = "Property";
+            if (node.Name == "Row")
+                nodeName = "Column";
 
+            foreach (XmlNode p in node.SelectNodes(nodeName))
+            {
+                int ordinal = GetOrdinal(p["Name"].InnerText);
+                if (!m_nulls[ordinal])
+                    throw new Exception("Bad document, multiple: " + p["Name"].InnerText + " values in a single feature");
+                m_nulls[ordinal] = false;
+
                 if (parent.Columns[ordinal].Type == typeof(string) || parent.Columns[ordinal].Type == Utility.UnmappedType)
-					m_items[ordinal] = p["Value"].InnerText;
-				else if (parent.Columns[ordinal].Type == typeof(int))
-					m_items[ordinal] = XmlConvert.ToInt32(p["Value"].InnerText);
+                    m_items[ordinal] = p["Value"].InnerText;
+                else if (parent.Columns[ordinal].Type == typeof(int))
+                    m_items[ordinal] = XmlConvert.ToInt32(p["Value"].InnerText);
                 else if (parent.Columns[ordinal].Type == typeof(long))
                     m_items[ordinal] = XmlConvert.ToInt64(p["Value"].InnerText);
                 else if (parent.Columns[ordinal].Type == typeof(short))
-					m_items[ordinal] = XmlConvert.ToInt16(p["Value"].InnerText);
-				else if (parent.Columns[ordinal].Type == typeof(double))
-					m_items[ordinal] = XmlConvert.ToDouble(p["Value"].InnerText);
-				else if (parent.Columns[ordinal].Type == typeof(bool))
-					m_items[ordinal] = XmlConvert.ToBoolean(p["Value"].InnerText);
+                    m_items[ordinal] = XmlConvert.ToInt16(p["Value"].InnerText);
+                else if (parent.Columns[ordinal].Type == typeof(double))
+                    m_items[ordinal] = XmlConvert.ToDouble(p["Value"].InnerText);
+                else if (parent.Columns[ordinal].Type == typeof(bool))
+                    m_items[ordinal] = XmlConvert.ToBoolean(p["Value"].InnerText);
                 else if (parent.Columns[ordinal].Type == typeof(DateTime))
                 {
                     try
@@ -471,7 +481,7 @@
                 }
                 else
                     throw new Exception("Unknown type: " + parent.Columns[ordinal].Type.FullName);
-			}
+            }
 		}
 
 		private FeatureSetReader m_parent;

Modified: trunk/Tools/Maestro/MaestroAPI/HttpServerConnection.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/HttpServerConnection.cs	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MaestroAPI/HttpServerConnection.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -475,7 +475,14 @@
 #endif
         }
 
+        public FeatureSetReader ExecuteSqlQuery(string featureSourceID, string sql)
+        {
+            ResourceIdentifier.Validate(featureSourceID, ResourceTypes.FeatureSource);
+            string req = m_reqBuilder.ExecuteSqlQuery(featureSourceID, sql);
 
+            return new FeatureSetReader(this.OpenRead(req));
+        }
+
 		public FeatureSetReader QueryFeatureSource(string resourceID, string schema, string query)
 		{
 			return QueryFeatureSource(resourceID, schema, query, null);

Modified: trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -241,6 +241,13 @@
             res.SetResource(new MgResourceIdentifier(resourceid), rC, rH);
 		}
 
+        public FeatureSetReader ExecuteSqlQuery(string featureSourceID, string sql)
+        {
+            MgFeatureService fes = this.Con.CreateService(MgServiceType.FeatureService) as MgFeatureService;
+            MgSqlDataReader reader = fes.ExecuteSqlQuery(new MgResourceIdentifier(featureSourceID), sql);
+            return new FeatureSetReader(reader);
+        }
+
 		public FeatureSetReader QueryFeatureSource(string resourceID, string schema, string query)
 		{
 			return QueryFeatureSource(resourceID, schema, query, null);

Modified: trunk/Tools/Maestro/MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -326,133 +326,176 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
     <Content Include="Schemas\ApplicationDefinition-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </Content>
     <Content Include="Schemas\ApplicationDefinitionInfo-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </Content>
     <Content Include="Schemas\LayerDefinition-1.1.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </Content>
     <None Include="Schemas\DataStoreList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\DrawingSectionList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\DrawingSectionResourceList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\DrawingSource-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\Envelope-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\FdoLongTransactionList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\FdoProviderCapabilities-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\FdoSpatialContextList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\FeatureProviderRegistry-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\FeatureSet-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\FeatureSource-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\Group-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\GroupList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\LayerDefinition-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\LayerDefinition-1.2.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\LayerDefinition-1.3.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\LoadProcedure-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\MapDefinition-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\PrintLayout-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\RepositoryContent-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\RepositoryList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ResourceDataList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ResourceDocumentHeader-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ResourceFolderHeader-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ResourceList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ResourcePackageManifest-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ResourceReferenceList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ResourceSecurity-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\Role-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\SelectAggregate-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\Server-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\ServerList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\SiteInformation-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\SiteVersion-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\SqlSelect-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\SymbolLibrary-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\Types-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\User-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\UserList-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <None Include="Schemas\WebLayout-1.0.0.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </None>
     <EmbeddedResource Include="Templates\Template.ApplicationDefinition" />
     <EmbeddedResource Include="Templates\Template.FeatureSource" />

Modified: trunk/Tools/Maestro/MaestroAPI/PackageBuilder/OSGeo.MapGuide.MaestroAPI.PackageBuilder.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/PackageBuilder/OSGeo.MapGuide.MaestroAPI.PackageBuilder.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MaestroAPI/PackageBuilder/OSGeo.MapGuide.MaestroAPI.PackageBuilder.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -1,7 +1,7 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{290C057E-2679-4B60-C9DF-0675831234E2}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -152,14 +152,17 @@
   <ItemGroup>
     <EmbeddedResource Include="PackageProgress.resx">
       <DependentUpon>PackageProgress.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\PackageBuilder.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>PackageBuilder.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\PackageProgress.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>PackageProgress.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

Modified: trunk/Tools/Maestro/MaestroAPI/RequestBuilder.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/RequestBuilder.cs	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MaestroAPI/RequestBuilder.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -481,6 +481,23 @@
 			return m_hosturi + "?" + EncodeParameters(param);
 		}
 
+        public string ExecuteSqlQuery(string featureSourceID, string sql)
+        {
+            NameValueCollection param = new NameValueCollection();
+            param.Add("OPERATION", "EXECUTESQLQUERY");
+            param.Add("VERSION", "1.0.0");
+            param.Add("SESSION", m_sessionID);
+            param.Add("FORMAT", "text/xml");
+            param.Add("CLIENTAGENT", m_userAgent);
+            if (m_locale != null)
+                param.Add("LOCALE", m_locale);
+
+            param.Add("RESOURCEID", featureSourceID);
+            param.Add("SQL", sql);
+
+            return m_hosturi + "?" + EncodeParameters(param);
+        }
+
 		public System.Net.WebRequest SelectFeatures(bool aggregate, string resourceId, string classname, string filter, string[] columns, NameValueCollection computedProperties, System.IO.Stream outStream)
 		{
 			NameValueCollection param = new NameValueCollection();

Modified: trunk/Tools/Maestro/MaestroAPI/ServerConnectionI.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/ServerConnectionI.cs	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MaestroAPI/ServerConnectionI.cs	2010-04-13 14:24:58 UTC (rev 4786)
@@ -99,7 +99,16 @@
 		void SetResourceData(string resourceid, string dataname, ResourceDataType datatype, System.IO.Stream stream);
         void SetResourceData(string resourceid, string dataname, ResourceDataType datatype, System.IO.Stream stream, Utility.StreamCopyProgressDelegate callback);
         void SetResourceXmlData(string resourceid, System.IO.Stream stream);
-		FeatureSetReader QueryFeatureSource(string resourceID, string schema, string query);
+
+        /// <summary>
+        /// Executes a SQL query
+        /// </summary>
+        /// <param name="featureSourceID"></param>
+        /// <param name="sql"></param>
+        /// <returns></returns>
+        FeatureSetReader ExecuteSqlQuery(string featureSourceID, string sql);
+        
+        FeatureSetReader QueryFeatureSource(string resourceID, string schema, string query);
 		FeatureSetReader QueryFeatureSource(string resourceID, string schema);
 		FeatureSetReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns);
         FeatureSetReader QueryFeatureSource(string resourceID, string schema, string query, string[] columns, NameValueCollection computedProperties);
@@ -407,5 +416,5 @@
         /// <param name="callback"></param>
         /// <returns>A list of resource IDs that were created from the execution of this load procedure</returns>
         string[] ExecuteLoadProcedure(string resourceID, bool ignoreUnsupportedFeatures, LengthyOperationProgressCallBack callback);
-	}
+    }
 }


Property changes on: trunk/Tools/Maestro/MaestroAPI/XsdGenerator new w generics
___________________________________________________________________
Added: svn:ignore
   + obj
bin


Modified: trunk/Tools/Maestro/MgCooker/MgCooker.csproj
===================================================================
--- trunk/Tools/Maestro/MgCooker/MgCooker.csproj	2010-04-12 22:46:56 UTC (rev 4785)
+++ trunk/Tools/Maestro/MgCooker/MgCooker.csproj	2010-04-13 14:24:58 UTC (rev 4786)
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{C76FFEBF-F047-4BE8-983C-BF8BF3CFB3D9}</ProjectGuid>
     <OutputType>WinExe</OutputType>
@@ -96,18 +96,22 @@
     <EmbeddedResource Include="Strings\BatchSettings.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>BatchSettings.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\Program.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Program.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\Progress.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Progress.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Strings\SetupRun.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>SetupRun.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>



More information about the mapguide-commits mailing list