[mapguide-commits] r6628 - in trunk/Tools/Maestro: Maestro Maestro.Base Maestro.Base/Editor Maestro.Base/Events Maestro.Editors Maestro.Editors/LayerDefinition Maestro.Editors/LayerDefinition/Vector Maestro.Editors/LayerDefinition/Vector/Scales Maestro.Login Maestro.Shared.UI Thirdparty Thirdparty/WinFormsUI Thirdparty/WinFormsUI/Docking Thirdparty/WinFormsUI/Docking/Helpers Thirdparty/WinFormsUI/Docking/Resources Thirdparty/WinFormsUI/Docking/Win32 Thirdparty/WinFormsUI/Properties

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue May 8 13:53:51 EDT 2012


Author: jng
Date: 2012-05-08 10:53:51 -0700 (Tue, 08 May 2012)
New Revision: 6628

Added:
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/AutoHideStripBase.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockAreasEditor.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContent.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentCollection.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentEventArgs.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentHandler.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockOutlineBase.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.SplitterControl.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCaptionBase.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCollection.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneStripBase.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.AutoHideWindow.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DockDragHandler.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DragHandler.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.FocusManager.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.MdiClientController.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.Persistor.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.SplitterDragHandler.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelExtender.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelSkin.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.SplitterControl.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindowCollection.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DragForm.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DummyControl.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Enums.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindow.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindowCollection.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DockHelper.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DrawHelper.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/ResourceHelper.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/Win32Helper.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/InertButtonBase.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Interfaces.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Localization.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Measures.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedDockingStatus.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedPaneCollection.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.Designer.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.resx
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Bottom.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Hotspot.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_HotspotIndex.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Left.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Right.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Top.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelBottom.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelBottom_Active.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelFill.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelFill_Active.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelLeft.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelLeft_Active.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelRight.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelRight_Active.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelTop.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelTop_Active.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_AutoHide.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Close.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Dock.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Option.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_OptionOverflow.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/Dockindicator_PaneDiamond_Fill.bmp
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/SplitterBase.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.Designer.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.resx
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005AutoHideStrip.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneCaption.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneStrip.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VisibleNestedPaneCollection.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/Enums.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/NativeMethods.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Properties/
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/Properties/AssemblyInfo.cs
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/WinFormsUI.csproj
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/dockpanelsuite.snk
   trunk/Tools/Maestro/Thirdparty/WinFormsUI/license.txt
Removed:
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.resx
   trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.Designer.cs
   trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.cs
   trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.resx
Modified:
   trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.Designer.cs
   trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs
   trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.resx
   trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs
   trunk/Tools/Maestro/Maestro.Base/Workbench.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.resx
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.resx
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.resx
   trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
   trunk/Tools/Maestro/Maestro.Login/LoginDialog.resx
   trunk/Tools/Maestro/Maestro.Shared.UI/IViewContent.cs
   trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj
   trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentBase.cs
   trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentManagerBase.cs
   trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs
   trunk/Tools/Maestro/Maestro/Maestro_All.sln
   trunk/Tools/Maestro/Maestro/changelog.txt
Log:
This submission contains the following changes:
 - #1994: Use a tab-based interface for showing geometry styles instead of stacked controls.
 - #1995: Add a patched version of DockPanelSuite (from here: https://github.com/lextm/sharpsnmplib), which stubs out all P/Invoke calls for Mono at the expense of drag and drop support of windows (which we don't even use!). Refactor the Workbench to use this instead of our own pseudo-docking ZonedContainer.

Modified: trunk/Tools/Maestro/Maestro/Maestro_All.sln
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro_All.sln	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro/Maestro_All.sln	2012-05-08 17:53:51 UTC (rev 6628)
@@ -133,6 +133,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maestro.AddIn.Scripting", "..\Maestro.AddIn.Scripting\Maestro.AddIn.Scripting.csproj", "{3591C5BB-2B87-4FB4-AD87-9C8176DF9835}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "..\Thirdparty\WinFormsUI\WinFormsUI.csproj", "{C75532C4-765B-418E-B09B-46D36B2ABDB1}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -307,6 +309,10 @@
 		{3591C5BB-2B87-4FB4-AD87-9C8176DF9835}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{3591C5BB-2B87-4FB4-AD87-9C8176DF9835}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{3591C5BB-2B87-4FB4-AD87-9C8176DF9835}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Modified: trunk/Tools/Maestro/Maestro/changelog.txt
===================================================================
--- trunk/Tools/Maestro/Maestro/changelog.txt	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro/changelog.txt	2012-05-08 17:53:51 UTC (rev 6628)
@@ -2,16 +2,23 @@
 ----------
 
  - Now requires .net Framework 4.0 / Mono 2.8
+ - Uses a patched version of the DockPanelSuite library for display and management of top-level UI content.
+ - Uses new mg-desktop release (8 May 2012, .net 4.0, VC10)
  - New IronPython Scripting Engine for application scripting and automation
  - New command and UI to view the XML diff of an edited resource
  - New experimental GeoREST AddIn for creating and editing GeoREST configurations
+ - UI usability improvements for Layer Definition editor.
  - Support for v2.4.0 resources (Web Layout, Map Definition, Layer Definition, Watermark Definition, Symbol Definition)
  - Added extra symbol definition validation rules
  - New utility for inspecting the state of a Runtime Map (RtMapInspector.exe)
  - Imporved Symbol Definition editor UIs with support for missing schema elements
  - New Feature Manipulation APIs
  - Http Connection Provider supports a GeoREST url parameter, which allows for feature manipulation support
+ - New command to open sources by entering its resource id
  - New shortcut buttons to jump from Layer Definition to Feature/Drawing Source
+ - Fix: MgCooker crashes with Map Definitions whose schema version is > 1.0.0
+ - Fix: Incorrect RuntimeMapLayer property initialization for tiled maps
+ - Fix: AllowOverpost and DisplayAsText properties for basic point style not exposed in editor UI
  - Fix: Clear connection status before testing it in Feature Source Editor
  - Fix: ResourcePicker fixes to optimize usability
  - Fix: Incorrect map extent serialization

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.Designer.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.Designer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -30,6 +30,10 @@
         {
             this.SuspendLayout();
             // 
+            // panelBody
+            // 
+            this.panelBody.Resize += new System.EventHandler(this.panelBody_Resize);
+            // 
             // LayerDefinitionEditor
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -140,5 +140,10 @@
                 return true;
             }
         }
+
+        private void panelBody_Resize(object sender, EventArgs e)
+        {
+            
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.resx	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -112,16 +112,16 @@
     <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>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.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>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <data name="&gt;&gt;panelBody.Name" xml:space="preserve">
     <value>panelBody</value>
   </data>
   <data name="&gt;&gt;panelBody.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;panelBody.Parent" xml:space="preserve">
     <value>$this</value>
@@ -129,13 +129,13 @@
   <data name="&gt;&gt;panelBody.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>LayerDefinitionEditor</value>
   </data>
   <data name="&gt;&gt;$this.Type" xml:space="preserve">
-    <value>Maestro.Base.Editor.EditorContentBase, Maestro.Base, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Base.Editor.EditorContentBase, Maestro.Base, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -110,10 +110,10 @@
             {
                 var viewMgr = ServiceRegistry.GetService<ViewContentManager>();
 
-                viewMgr.OpenContent(Properties.Resources.Content_SiteExplorer, 
-                                    Properties.Resources.Content_SiteExplorer, 
-                                    ViewRegion.Left, 
-                                    () => { return new SiteExplorer(); });
+                wb.ActiveSiteExplorer = viewMgr.OpenContent(Properties.Resources.Content_SiteExplorer, 
+                                        Properties.Resources.Content_SiteExplorer, 
+                                        ViewRegion.Left, 
+                                        () => { return new SiteExplorer(); });
             }
 
             wb.ActiveSiteExplorer.RefreshModel(name);

Modified: trunk/Tools/Maestro/Maestro.Base/Workbench.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Workbench.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Base/Workbench.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -81,7 +81,7 @@
                 if (value == null && current != null)
                 {
                     current.Close();
-                    CheckContainerStatus();
+                    //CheckContainerStatus();
                 }
             }
         }
@@ -95,11 +95,11 @@
         protected override void OnViewActivated(object sender, IViewContent content)
         {
             //If a site explorer was activated, update our active site explorer property
-            var exp = content as ISiteExplorer;
-            if (exp != null)
-            {
-                this.ActiveSiteExplorer = exp;
-            }
+            //var exp = content as ISiteExplorer;
+            //if (exp != null)
+            //{
+            //    this.ActiveSiteExplorer = exp;
+            //}
 
             var editor = content as IEditorViewContent;
             if (editor != null)

Deleted: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.Designer.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.Designer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -1,89 +0,0 @@
-namespace Maestro.Editors.LayerDefinition.Vector.Scales
-{
-    partial class PointStylePanel
-    {
-        /// <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.chkEnable = new System.Windows.Forms.CheckBox();
-            this.chkDisplayAsText = new System.Windows.Forms.CheckBox();
-            this.chkAllowOverpost = new System.Windows.Forms.CheckBox();
-            this.SuspendLayout();
-            // 
-            // chkEnable
-            // 
-            this.chkEnable.AutoSize = true;
-            this.chkEnable.Location = new System.Drawing.Point(3, 3);
-            this.chkEnable.Name = "chkEnable";
-            this.chkEnable.Size = new System.Drawing.Size(92, 17);
-            this.chkEnable.TabIndex = 0;
-            this.chkEnable.Text = "Display Points";
-            this.chkEnable.UseVisualStyleBackColor = true;
-            this.chkEnable.CheckedChanged += new System.EventHandler(this.chkEnable_CheckedChanged);
-            // 
-            // chkDisplayAsText
-            // 
-            this.chkDisplayAsText.AutoSize = true;
-            this.chkDisplayAsText.Location = new System.Drawing.Point(114, 3);
-            this.chkDisplayAsText.Name = "chkDisplayAsText";
-            this.chkDisplayAsText.Size = new System.Drawing.Size(99, 17);
-            this.chkDisplayAsText.TabIndex = 1;
-            this.chkDisplayAsText.Text = "Display As Text";
-            this.chkDisplayAsText.UseVisualStyleBackColor = true;
-            this.chkDisplayAsText.CheckedChanged += new System.EventHandler(this.chkDisplayAsText_CheckedChanged);
-            // 
-            // chkAllowOverpost
-            // 
-            this.chkAllowOverpost.AutoSize = true;
-            this.chkAllowOverpost.Location = new System.Drawing.Point(230, 3);
-            this.chkAllowOverpost.Name = "chkAllowOverpost";
-            this.chkAllowOverpost.Size = new System.Drawing.Size(97, 17);
-            this.chkAllowOverpost.TabIndex = 2;
-            this.chkAllowOverpost.Text = "Allow Overpost";
-            this.chkAllowOverpost.UseVisualStyleBackColor = true;
-            this.chkAllowOverpost.CheckedChanged += new System.EventHandler(this.chkAllowOverpost_CheckedChanged);
-            // 
-            // PointStylePanel
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.Controls.Add(this.chkAllowOverpost);
-            this.Controls.Add(this.chkDisplayAsText);
-            this.Controls.Add(this.chkEnable);
-            this.Name = "PointStylePanel";
-            this.Size = new System.Drawing.Size(603, 23);
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.CheckBox chkEnable;
-        private System.Windows.Forms.CheckBox chkDisplayAsText;
-        private System.Windows.Forms.CheckBox chkAllowOverpost;
-    }
-}

Deleted: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -1,111 +0,0 @@
-#region Disclaimer / License
-// Copyright (C) 2012, 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;
-
-namespace Maestro.Editors.LayerDefinition.Vector.Scales
-{
-    public partial class PointStylePanel : UserControl
-    {
-        public PointStylePanel()
-        {
-            InitializeComponent();
-        }
-
-        public bool DisplayEnabled
-        {
-            get { return chkEnable.Checked; }
-            set 
-            {
-                if (value != chkEnable.Checked)
-                {
-                    chkEnable.Checked = value;
-                    var h = this.DisplayEnabledChanged;
-                    if (h != null)
-                        h(this, EventArgs.Empty);
-                }
-                chkDisplayAsText.Enabled = chkAllowOverpost.Enabled = value;
-            }
-        }
-
-        public event EventHandler DisplayEnabledChanged;
-
-        public bool DisplayAsText
-        {
-            get { return chkDisplayAsText.Checked; }
-            set
-            {
-                if (value != chkDisplayAsText.Checked)
-                {
-                    chkDisplayAsText.Checked = value;
-                    var h = this.DisplayAsTextChanged;
-                    if (h != null)
-                        h(this, EventArgs.Empty);
-                }
-            }
-        }
-
-        public event EventHandler DisplayAsTextChanged;
-
-        public bool AllowOverpost
-        {
-            get { return chkAllowOverpost.Checked; }
-            set
-            {
-                if (value != chkAllowOverpost.Checked)
-                {
-                    chkAllowOverpost.Checked = value;
-                    var h = this.AllowOverpostChanged;
-                    if (h != null)
-                        h(this, EventArgs.Empty);
-                }
-            }
-        }
-
-        public event EventHandler AllowOverpostChanged;
-
-        private void chkEnable_CheckedChanged(object sender, EventArgs e)
-        {
-            chkDisplayAsText.Enabled = chkAllowOverpost.Enabled = chkEnable.Checked;
-            var h = this.DisplayEnabledChanged;
-            if (h != null)
-                h(this, EventArgs.Empty);
-        }
-
-        private void chkDisplayAsText_CheckedChanged(object sender, EventArgs e)
-        {
-            var h = this.DisplayAsTextChanged;
-            if (h != null)
-                h(this, EventArgs.Empty);
-        }
-
-        private void chkAllowOverpost_CheckedChanged(object sender, EventArgs e)
-        {
-            var h = this.AllowOverpostChanged;
-            if (h != null)
-                h(this, EventArgs.Empty);
-        }
-    }
-}

Deleted: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.resx	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/PointStylePanel.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -1,120 +0,0 @@
-<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.Designer.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.Designer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VectorScaleRangeCtrl));
             this.chkLine = new System.Windows.Forms.CheckBox();
             this.chkArea = new System.Windows.Forms.CheckBox();
@@ -36,7 +37,23 @@
             this.areaList = new Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons();
             this.lineList = new Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons();
             this.pointList = new Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons();
-            this.pointStylePanel = new Maestro.Editors.LayerDefinition.Vector.Scales.PointStylePanel();
+            this.chkPoints = new System.Windows.Forms.CheckBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.tabGeomStyles = new System.Windows.Forms.TabControl();
+            this.TAB_POINTS = new System.Windows.Forms.TabPage();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.chkAllowOverpost = new System.Windows.Forms.CheckBox();
+            this.chkDisplayAsText = new System.Windows.Forms.CheckBox();
+            this.TAB_LINES = new System.Windows.Forms.TabPage();
+            this.TAB_AREAS = new System.Windows.Forms.TabPage();
+            this.TAB_COMPOSITE = new System.Windows.Forms.TabPage();
+            this.geomStyleIcons = new System.Windows.Forms.ImageList(this.components);
+            this.tabGeomStyles.SuspendLayout();
+            this.TAB_POINTS.SuspendLayout();
+            this.panel1.SuspendLayout();
+            this.TAB_LINES.SuspendLayout();
+            this.TAB_AREAS.SuspendLayout();
+            this.TAB_COMPOSITE.SuspendLayout();
             this.SuspendLayout();
             // 
             // chkLine
@@ -83,25 +100,108 @@
             this.pointList.Name = "pointList";
             this.pointList.ItemChanged += new System.EventHandler(this.OnItemChanged);
             // 
-            // pointStylePanel
+            // chkPoints
             // 
-            resources.ApplyResources(this.pointStylePanel, "pointStylePanel");
-            this.pointStylePanel.Name = "pointStylePanel";
+            resources.ApplyResources(this.chkPoints, "chkPoints");
+            this.chkPoints.Name = "chkPoints";
+            this.chkPoints.UseVisualStyleBackColor = true;
+            this.chkPoints.CheckedChanged += new System.EventHandler(this.chkPoints_CheckedChanged);
             // 
+            // label1
+            // 
+            resources.ApplyResources(this.label1, "label1");
+            this.label1.Name = "label1";
+            // 
+            // tabGeomStyles
+            // 
+            resources.ApplyResources(this.tabGeomStyles, "tabGeomStyles");
+            this.tabGeomStyles.Controls.Add(this.TAB_POINTS);
+            this.tabGeomStyles.Controls.Add(this.TAB_LINES);
+            this.tabGeomStyles.Controls.Add(this.TAB_AREAS);
+            this.tabGeomStyles.Controls.Add(this.TAB_COMPOSITE);
+            this.tabGeomStyles.ImageList = this.geomStyleIcons;
+            this.tabGeomStyles.Name = "tabGeomStyles";
+            this.tabGeomStyles.SelectedIndex = 0;
+            // 
+            // TAB_POINTS
+            // 
+            resources.ApplyResources(this.TAB_POINTS, "TAB_POINTS");
+            this.TAB_POINTS.Controls.Add(this.pointList);
+            this.TAB_POINTS.Controls.Add(this.panel1);
+            this.TAB_POINTS.Name = "TAB_POINTS";
+            this.TAB_POINTS.UseVisualStyleBackColor = true;
+            // 
+            // panel1
+            // 
+            this.panel1.Controls.Add(this.chkAllowOverpost);
+            this.panel1.Controls.Add(this.chkDisplayAsText);
+            resources.ApplyResources(this.panel1, "panel1");
+            this.panel1.Name = "panel1";
+            // 
+            // chkAllowOverpost
+            // 
+            resources.ApplyResources(this.chkAllowOverpost, "chkAllowOverpost");
+            this.chkAllowOverpost.Name = "chkAllowOverpost";
+            this.chkAllowOverpost.UseVisualStyleBackColor = true;
+            this.chkAllowOverpost.CheckedChanged += new System.EventHandler(this.chkAllowOverpost_CheckedChanged);
+            // 
+            // chkDisplayAsText
+            // 
+            resources.ApplyResources(this.chkDisplayAsText, "chkDisplayAsText");
+            this.chkDisplayAsText.Name = "chkDisplayAsText";
+            this.chkDisplayAsText.UseVisualStyleBackColor = true;
+            this.chkDisplayAsText.CheckedChanged += new System.EventHandler(this.chkDisplayAsText_CheckedChanged);
+            // 
+            // TAB_LINES
+            // 
+            resources.ApplyResources(this.TAB_LINES, "TAB_LINES");
+            this.TAB_LINES.Controls.Add(this.lineList);
+            this.TAB_LINES.Name = "TAB_LINES";
+            this.TAB_LINES.UseVisualStyleBackColor = true;
+            // 
+            // TAB_AREAS
+            // 
+            resources.ApplyResources(this.TAB_AREAS, "TAB_AREAS");
+            this.TAB_AREAS.Controls.Add(this.areaList);
+            this.TAB_AREAS.Name = "TAB_AREAS";
+            this.TAB_AREAS.UseVisualStyleBackColor = true;
+            // 
+            // TAB_COMPOSITE
+            // 
+            resources.ApplyResources(this.TAB_COMPOSITE, "TAB_COMPOSITE");
+            this.TAB_COMPOSITE.Controls.Add(this.compList);
+            this.TAB_COMPOSITE.Name = "TAB_COMPOSITE";
+            this.TAB_COMPOSITE.UseVisualStyleBackColor = true;
+            // 
+            // geomStyleIcons
+            // 
+            this.geomStyleIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("geomStyleIcons.ImageStream")));
+            this.geomStyleIcons.TransparentColor = System.Drawing.Color.Transparent;
+            this.geomStyleIcons.Images.SetKeyName(0, "layer-small.png");
+            this.geomStyleIcons.Images.SetKeyName(1, "layer-shape-line.png");
+            this.geomStyleIcons.Images.SetKeyName(2, "layer-shape-polygon.png");
+            this.geomStyleIcons.Images.SetKeyName(3, "images-stack.png");
+            // 
             // VectorScaleRangeCtrl
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
-            this.Controls.Add(this.compList);
+            this.Controls.Add(this.tabGeomStyles);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.chkPoints);
             this.Controls.Add(this.chkComposite);
-            this.Controls.Add(this.areaList);
             this.Controls.Add(this.chkArea);
-            this.Controls.Add(this.lineList);
             this.Controls.Add(this.chkLine);
-            this.Controls.Add(this.pointList);
-            this.Controls.Add(this.pointStylePanel);
             this.Name = "VectorScaleRangeCtrl";
             resources.ApplyResources(this, "$this");
+            this.tabGeomStyles.ResumeLayout(false);
+            this.TAB_POINTS.ResumeLayout(false);
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            this.TAB_LINES.ResumeLayout(false);
+            this.TAB_AREAS.ResumeLayout(false);
+            this.TAB_COMPOSITE.ResumeLayout(false);
             this.ResumeLayout(false);
+            this.PerformLayout();
 
         }
 
@@ -114,7 +214,17 @@
         private ConditionListButtons areaList;
         private System.Windows.Forms.CheckBox chkComposite;
         private CompositeStyleListCtrl compList;
-        private PointStylePanel pointStylePanel;
+        private System.Windows.Forms.CheckBox chkPoints;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TabControl tabGeomStyles;
+        private System.Windows.Forms.TabPage TAB_POINTS;
+        private System.Windows.Forms.TabPage TAB_LINES;
+        private System.Windows.Forms.TabPage TAB_AREAS;
+        private System.Windows.Forms.TabPage TAB_COMPOSITE;
+        private System.Windows.Forms.ImageList geomStyleIcons;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.CheckBox chkAllowOverpost;
+        private System.Windows.Forms.CheckBox chkDisplayAsText;
 
 
     }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -44,10 +44,6 @@
         public VectorScaleRangeCtrl(IVectorScaleRange vsr, VectorLayerStyleSectionCtrl parent)
         {
             InitializeComponent();
-            //WTF: These events don't show in the designer! So bind them here
-            pointStylePanel.DisplayEnabledChanged += new EventHandler(OnPointDisplayEnabledChanged);
-            pointStylePanel.DisplayAsTextChanged += new EventHandler(OnPointDisplayAsTextChanged);
-            pointStylePanel.AllowOverpostChanged += new EventHandler(OnPointAllowOverpostChanged);
             _init = true;
 
             try
@@ -59,12 +55,12 @@
                 _lns = vsr.LineStyle;
                 _ars = vsr.AreaStyle;
 
-                pointStylePanel.DisplayEnabled = true;
+                chkPoints.Checked = true;
                 chkLine.Checked = true;
                 chkArea.Checked = true;
                 chkComposite.Checked = true;
 
-                pointStylePanel.DisplayEnabled = (_pts != null);
+                chkPoints.Checked = (_pts != null);
                 chkLine.Checked = (_lns != null);
                 chkArea.Checked = (_ars != null);
 
@@ -79,8 +75,8 @@
                 if (_pts == null)
                     _pts = parent.Factory.CreateDefaultPointStyle();
 
-                pointStylePanel.DisplayAsText = _pts.DisplayAsText;
-                pointStylePanel.AllowOverpost = _pts.AllowOverpost;
+                chkDisplayAsText.Checked = _pts.DisplayAsText;
+                chkAllowOverpost.Checked = _pts.AllowOverpost;
 
                 if (_lns == null)
                     _lns = parent.Factory.CreateDefaultLineStyle();
@@ -129,37 +125,90 @@
             }
         }
 
-        void OnPointDisplayEnabledChanged(object sender, EventArgs e)
+        private void chkDisplayAsText_CheckedChanged(object sender, EventArgs e)
         {
-            pointList.Visible = pointStylePanel.DisplayEnabled;
             if (_init) return;
+            _pts.AllowOverpost = chkDisplayAsText.Checked;
+        }
 
-            _vsr.PointStyle = (pointStylePanel.DisplayEnabled) ? _pts : null;
-            _parent.RaiseResourceChanged();
+        private void chkAllowOverpost_CheckedChanged(object sender, EventArgs e)
+        {
+            if (_init) return;
+            _pts.DisplayAsText = chkAllowOverpost.Checked;
         }
 
-        void OnPointAllowOverpostChanged(object sender, EventArgs e)
+        private void SetPointTabVisibility(bool visible)
         {
-            _pts.AllowOverpost = pointStylePanel.AllowOverpost;
+            int idx = tabGeomStyles.TabPages.IndexOf(TAB_POINTS);
+            if (visible)
+            {
+                if (idx < 0)
+                    tabGeomStyles.TabPages.Insert(tabGeomStyles.TabPages.Count, TAB_POINTS);
+            }
+            else
+            {
+                if (idx >= 0)
+                    tabGeomStyles.TabPages.RemoveAt(idx);
+            }
         }
 
-        void OnPointDisplayAsTextChanged(object sender, EventArgs e)
+        private void SetLineTabVisibility(bool visible)
         {
-            _pts.DisplayAsText = pointStylePanel.DisplayAsText;
+            int idx = tabGeomStyles.TabPages.IndexOf(TAB_LINES);
+            if (visible)
+            {
+                if (idx < 0)
+                    tabGeomStyles.TabPages.Insert(tabGeomStyles.TabPages.Count, TAB_LINES);
+            }
+            else
+            {
+                if (idx >= 0)
+                    tabGeomStyles.TabPages.RemoveAt(idx);
+            }
         }
 
-        protected override void OnResize(EventArgs e)
+        private void SetAreaTabVisibility(bool visible)
         {
-            pointList.ResizeAuto();
-            lineList.ResizeAuto();
-            areaList.ResizeAuto();
-            compList.ResizeAuto();
-            base.OnResize(e);
+            int idx = tabGeomStyles.TabPages.IndexOf(TAB_AREAS);
+            if (visible)
+            {
+                if (idx < 0)
+                    tabGeomStyles.TabPages.Insert(tabGeomStyles.TabPages.Count, TAB_AREAS);
+            }
+            else
+            {
+                if (idx >= 0)
+                    tabGeomStyles.TabPages.RemoveAt(idx);
+            }
         }
 
+        private void SetCompositeTabVisibility(bool visible)
+        {
+            int idx = tabGeomStyles.TabPages.IndexOf(TAB_COMPOSITE);
+            if (visible)
+            {
+                if (idx < 0)
+                    tabGeomStyles.TabPages.Insert(tabGeomStyles.TabPages.Count, TAB_COMPOSITE);
+            }
+            else
+            {
+                if (idx >= 0)
+                    tabGeomStyles.TabPages.RemoveAt(idx);
+            }
+        }
+
+        private void chkPoints_CheckedChanged(object sender, EventArgs e)
+        {
+            SetPointTabVisibility(chkPoints.Checked);
+            if (_init) return;
+
+            _vsr.PointStyle = (chkPoints.Checked) ? _pts : null;
+            _parent.RaiseResourceChanged();
+        }
+
         private void chkLine_CheckedChanged(object sender, EventArgs e)
         {
-            lineList.Visible = chkLine.Checked;
+            SetLineTabVisibility(chkLine.Checked);
             if (_init) return;
 
             _vsr.LineStyle = (chkLine.Checked) ? _lns : null;
@@ -168,7 +217,7 @@
 
         private void chkArea_CheckedChanged(object sender, EventArgs e)
         {
-            areaList.Visible = chkArea.Checked;
+            SetAreaTabVisibility(chkArea.Checked);
             if (_init) return;
 
             _vsr.AreaStyle = (chkArea.Checked) ? _ars : null;
@@ -177,7 +226,7 @@
 
         private void chkComposite_CheckedChanged(object sender, EventArgs e)
         {
-            compList.Visible = chkComposite.Checked;
+            SetCompositeTabVisibility(chkComposite.Checked);
             if (_init) return;
             var vsr2 = _vsr as IVectorScaleRange2;
             if (vsr2 == null) return;

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.resx	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/Scales/VectorScaleRangeCtrl.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -117,26 +117,26 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="chkLine.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="chkLine.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Top</value>
-  </data>
   <data name="chkLine.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="chkLine.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 120</value>
+    <value>175, 3</value>
   </data>
   <data name="chkLine.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 24</value>
+    <value>51, 17</value>
   </data>
-  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="chkLine.TabIndex" type="System.Int32, mscorlib">
     <value>2</value>
   </data>
   <data name="chkLine.Text" xml:space="preserve">
-    <value>Display Lines</value>
+    <value>Lines</value>
   </data>
   <data name="&gt;&gt;chkLine.Name" xml:space="preserve">
     <value>chkLine</value>
@@ -150,23 +150,23 @@
   <data name="&gt;&gt;chkLine.ZOrder" xml:space="preserve">
     <value>5</value>
   </data>
-  <data name="chkArea.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Top</value>
+  <data name="chkArea.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
   </data>
   <data name="chkArea.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
   <data name="chkArea.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 241</value>
+    <value>232, 3</value>
   </data>
   <data name="chkArea.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 24</value>
+    <value>53, 17</value>
   </data>
   <data name="chkArea.TabIndex" type="System.Int32, mscorlib">
     <value>4</value>
   </data>
   <data name="chkArea.Text" xml:space="preserve">
-    <value>Display Areas</value>
+    <value>Areas</value>
   </data>
   <data name="&gt;&gt;chkArea.Name" xml:space="preserve">
     <value>chkArea</value>
@@ -178,25 +178,25 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;chkArea.ZOrder" xml:space="preserve">
-    <value>3</value>
+    <value>4</value>
   </data>
-  <data name="chkComposite.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Top</value>
+  <data name="chkComposite.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
   </data>
   <data name="chkComposite.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
   <data name="chkComposite.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 362</value>
+    <value>291, 3</value>
   </data>
   <data name="chkComposite.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 24</value>
+    <value>267, 17</value>
   </data>
   <data name="chkComposite.TabIndex" type="System.Int32, mscorlib">
     <value>6</value>
   </data>
   <data name="chkComposite.Text" xml:space="preserve">
-    <value>Display Composite (Note: Previews currently not supported)</value>
+    <value>Composite (Note: Previews currently not supported)</value>
   </data>
   <data name="&gt;&gt;chkComposite.Name" xml:space="preserve">
     <value>chkComposite</value>
@@ -208,16 +208,16 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;chkComposite.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>3</value>
   </data>
   <data name="compList.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
   <data name="compList.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 386</value>
+    <value>3, 3</value>
   </data>
   <data name="compList.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 109</value>
+    <value>612, 413</value>
   </data>
   <data name="compList.TabIndex" type="System.Int32, mscorlib">
     <value>7</value>
@@ -229,19 +229,19 @@
     <value>Maestro.Editors.LayerDefinition.Vector.Scales.CompositeStyleListCtrl, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name="&gt;&gt;compList.Parent" xml:space="preserve">
-    <value>$this</value>
+    <value>TAB_COMPOSITE</value>
   </data>
   <data name="&gt;&gt;compList.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
   <data name="areaList.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Top</value>
+    <value>Fill</value>
   </data>
   <data name="areaList.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 265</value>
+    <value>3, 3</value>
   </data>
   <data name="areaList.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 97</value>
+    <value>612, 413</value>
   </data>
   <data name="areaList.TabIndex" type="System.Int32, mscorlib">
     <value>5</value>
@@ -253,19 +253,19 @@
     <value>Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name="&gt;&gt;areaList.Parent" xml:space="preserve">
-    <value>$this</value>
+    <value>TAB_AREAS</value>
   </data>
   <data name="&gt;&gt;areaList.ZOrder" xml:space="preserve">
-    <value>2</value>
+    <value>0</value>
   </data>
   <data name="lineList.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Top</value>
+    <value>Fill</value>
   </data>
   <data name="lineList.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 144</value>
+    <value>3, 3</value>
   </data>
   <data name="lineList.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 97</value>
+    <value>593, 413</value>
   </data>
   <data name="lineList.TabIndex" type="System.Int32, mscorlib">
     <value>3</value>
@@ -277,19 +277,19 @@
     <value>Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name="&gt;&gt;lineList.Parent" xml:space="preserve">
-    <value>$this</value>
+    <value>TAB_LINES</value>
   </data>
   <data name="&gt;&gt;lineList.ZOrder" xml:space="preserve">
-    <value>4</value>
+    <value>0</value>
   </data>
   <data name="pointList.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Top</value>
+    <value>Fill</value>
   </data>
   <data name="pointList.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 23</value>
+    <value>3, 28</value>
   </data>
   <data name="pointList.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 97</value>
+    <value>593, 388</value>
   </data>
   <data name="pointList.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
@@ -301,41 +301,366 @@
     <value>Maestro.Editors.LayerDefinition.Vector.Scales.ConditionListButtons, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name="&gt;&gt;pointList.Parent" xml:space="preserve">
-    <value>$this</value>
+    <value>TAB_POINTS</value>
   </data>
   <data name="&gt;&gt;pointList.ZOrder" xml:space="preserve">
-    <value>6</value>
+    <value>0</value>
   </data>
-  <data name="pointStylePanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Top</value>
+  <data name="chkPoints.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
   </data>
-  <data name="pointStylePanel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
+  <data name="chkPoints.Location" type="System.Drawing.Point, System.Drawing">
+    <value>114, 3</value>
   </data>
-  <data name="pointStylePanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 23</value>
+  <data name="chkPoints.Size" type="System.Drawing.Size, System.Drawing">
+    <value>55, 17</value>
   </data>
-  <data name="pointStylePanel.TabIndex" type="System.Int32, mscorlib">
+  <data name="chkPoints.TabIndex" type="System.Int32, mscorlib">
     <value>8</value>
   </data>
-  <data name="&gt;&gt;pointStylePanel.Name" xml:space="preserve">
-    <value>pointStylePanel</value>
+  <data name="chkPoints.Text" xml:space="preserve">
+    <value>Points</value>
   </data>
-  <data name="&gt;&gt;pointStylePanel.Type" xml:space="preserve">
-    <value>Maestro.Editors.LayerDefinition.Vector.Scales.PointStylePanel, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
+  <data name="&gt;&gt;chkPoints.Name" xml:space="preserve">
+    <value>chkPoints</value>
   </data>
-  <data name="&gt;&gt;pointStylePanel.Parent" xml:space="preserve">
+  <data name="&gt;&gt;chkPoints.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;chkPoints.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;pointStylePanel.ZOrder" xml:space="preserve">
-    <value>7</value>
+  <data name="&gt;&gt;chkPoints.ZOrder" xml:space="preserve">
+    <value>2</value>
   </data>
+  <data name="label1.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>3, 4</value>
+  </data>
+  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>98, 13</value>
+  </data>
+  <data name="label1.TabIndex" type="System.Int32, mscorlib">
+    <value>9</value>
+  </data>
+  <data name="label1.Text" xml:space="preserve">
+    <value>Enable these styles</value>
+  </data>
+  <data name="&gt;&gt;label1.Name" xml:space="preserve">
+    <value>label1</value>
+  </data>
+  <data name="&gt;&gt;label1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label1.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="tabGeomStyles.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Bottom, Left, Right</value>
+  </data>
+  <data name="TAB_POINTS.AutoScroll" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="chkAllowOverpost.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="chkAllowOverpost.Location" type="System.Drawing.Point, System.Drawing">
+    <value>108, 3</value>
+  </data>
+  <data name="chkAllowOverpost.Size" type="System.Drawing.Size, System.Drawing">
+    <value>97, 17</value>
+  </data>
+  <data name="chkAllowOverpost.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="chkAllowOverpost.Text" xml:space="preserve">
+    <value>Allow Overpost</value>
+  </data>
+  <data name="&gt;&gt;chkAllowOverpost.Name" xml:space="preserve">
+    <value>chkAllowOverpost</value>
+  </data>
+  <data name="&gt;&gt;chkAllowOverpost.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;chkAllowOverpost.Parent" xml:space="preserve">
+    <value>panel1</value>
+  </data>
+  <data name="&gt;&gt;chkAllowOverpost.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="chkDisplayAsText.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="chkDisplayAsText.Location" type="System.Drawing.Point, System.Drawing">
+    <value>3, 3</value>
+  </data>
+  <data name="chkDisplayAsText.Size" type="System.Drawing.Size, System.Drawing">
+    <value>99, 17</value>
+  </data>
+  <data name="chkDisplayAsText.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="chkDisplayAsText.Text" xml:space="preserve">
+    <value>Display As Text</value>
+  </data>
+  <data name="&gt;&gt;chkDisplayAsText.Name" xml:space="preserve">
+    <value>chkDisplayAsText</value>
+  </data>
+  <data name="&gt;&gt;chkDisplayAsText.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;chkDisplayAsText.Parent" xml:space="preserve">
+    <value>panel1</value>
+  </data>
+  <data name="&gt;&gt;chkDisplayAsText.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Top</value>
+  </data>
+  <data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>3, 3</value>
+  </data>
+  <data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>593, 25</value>
+  </data>
+  <data name="panel1.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="&gt;&gt;panel1.Name" xml:space="preserve">
+    <value>panel1</value>
+  </data>
+  <data name="&gt;&gt;panel1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;panel1.Parent" xml:space="preserve">
+    <value>TAB_POINTS</value>
+  </data>
+  <data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="TAB_POINTS.ImageIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="TAB_POINTS.Location" type="System.Drawing.Point, System.Drawing">
+    <value>4, 23</value>
+  </data>
+  <data name="TAB_POINTS.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>3, 3, 3, 3</value>
+  </data>
+  <data name="TAB_POINTS.Size" type="System.Drawing.Size, System.Drawing">
+    <value>599, 419</value>
+  </data>
+  <data name="TAB_POINTS.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="TAB_POINTS.Text" xml:space="preserve">
+    <value>Points</value>
+  </data>
+  <data name="&gt;&gt;TAB_POINTS.Name" xml:space="preserve">
+    <value>TAB_POINTS</value>
+  </data>
+  <data name="&gt;&gt;TAB_POINTS.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;TAB_POINTS.Parent" xml:space="preserve">
+    <value>tabGeomStyles</value>
+  </data>
+  <data name="&gt;&gt;TAB_POINTS.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="TAB_LINES.AutoScroll" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="TAB_LINES.ImageIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="TAB_LINES.Location" type="System.Drawing.Point, System.Drawing">
+    <value>4, 23</value>
+  </data>
+  <data name="TAB_LINES.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>3, 3, 3, 3</value>
+  </data>
+  <data name="TAB_LINES.Size" type="System.Drawing.Size, System.Drawing">
+    <value>599, 419</value>
+  </data>
+  <data name="TAB_LINES.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="TAB_LINES.Text" xml:space="preserve">
+    <value>Lines</value>
+  </data>
+  <data name="&gt;&gt;TAB_LINES.Name" xml:space="preserve">
+    <value>TAB_LINES</value>
+  </data>
+  <data name="&gt;&gt;TAB_LINES.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;TAB_LINES.Parent" xml:space="preserve">
+    <value>tabGeomStyles</value>
+  </data>
+  <data name="&gt;&gt;TAB_LINES.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="TAB_AREAS.AutoScroll" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="TAB_AREAS.ImageIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="TAB_AREAS.Location" type="System.Drawing.Point, System.Drawing">
+    <value>4, 23</value>
+  </data>
+  <data name="TAB_AREAS.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>3, 3, 3, 3</value>
+  </data>
+  <data name="TAB_AREAS.Size" type="System.Drawing.Size, System.Drawing">
+    <value>599, 419</value>
+  </data>
+  <data name="TAB_AREAS.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="TAB_AREAS.Text" xml:space="preserve">
+    <value>Areas</value>
+  </data>
+  <data name="&gt;&gt;TAB_AREAS.Name" xml:space="preserve">
+    <value>TAB_AREAS</value>
+  </data>
+  <data name="&gt;&gt;TAB_AREAS.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;TAB_AREAS.Parent" xml:space="preserve">
+    <value>tabGeomStyles</value>
+  </data>
+  <data name="&gt;&gt;TAB_AREAS.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="TAB_COMPOSITE.AutoScroll" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="TAB_COMPOSITE.ImageIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="TAB_COMPOSITE.Location" type="System.Drawing.Point, System.Drawing">
+    <value>4, 23</value>
+  </data>
+  <data name="TAB_COMPOSITE.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>3, 3, 3, 3</value>
+  </data>
+  <data name="TAB_COMPOSITE.Size" type="System.Drawing.Size, System.Drawing">
+    <value>599, 419</value>
+  </data>
+  <data name="TAB_COMPOSITE.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="TAB_COMPOSITE.Text" xml:space="preserve">
+    <value>Composite</value>
+  </data>
+  <data name="&gt;&gt;TAB_COMPOSITE.Name" xml:space="preserve">
+    <value>TAB_COMPOSITE</value>
+  </data>
+  <data name="&gt;&gt;TAB_COMPOSITE.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;TAB_COMPOSITE.Parent" xml:space="preserve">
+    <value>tabGeomStyles</value>
+  </data>
+  <data name="&gt;&gt;TAB_COMPOSITE.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <metadata name="geomStyleIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <data name="geomStyleIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
+        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
+        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
+        CgAAAk1TRnQBSQFMAgEBBAEAARgBAAEYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+        AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
+        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
+        AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
+        AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
+        AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
+        AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
+        ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
+        AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
+        AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
+        AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
+        AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
+        AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
+        AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
+        AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
+        AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
+        ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
+        Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
+        AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
+        AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
+        AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
+        ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
+        Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
+        AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
+        AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
+        AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
+        AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
+        AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
+        AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8A/wD/AP8ANQAM/xQA
+        DP8B8gG7AfMRAAG8CgcBvBQADP8BuwH/AbsBAAHzAbsB8gr/AfIBuwHzAbwB/wj0Af8BBwL/HQAB/wK8
+        AfMBAAEJAf8BCQrwAQkB/wEJAbwB9AQqATABNwEwASoB9AHsAQcBvAUAAfQB8AW8AfAB9A4AAf8B8AH/
+        AwAB9AG8AQkK8gEJAbwB9AG8AfQFMQFYATcBMQH0AfcB/wEHAv8DAAHxAfAF8gHwAfENAAH/AfAB/wUA
+        AfAK8gHwAfQCAAG8Af8BEQEVAUsBUQF5AaAB5QFYAf8BtAH0AewBBwG8AwAB8AfyAfAMAAH/AfEB/wYA
+        AfEI8gHzAfEB9AMAAfAB/wFEAUsCWAFZAeUBWQFYAf8BtAH0AfcB/wG8AwAB8QfyAfELAAH/AfEB/wcA
+        AfEB8wXyA/AB9AQAAfAB/wFSB1gB/wHvAf8BSgH0AbwDAAHxAfMG8gHxCgAB/wHxAf8HAAH0AvAB8wTy
+        AfAB/wHwBQAB8AH/CDEB/wEHAf8BUQH0AbwDAAHyBPMC8gHzAfIJAAH/AfEB/wgAAfAB/wHwBfMD8AH0
+        BAAB8Ar/AbsB/wFRAf8BvAMAAfIB9AXzAfQB8ggAAf8B8gH/CQAB9ALwAfQF8wL0AfIB9AMAAfMB8QHv
+        AbwCswG0AbMDtAG7Af8BUQH/AfADAAHzAfIF9AHyAfMHAAH/AfIB/wwAAfQB8gL0BfMB9AHyAfQEAAHw
+        Cv8BUQH/AfADAAH/AfMF8gHzAf8GAAH/AfIB/w4AAfQB8QLwBvQB8QHwAfQCAAHzAfEB7wG8CFEB/wHw
+        EAAB9AHwAfEB/xAAAfEB/wHxBvIB8QH/AfEEAAHwCv8B8BAAAfEB/wHxEQAB9AHxAfQGAAH0AfEB9AQA
+        AfMK8QHzEAAB9AHxAfQtAAFCAU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/gQAG/wEA
+        AQ8C/wEAAQEC/wEAAQ8C/wEAAQEDAAEDA/8B4QMAAQMB4AEPAf8BxwQAAeABDwH/AY8BgAEDAgAB4AEP
+        Af8BHwGAAQcCAAHgAQ8B/gE/AYABDwIAAeABDwH8AX8BAAEfAgAB4AEPAfgB/wEAAQ8CAAHgAQ8B8QH/
+        AQABBwIAAeABDwHjAf8BwAEDAcABAAHgAQ8BxwH/AeABAAHAAQAC/wEPAf8B8AEAAfABAAL/AR8B/wHx
+        AfgB8AEAAv8BHwX/Cw==
+</value>
+  </data>
+  <data name="tabGeomStyles.Location" type="System.Drawing.Point, System.Drawing">
+    <value>0, 26</value>
+  </data>
+  <data name="tabGeomStyles.Size" type="System.Drawing.Size, System.Drawing">
+    <value>607, 446</value>
+  </data>
+  <data name="tabGeomStyles.TabIndex" type="System.Int32, mscorlib">
+    <value>10</value>
+  </data>
+  <data name="&gt;&gt;tabGeomStyles.Name" xml:space="preserve">
+    <value>tabGeomStyles</value>
+  </data>
+  <data name="&gt;&gt;tabGeomStyles.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;tabGeomStyles.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;tabGeomStyles.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
   <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
-    <value>598, 495</value>
+    <value>607, 472</value>
   </data>
+  <data name="&gt;&gt;geomStyleIcons.Name" xml:space="preserve">
+    <value>geomStyleIcons</value>
+  </data>
+  <data name="&gt;&gt;geomStyleIcons.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>VectorScaleRangeCtrl</value>
   </data>

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.Designer.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.Designer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -36,7 +36,6 @@
             this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
             this.btnDuplicate = new System.Windows.Forms.ToolStripButton();
             this.btnSort = new System.Windows.Forms.ToolStripButton();
-            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
             this.lstScaleRanges = new System.Windows.Forms.ListBox();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
             this.btnKmlElevation = new System.Windows.Forms.Button();
@@ -46,18 +45,18 @@
             this.label1 = new System.Windows.Forms.Label();
             this.grpScaleRange = new System.Windows.Forms.GroupBox();
             this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+            this.panel1 = new System.Windows.Forms.Panel();
             this.contentPanel.SuspendLayout();
             this.toolStrip1.SuspendLayout();
-            this.splitContainer1.Panel1.SuspendLayout();
-            this.splitContainer1.Panel2.SuspendLayout();
-            this.splitContainer1.SuspendLayout();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+            this.panel1.SuspendLayout();
             this.SuspendLayout();
             // 
             // contentPanel
             // 
-            this.contentPanel.Controls.Add(this.splitContainer1);
+            this.contentPanel.Controls.Add(this.grpScaleRange);
+            this.contentPanel.Controls.Add(this.panel1);
             resources.ApplyResources(this.contentPanel, "contentPanel");
             // 
             // toolStrip1
@@ -108,22 +107,6 @@
             this.btnSort.Name = "btnSort";
             this.btnSort.Click += new System.EventHandler(this.btnSort_Click);
             // 
-            // splitContainer1
-            // 
-            resources.ApplyResources(this.splitContainer1, "splitContainer1");
-            this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
-            this.splitContainer1.Name = "splitContainer1";
-            // 
-            // splitContainer1.Panel1
-            // 
-            this.splitContainer1.Panel1.Controls.Add(this.lstScaleRanges);
-            this.splitContainer1.Panel1.Controls.Add(this.groupBox1);
-            this.splitContainer1.Panel1.Controls.Add(this.toolStrip1);
-            // 
-            // splitContainer1.Panel2
-            // 
-            this.splitContainer1.Panel2.Controls.Add(this.grpScaleRange);
-            // 
             // lstScaleRanges
             // 
             this.lstScaleRanges.DisplayMember = "ScaleDisplayString";
@@ -185,6 +168,14 @@
             // 
             this.errorProvider.ContainerControl = this;
             // 
+            // panel1
+            // 
+            this.panel1.Controls.Add(this.lstScaleRanges);
+            this.panel1.Controls.Add(this.groupBox1);
+            this.panel1.Controls.Add(this.toolStrip1);
+            resources.ApplyResources(this.panel1, "panel1");
+            this.panel1.Name = "panel1";
+            // 
             // VectorLayerStyleSectionCtrl
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -193,13 +184,11 @@
             this.contentPanel.ResumeLayout(false);
             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);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
             this.ResumeLayout(false);
 
         }
@@ -211,7 +200,6 @@
         private System.Windows.Forms.ToolStripButton btnDelete;
         private System.Windows.Forms.ToolStripButton btnDuplicate;
         private System.Windows.Forms.ToolStripButton btnSort;
-        private System.Windows.Forms.SplitContainer splitContainer1;
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
         private System.Windows.Forms.GroupBox groupBox1;
         private System.Windows.Forms.ComboBox cmbMaxScale;
@@ -222,5 +210,6 @@
         private System.Windows.Forms.ListBox lstScaleRanges;
         private System.Windows.Forms.ErrorProvider errorProvider;
         private System.Windows.Forms.Button btnKmlElevation;
+        private System.Windows.Forms.Panel panel1;
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -253,6 +253,8 @@
 
         private Dictionary<VectorScaleRange, VectorScaleRangeCtrl> _rangeCtrls = new Dictionary<VectorScaleRange, VectorScaleRangeCtrl>();
 
+        private VectorScaleRangeCtrl _activeScaleRangeCtrl;
+
         private void lstScaleRanges_SelectedIndexChanged(object sender, EventArgs e)
         {
             var vsc = lstScaleRanges.SelectedItem as VectorScaleRange;
@@ -299,6 +301,7 @@
                         ctrl = _rangeCtrls[vsc];
                     }
                     grpScaleRange.Controls.Add(ctrl);
+                    _activeScaleRangeCtrl = ctrl;
                 }
                 finally
                 {

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.resx	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -112,19 +112,38 @@
     <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>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.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>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="grpScaleRange.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
-  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="grpScaleRange.Location" type="System.Drawing.Point, System.Drawing">
+    <value>184, 0</value>
   </data>
+  <data name="grpScaleRange.Size" type="System.Drawing.Size, System.Drawing">
+    <value>454, 405</value>
+  </data>
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="grpScaleRange.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="&gt;&gt;grpScaleRange.Name" xml:space="preserve">
+    <value>grpScaleRange</value>
+  </data>
+  <data name="&gt;&gt;grpScaleRange.Type" xml:space="preserve">
+    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;grpScaleRange.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;grpScaleRange.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
   <data name="lstScaleRanges.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Fill</value>
   </data>
@@ -132,9 +151,8 @@
     <value>0, 25</value>
   </data>
   <data name="lstScaleRanges.Size" type="System.Drawing.Size, System.Drawing">
-    <value>182, 212</value>
+    <value>184, 220</value>
   </data>
-  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="lstScaleRanges.TabIndex" type="System.Int32, mscorlib">
     <value>2</value>
   </data>
@@ -142,10 +160,10 @@
     <value>lstScaleRanges</value>
   </data>
   <data name="&gt;&gt;lstScaleRanges.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;lstScaleRanges.Parent" xml:space="preserve">
-    <value>splitContainer1.Panel1</value>
+    <value>panel1</value>
   </data>
   <data name="&gt;&gt;lstScaleRanges.ZOrder" xml:space="preserve">
     <value>0</value>
@@ -169,7 +187,7 @@
     <value>btnKmlElevation</value>
   </data>
   <data name="&gt;&gt;btnKmlElevation.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;btnKmlElevation.Parent" xml:space="preserve">
     <value>groupBox1</value>
@@ -184,7 +202,7 @@
     <value>20, 44</value>
   </data>
   <data name="cmbMinScale.Size" type="System.Drawing.Size, System.Drawing">
-    <value>140, 21</value>
+    <value>142, 21</value>
   </data>
   <data name="cmbMinScale.TabIndex" type="System.Int32, mscorlib">
     <value>2</value>
@@ -193,7 +211,7 @@
     <value>cmbMinScale</value>
   </data>
   <data name="&gt;&gt;cmbMinScale.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;cmbMinScale.Parent" xml:space="preserve">
     <value>groupBox1</value>
@@ -208,7 +226,7 @@
     <value>20, 89</value>
   </data>
   <data name="cmbMaxScale.Size" type="System.Drawing.Size, System.Drawing">
-    <value>140, 21</value>
+    <value>142, 21</value>
   </data>
   <data name="cmbMaxScale.TabIndex" type="System.Int32, mscorlib">
     <value>3</value>
@@ -217,7 +235,7 @@
     <value>cmbMaxScale</value>
   </data>
   <data name="&gt;&gt;cmbMaxScale.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;cmbMaxScale.Parent" xml:space="preserve">
     <value>groupBox1</value>
@@ -244,7 +262,7 @@
     <value>label2</value>
   </data>
   <data name="&gt;&gt;label2.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;label2.Parent" xml:space="preserve">
     <value>groupBox1</value>
@@ -271,7 +289,7 @@
     <value>label1</value>
   </data>
   <data name="&gt;&gt;label1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;label1.Parent" xml:space="preserve">
     <value>groupBox1</value>
@@ -286,7 +304,7 @@
     <value>0, 245</value>
   </data>
   <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>182, 160</value>
+    <value>184, 160</value>
   </data>
   <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
@@ -298,15 +316,15 @@
     <value>groupBox1</value>
   </data>
   <data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
-    <value>splitContainer1.Panel1</value>
+    <value>panel1</value>
   </data>
   <data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
     <value>1</value>
   </data>
-  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>0, 0</value>
   </metadata>
   <data name="btnAdd.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
@@ -361,7 +379,7 @@
     <value>0, 0</value>
   </data>
   <data name="toolStrip1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>182, 25</value>
+    <value>184, 25</value>
   </data>
   <data name="toolStrip1.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
@@ -373,83 +391,38 @@
     <value>toolStrip1</value>
   </data>
   <data name="&gt;&gt;toolStrip1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;toolStrip1.Parent" xml:space="preserve">
-    <value>splitContainer1.Panel1</value>
+    <value>panel1</value>
   </data>
   <data name="&gt;&gt;toolStrip1.ZOrder" xml:space="preserve">
     <value>2</value>
   </data>
-  <data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
-    <value>splitContainer1.Panel1</value>
+  <data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Left</value>
   </data>
-  <data name="&gt;&gt;splitContainer1.Panel1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Panel1.Parent" xml:space="preserve">
-    <value>splitContainer1</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Panel1.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="grpScaleRange.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <data name="grpScaleRange.Location" type="System.Drawing.Point, System.Drawing">
+  <data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
     <value>0, 0</value>
   </data>
-  <data name="grpScaleRange.Size" type="System.Drawing.Size, System.Drawing">
-    <value>452, 405</value>
+  <data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>184, 405</value>
   </data>
-  <data name="grpScaleRange.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
+  <data name="panel1.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
   </data>
-  <data name="&gt;&gt;grpScaleRange.Name" xml:space="preserve">
-    <value>grpScaleRange</value>
+  <data name="&gt;&gt;panel1.Name" xml:space="preserve">
+    <value>panel1</value>
   </data>
-  <data name="&gt;&gt;grpScaleRange.Type" xml:space="preserve">
-    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  <data name="&gt;&gt;panel1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;grpScaleRange.Parent" xml:space="preserve">
-    <value>splitContainer1.Panel2</value>
+  <data name="&gt;&gt;panel1.Parent" xml:space="preserve">
+    <value>contentPanel</value>
   </data>
-  <data name="&gt;&gt;grpScaleRange.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Panel2.Name" xml:space="preserve">
-    <value>splitContainer1.Panel2</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Panel2.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Panel2.Parent" xml:space="preserve">
-    <value>splitContainer1</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Panel2.ZOrder" xml:space="preserve">
+  <data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
     <value>1</value>
   </data>
-  <data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>638, 405</value>
-  </data>
-  <data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
-    <value>182</value>
-  </data>
-  <data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
-    <value>1</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Name" xml:space="preserve">
-    <value>splitContainer1</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
-    <value>contentPanel</value>
-  </data>
-  <data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
   <data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
     <value>638, 405</value>
   </data>
@@ -457,7 +430,7 @@
     <value>contentPanel</value>
   </data>
   <data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
     <value>$this</value>
@@ -465,10 +438,10 @@
   <data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
-  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <data name="$this.HeaderText" xml:space="preserve">
@@ -481,42 +454,42 @@
     <value>btnAdd</value>
   </data>
   <data name="&gt;&gt;btnAdd.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;btnDelete.Name" xml:space="preserve">
     <value>btnDelete</value>
   </data>
   <data name="&gt;&gt;btnDelete.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;toolStripSeparator1.Name" xml:space="preserve">
     <value>toolStripSeparator1</value>
   </data>
   <data name="&gt;&gt;toolStripSeparator1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;btnDuplicate.Name" xml:space="preserve">
     <value>btnDuplicate</value>
   </data>
   <data name="&gt;&gt;btnDuplicate.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;btnSort.Name" xml:space="preserve">
     <value>btnSort</value>
   </data>
   <data name="&gt;&gt;btnSort.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;errorProvider.Name" xml:space="preserve">
     <value>errorProvider</value>
   </data>
   <data name="&gt;&gt;errorProvider.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ErrorProvider, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.ErrorProvider, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>VectorLayerStyleSectionCtrl</value>
   </data>
   <data name="&gt;&gt;$this.Type" xml:space="preserve">
-    <value>Maestro.Editors.Common.EditorBindableCollapsiblePanel, Maestro.Editors, Version=3.5.0.5977, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.Common.EditorBindableCollapsiblePanel, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.resx	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/VectorLayerEditorCtrl.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -112,26 +112,26 @@
     <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>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.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>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="resSettings.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Top</value>
   </data>
   <data name="resSettings.HeaderText" xml:space="preserve">
     <value>Resource Settings</value>
   </data>
-  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="resSettings.Location" type="System.Drawing.Point, System.Drawing">
     <value>0, 0</value>
   </data>
   <data name="resSettings.Size" type="System.Drawing.Size, System.Drawing">
-    <value>621, 267</value>
+    <value>570, 267</value>
   </data>
-  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="resSettings.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
   </data>
@@ -139,7 +139,7 @@
     <value>resSettings</value>
   </data>
   <data name="&gt;&gt;resSettings.Type" xml:space="preserve">
-    <value>Maestro.Editors.LayerDefinition.Vector.VectorLayerSettingsSectionCtrl, Maestro.Editors, Version=3.5.0.5977, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.Vector.VectorLayerSettingsSectionCtrl, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name="&gt;&gt;resSettings.Parent" xml:space="preserve">
     <value>$this</value>
@@ -157,7 +157,7 @@
     <value>0, 267</value>
   </data>
   <data name="layerProperties.Size" type="System.Drawing.Size, System.Drawing">
-    <value>621, 235</value>
+    <value>570, 235</value>
   </data>
   <data name="layerProperties.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
@@ -166,7 +166,7 @@
     <value>layerProperties</value>
   </data>
   <data name="&gt;&gt;layerProperties.Type" xml:space="preserve">
-    <value>Maestro.Editors.LayerDefinition.LayerPropertiesSectionCtrl, Maestro.Editors, Version=3.5.0.5977, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.LayerPropertiesSectionCtrl, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name="&gt;&gt;layerProperties.Parent" xml:space="preserve">
     <value>$this</value>
@@ -184,7 +184,7 @@
     <value>0, 502</value>
   </data>
   <data name="layerStyles.Size" type="System.Drawing.Size, System.Drawing">
-    <value>621, 432</value>
+    <value>570, 432</value>
   </data>
   <data name="layerStyles.TabIndex" type="System.Int32, mscorlib">
     <value>2</value>
@@ -193,7 +193,7 @@
     <value>layerStyles</value>
   </data>
   <data name="&gt;&gt;layerStyles.Type" xml:space="preserve">
-    <value>Maestro.Editors.LayerDefinition.Vector.VectorLayerStyleSectionCtrl, Maestro.Editors, Version=3.5.0.5977, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.LayerDefinition.Vector.VectorLayerStyleSectionCtrl, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name="&gt;&gt;layerStyles.Parent" xml:space="preserve">
     <value>$this</value>
@@ -201,19 +201,19 @@
   <data name="&gt;&gt;layerStyles.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <data name="$this.AutoScroll" type="System.Boolean, mscorlib">
     <value>True</value>
   </data>
   <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
-    <value>621, 530</value>
+    <value>570, 530</value>
   </data>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>VectorLayerEditorCtrl</value>
   </data>
   <data name="&gt;&gt;$this.Type" xml:space="preserve">
-    <value>Maestro.Editors.EditorBase, Maestro.Editors, Version=3.5.0.5977, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.EditorBase, Maestro.Editors, Version=5.0.0.6514, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj	2012-05-08 17:53:51 UTC (rev 6628)
@@ -730,12 +730,6 @@
     <Compile Include="LayerDefinition\Vector\Scales\ItemStyle.designer.cs">
       <DependentUpon>ItemStyle.cs</DependentUpon>
     </Compile>
-    <Compile Include="LayerDefinition\Vector\Scales\PointStylePanel.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="LayerDefinition\Vector\Scales\PointStylePanel.Designer.cs">
-      <DependentUpon>PointStylePanel.cs</DependentUpon>
-    </Compile>
     <Compile Include="LayerDefinition\Vector\Scales\SymbolInstanceEditors\ReferenceCtrl.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -1548,9 +1542,6 @@
     <EmbeddedResource Include="LayerDefinition\Vector\Scales\ItemStyle.resx">
       <DependentUpon>ItemStyle.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="LayerDefinition\Vector\Scales\PointStylePanel.resx">
-      <DependentUpon>PointStylePanel.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="LayerDefinition\Vector\Scales\SymbolInstanceEditors\ReferenceCtrl.resx">
       <DependentUpon>ReferenceCtrl.cs</DependentUpon>
     </EmbeddedResource>

Modified: trunk/Tools/Maestro/Maestro.Login/LoginDialog.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/LoginDialog.resx	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Login/LoginDialog.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -112,26 +112,26 @@
     <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>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.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>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="chkSavePassword.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
     <value>System</value>
   </data>
   <data name="chkSavePassword.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
-  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="chkSavePassword.Location" type="System.Drawing.Point, System.Drawing">
     <value>206, 179</value>
   </data>
   <data name="chkSavePassword.Size" type="System.Drawing.Size, System.Drawing">
     <value>161, 16</value>
   </data>
-  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="chkSavePassword.TabIndex" type="System.Int32, mscorlib">
     <value>15</value>
   </data>
@@ -142,7 +142,7 @@
     <value>chkSavePassword</value>
   </data>
   <data name="&gt;&gt;chkSavePassword.Type" xml:space="preserve">
-    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;chkSavePassword.Parent" xml:space="preserve">
     <value>$this</value>
@@ -172,7 +172,7 @@
     <value>btnCancel</value>
   </data>
   <data name="&gt;&gt;btnCancel.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;btnCancel.Parent" xml:space="preserve">
     <value>$this</value>
@@ -205,7 +205,7 @@
     <value>btnOK</value>
   </data>
   <data name="&gt;&gt;btnOK.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
     <value>$this</value>
@@ -232,7 +232,7 @@
     <value>rdHttp</value>
   </data>
   <data name="&gt;&gt;rdHttp.Type" xml:space="preserve">
-    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;rdHttp.Parent" xml:space="preserve">
     <value>$this</value>
@@ -259,7 +259,7 @@
     <value>rdTcpIp</value>
   </data>
   <data name="&gt;&gt;rdTcpIp.Type" xml:space="preserve">
-    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;rdTcpIp.Parent" xml:space="preserve">
     <value>$this</value>
@@ -280,7 +280,7 @@
     <value>loginPanel</value>
   </data>
   <data name="&gt;&gt;loginPanel.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;loginPanel.Parent" xml:space="preserve">
     <value>$this</value>
@@ -307,7 +307,7 @@
     <value>rdLocal</value>
   </data>
   <data name="&gt;&gt;rdLocal.Type" xml:space="preserve">
-    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
   <data name="&gt;&gt;rdLocal.Parent" xml:space="preserve">
     <value>$this</value>
@@ -315,7 +315,7 @@
   <data name="&gt;&gt;rdLocal.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
-  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
@@ -825,7 +825,7 @@
 </value>
   </data>
   <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
-    <value>CenterParent</value>
+    <value>CenterScreen</value>
   </data>
   <data name="$this.Text" xml:space="preserve">
     <value>Log on to a MapGuide Server</value>
@@ -834,6 +834,6 @@
     <value>LoginDialog</value>
   </data>
   <data name="&gt;&gt;$this.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Shared.UI/IViewContent.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/IViewContent.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/IViewContent.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -66,6 +66,11 @@
         /// <returns></returns>
         void Close();
         /// <summary>
+        /// Sets the parent form this view will reside in. INTERNAL USE ONLY
+        /// </summary>
+        /// <param name="form"></param>
+        void SetParentForm(System.Windows.Forms.Form form);
+        /// <summary>
         /// Fired when the view is activating
         /// </summary>
         event EventHandler ViewContentActivating;

Modified: trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj	2012-05-08 17:53:51 UTC (rev 6628)
@@ -122,12 +122,6 @@
     <Compile Include="WorkbenchBase.Designer.cs">
       <DependentUpon>WorkbenchBase.cs</DependentUpon>
     </Compile>
-    <Compile Include="ZonedContainer.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="ZonedContainer.Designer.cs">
-      <DependentUpon>ZonedContainer.cs</DependentUpon>
-    </Compile>
     <Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
   </ItemGroup>
   <ItemGroup>
@@ -156,10 +150,6 @@
       <DependentUpon>WorkbenchBase.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
-    <EmbeddedResource Include="ZonedContainer.resx">
-      <DependentUpon>ZonedContainer.cs</DependentUpon>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
     <None Include="Resources\minus-white.png" />
@@ -193,6 +183,12 @@
       <Install>true</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Thirdparty\WinFormsUI\WinFormsUI.csproj">
+      <Project>{C75532C4-765B-418E-B09B-46D36B2ABDB1}</Project>
+      <Name>WinFormsUI</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

Modified: trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentBase.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -64,6 +64,30 @@
             }
         }
 
+        private Form _parent;
+
+        public void SetParentForm(Form form)
+        {
+            if (_parent != null)
+                throw new InvalidOperationException("Parent form already set");
+
+            _parent = form;
+            _parent.FormClosing += new FormClosingEventHandler(OnParentFormClosing);
+            _parent.FormClosing += new FormClosingEventHandler(OnParentFormClosed);
+        }
+
+        void OnParentFormClosed(object sender, FormClosingEventArgs e)
+        {
+            var h = this.ViewContentClosed;
+            if (h != null)
+                h(this, EventArgs.Empty);
+        }
+
+        void OnParentFormClosing(object sender, FormClosingEventArgs e)
+        {
+            e.Cancel = CheckCancelEvents();
+        }
+
         /// <summary>
         /// Fires when the title has been changed
         /// </summary>
@@ -79,22 +103,23 @@
             get { return true; }
         }
 
-        /// <summary>
-        /// Closes the view. This raises the <see cref="ViewContentClosing"/> event
-        /// </summary>
-        public virtual void Close()
+        internal bool CheckCancelEvents()
         {
             CancelEventArgs ce = new CancelEventArgs(false);
             var ceHandler = this.ViewContentClosing;
             if (ceHandler != null)
                 ceHandler(this, ce);
 
-            if (ce.Cancel)
-                return;
+            return ce.Cancel;
+        }
 
-            var handler = this.ViewContentClosed;
-            if (handler != null)
-                handler(this, EventArgs.Empty);
+        /// <summary>
+        /// Closes the view. This raises the <see cref="ViewContentClosing"/> event
+        /// </summary>
+        public virtual void Close()
+        {
+            if (_parent != null)
+                _parent.Close();
         }
 
         /// <summary>

Modified: trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentManagerBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentManagerBase.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/ViewContentManagerBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -76,9 +76,9 @@
                         if (handler != null)
                             handler(this, EventArgs.Empty);
 
-                        var wb = GetWorkbench();
-                        if (wb != null)
-                            wb.CheckContainerStatus();
+                        //var wb = GetWorkbench();
+                        //if (wb != null)
+                        //    wb.CheckContainerStatus();
                         return;
                     }
                 }
@@ -102,7 +102,7 @@
                         if (!cnt.IsAttached)
                             wb.ShowContent(cnt);
                         cnt.Activate();
-                        wb.CheckContainerStatus();
+                        //wb.CheckContainerStatus();
                         return;
                     }
                 }
@@ -141,7 +141,7 @@
                         if (!cnt.IsAttached)
                             wb.ShowContent(cnt);
                         cnt.Activate();
-                        wb.CheckContainerStatus();
+                        //wb.CheckContainerStatus();
                         return (T)cnt;
                     }
                 }

Modified: trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -24,6 +24,7 @@
 using System.Drawing;
 using System.Text;
 using System.Windows.Forms;
+using WeifenLuo.WinFormsUI.Docking;
 
 namespace Maestro.Shared.UI
 {
@@ -36,7 +37,7 @@
         StatusStrip status;
         ToolStripStatusLabel statusLabel;
 
-        ZonedContainer contentPanel;
+        DockPanel contentPanel;
 
         ContextMenuStrip ctxToolbar;
 
@@ -51,11 +52,16 @@
 
             this.Icon = _workbenchInitializer.GetIcon();
 
-            contentPanel = new ZonedContainer(_workbenchInitializer);
+            //contentPanel = new ZonedContainer(_workbenchInitializer);
+            //contentPanel.Dock = DockStyle.Fill;
+            //contentPanel.ViewActivated += new ViewContentActivateEventHandler(OnViewActivated);
+            contentPanel = new DockPanel();
+            contentPanel.DocumentStyle = DocumentStyle.DockingWindow;
             contentPanel.Dock = DockStyle.Fill;
+            contentPanel.DockLeftPortion = 250;
+            contentPanel.DockBottomPortion = 150;
+            contentPanel.DockRightPortion = 200;
 
-            contentPanel.ViewActivated += new ViewContentActivateEventHandler(OnViewActivated);
-
             menu = _workbenchInitializer.GetMainMenu(this);
 
             toolStripContainer = new ToolStripContainer();
@@ -229,7 +235,13 @@
         /// </summary>
         public IViewContent ActiveDocumentView
         {
-            get { return contentPanel.ActiveDocumentView; }
+            get
+            { 
+                var doc = contentPanel.ActiveDocument as DockContent;
+                if (doc != null)
+                    return doc.Tag as IViewContent;
+                return null;
+            }
         }
 
         /// <summary>
@@ -238,27 +250,52 @@
         /// <param name="vc">The vc.</param>
         internal void ShowContent(IViewContent vc)
         {
+            DockContent content = new DockContent();
+            content.TabText = vc.Title;
+            content.Text = vc.Title;
+            content.ToolTipText = vc.Title;
+            content.CloseButton = vc.AllowUserClose;
+            content.Tag = vc;
+
             switch (vc.DefaultRegion)
             {
                 case ViewRegion.Bottom:
+                    content.DockAreas = DockAreas.DockBottom;
+                    break;
                 case ViewRegion.Left:
+                    content.DockAreas = DockAreas.DockLeft;
+                    break;
                 case ViewRegion.Right:
+                    content.DockAreas = DockAreas.DockRight;
+                    break;
                 case ViewRegion.Document:
-                    contentPanel.AddContent(vc);
-                    var vcb = vc as ViewContentBase;
-                    if (vcb != null)
-                        vcb.IsAttached = true;
+                    content.DockAreas = DockAreas.Document;
                     break;
                 case ViewRegion.Floating:
-                    throw new NotImplementedException();
-                case ViewRegion.Dialog:
-                    throw new NotImplementedException();
+                    content.DockAreas = DockAreas.Float;
+                    break;
             }
-        }
+            vc.SetParentForm(content);
+            vc.TitleChanged += (sender, e) =>
+            {
+                content.TabText = vc.Title;
+                content.Text = vc.Title;
+                content.ToolTipText = vc.Title;
+            };
 
-        protected internal void CheckContainerStatus()
-        {
-            contentPanel.CheckContainerStatus();
+            content.ClientSize = vc.ContentControl.Size;
+            vc.ContentControl.Dock = DockStyle.Fill;
+            content.Controls.Add(vc.ContentControl);
+
+            if (vc.DefaultRegion == ViewRegion.Dialog)
+            {
+                content.StartPosition = FormStartPosition.CenterParent;
+                content.ShowDialog();
+            }
+            else 
+            {
+                content.Show(contentPanel);
+            }
         }
 
         void OnApplicationIdle(object sender, EventArgs e)

Deleted: trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.Designer.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.Designer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -1,247 +0,0 @@
-namespace Maestro.Shared.UI
-{
-    partial class ZonedContainer
-    {
-        /// <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.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ZonedContainer));
-            this.docRightContainer = new System.Windows.Forms.SplitContainer();
-            this.docBottomContainer = new System.Windows.Forms.SplitContainer();
-            this.documentTabs = new System.Windows.Forms.TabControl();
-            this.docImgList = new System.Windows.Forms.ImageList(this.components);
-            this.bottomZone = new System.Windows.Forms.TabControl();
-            this.bottomImgList = new System.Windows.Forms.ImageList(this.components);
-            this.rightZone = new System.Windows.Forms.TabControl();
-            this.rightImgList = new System.Windows.Forms.ImageList(this.components);
-            this.topContainer = new System.Windows.Forms.SplitContainer();
-            this.leftZone = new System.Windows.Forms.TabControl();
-            this.leftImgList = new System.Windows.Forms.ImageList(this.components);
-            this.ctxDocumentTabs = new System.Windows.Forms.ContextMenuStrip(this.components);
-            this.closeTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.closeAllButThisToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.closeAllTabsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.docRightContainer.Panel1.SuspendLayout();
-            this.docRightContainer.Panel2.SuspendLayout();
-            this.docRightContainer.SuspendLayout();
-            this.docBottomContainer.Panel1.SuspendLayout();
-            this.docBottomContainer.Panel2.SuspendLayout();
-            this.docBottomContainer.SuspendLayout();
-            this.topContainer.Panel1.SuspendLayout();
-            this.topContainer.Panel2.SuspendLayout();
-            this.topContainer.SuspendLayout();
-            this.ctxDocumentTabs.SuspendLayout();
-            this.SuspendLayout();
-            // 
-            // docRightContainer
-            // 
-            resources.ApplyResources(this.docRightContainer, "docRightContainer");
-            this.docRightContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
-            this.docRightContainer.Name = "docRightContainer";
-            // 
-            // docRightContainer.Panel1
-            // 
-            this.docRightContainer.Panel1.Controls.Add(this.docBottomContainer);
-            resources.ApplyResources(this.docRightContainer.Panel1, "docRightContainer.Panel1");
-            // 
-            // docRightContainer.Panel2
-            // 
-            this.docRightContainer.Panel2.Controls.Add(this.rightZone);
-            resources.ApplyResources(this.docRightContainer.Panel2, "docRightContainer.Panel2");
-            // 
-            // docBottomContainer
-            // 
-            resources.ApplyResources(this.docBottomContainer, "docBottomContainer");
-            this.docBottomContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
-            this.docBottomContainer.Name = "docBottomContainer";
-            // 
-            // docBottomContainer.Panel1
-            // 
-            this.docBottomContainer.Panel1.Controls.Add(this.documentTabs);
-            resources.ApplyResources(this.docBottomContainer.Panel1, "docBottomContainer.Panel1");
-            // 
-            // docBottomContainer.Panel2
-            // 
-            this.docBottomContainer.Panel2.Controls.Add(this.bottomZone);
-            resources.ApplyResources(this.docBottomContainer.Panel2, "docBottomContainer.Panel2");
-            // 
-            // documentTabs
-            // 
-            resources.ApplyResources(this.documentTabs, "documentTabs");
-            this.documentTabs.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
-            this.documentTabs.HotTrack = true;
-            this.documentTabs.ImageList = this.docImgList;
-            this.documentTabs.Name = "documentTabs";
-            this.documentTabs.SelectedIndex = 0;
-            this.documentTabs.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
-            this.documentTabs.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
-            this.documentTabs.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            this.documentTabs.SelectedIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            // 
-            // docImgList
-            // 
-            this.docImgList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
-            resources.ApplyResources(this.docImgList, "docImgList");
-            this.docImgList.TransparentColor = System.Drawing.Color.Transparent;
-            // 
-            // bottomZone
-            // 
-            resources.ApplyResources(this.bottomZone, "bottomZone");
-            this.bottomZone.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
-            this.bottomZone.HotTrack = true;
-            this.bottomZone.ImageList = this.bottomImgList;
-            this.bottomZone.Name = "bottomZone";
-            this.bottomZone.SelectedIndex = 0;
-            this.bottomZone.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
-            this.bottomZone.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
-            this.bottomZone.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            this.bottomZone.SelectedIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            // 
-            // bottomImgList
-            // 
-            this.bottomImgList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
-            resources.ApplyResources(this.bottomImgList, "bottomImgList");
-            this.bottomImgList.TransparentColor = System.Drawing.Color.Transparent;
-            // 
-            // rightZone
-            // 
-            resources.ApplyResources(this.rightZone, "rightZone");
-            this.rightZone.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
-            this.rightZone.HotTrack = true;
-            this.rightZone.ImageList = this.rightImgList;
-            this.rightZone.Name = "rightZone";
-            this.rightZone.SelectedIndex = 0;
-            this.rightZone.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
-            this.rightZone.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
-            this.rightZone.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            this.rightZone.SelectedIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            // 
-            // rightImgList
-            // 
-            this.rightImgList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
-            resources.ApplyResources(this.rightImgList, "rightImgList");
-            this.rightImgList.TransparentColor = System.Drawing.Color.Transparent;
-            // 
-            // topContainer
-            // 
-            resources.ApplyResources(this.topContainer, "topContainer");
-            this.topContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
-            this.topContainer.Name = "topContainer";
-            // 
-            // topContainer.Panel1
-            // 
-            this.topContainer.Panel1.Controls.Add(this.leftZone);
-            // 
-            // topContainer.Panel2
-            // 
-            this.topContainer.Panel2.Controls.Add(this.docRightContainer);
-            // 
-            // leftZone
-            // 
-            resources.ApplyResources(this.leftZone, "leftZone");
-            this.leftZone.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
-            this.leftZone.HotTrack = true;
-            this.leftZone.ImageList = this.leftImgList;
-            this.leftZone.Name = "leftZone";
-            this.leftZone.SelectedIndex = 0;
-            this.leftZone.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ZoneDrawItem);
-            this.leftZone.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ZoneMouseClick);
-            this.leftZone.TabIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            this.leftZone.SelectedIndexChanged += new System.EventHandler(this.ZoneTabSelectedIndexChanged);
-            // 
-            // leftImgList
-            // 
-            this.leftImgList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
-            resources.ApplyResources(this.leftImgList, "leftImgList");
-            this.leftImgList.TransparentColor = System.Drawing.Color.Transparent;
-            // 
-            // ctxDocumentTabs
-            // 
-            this.ctxDocumentTabs.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.closeTabToolStripMenuItem,
-            this.closeAllButThisToolStripMenuItem,
-            this.closeAllTabsToolStripMenuItem});
-            this.ctxDocumentTabs.Name = "ctxDocumentTabs";
-            resources.ApplyResources(this.ctxDocumentTabs, "ctxDocumentTabs");
-            // 
-            // closeTabToolStripMenuItem
-            // 
-            this.closeTabToolStripMenuItem.Name = "closeTabToolStripMenuItem";
-            resources.ApplyResources(this.closeTabToolStripMenuItem, "closeTabToolStripMenuItem");
-            this.closeTabToolStripMenuItem.Click += new System.EventHandler(this.closeTabToolStripMenuItem_Click);
-            // 
-            // closeAllButThisToolStripMenuItem
-            // 
-            this.closeAllButThisToolStripMenuItem.Name = "closeAllButThisToolStripMenuItem";
-            resources.ApplyResources(this.closeAllButThisToolStripMenuItem, "closeAllButThisToolStripMenuItem");
-            this.closeAllButThisToolStripMenuItem.Click += new System.EventHandler(this.closeAllButThisToolStripMenuItem_Click);
-            // 
-            // closeAllTabsToolStripMenuItem
-            // 
-            this.closeAllTabsToolStripMenuItem.Name = "closeAllTabsToolStripMenuItem";
-            resources.ApplyResources(this.closeAllTabsToolStripMenuItem, "closeAllTabsToolStripMenuItem");
-            this.closeAllTabsToolStripMenuItem.Click += new System.EventHandler(this.closeAllTabsToolStripMenuItem_Click);
-            // 
-            // ZonedContainer
-            // 
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
-            this.Controls.Add(this.topContainer);
-            this.Name = "ZonedContainer";
-            resources.ApplyResources(this, "$this");
-            this.docRightContainer.Panel1.ResumeLayout(false);
-            this.docRightContainer.Panel2.ResumeLayout(false);
-            this.docRightContainer.ResumeLayout(false);
-            this.docBottomContainer.Panel1.ResumeLayout(false);
-            this.docBottomContainer.Panel2.ResumeLayout(false);
-            this.docBottomContainer.ResumeLayout(false);
-            this.topContainer.Panel1.ResumeLayout(false);
-            this.topContainer.Panel2.ResumeLayout(false);
-            this.topContainer.ResumeLayout(false);
-            this.ctxDocumentTabs.ResumeLayout(false);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.SplitContainer topContainer;
-        private System.Windows.Forms.SplitContainer docRightContainer;
-        private System.Windows.Forms.SplitContainer docBottomContainer;
-        private System.Windows.Forms.TabControl documentTabs;
-        private System.Windows.Forms.TabControl leftZone;
-        private System.Windows.Forms.TabControl bottomZone;
-        private System.Windows.Forms.TabControl rightZone;
-        private System.Windows.Forms.ImageList leftImgList;
-        private System.Windows.Forms.ImageList rightImgList;
-        private System.Windows.Forms.ImageList docImgList;
-        private System.Windows.Forms.ImageList bottomImgList;
-        private System.Windows.Forms.ContextMenuStrip ctxDocumentTabs;
-        private System.Windows.Forms.ToolStripMenuItem closeTabToolStripMenuItem;
-        private System.Windows.Forms.ToolStripMenuItem closeAllButThisToolStripMenuItem;
-        private System.Windows.Forms.ToolStripMenuItem closeAllTabsToolStripMenuItem;
-    }
-}

Deleted: trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.cs	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -1,293 +0,0 @@
-#region Disclaimer / License
-// Copyright (C) 2010, Jackie Ng
-// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// 
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-// 
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-// 
-#endregion
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
-using System.Windows.Forms;
-using System.Windows.Forms.VisualStyles;
-using Maestro.Shared.UI;
-
-namespace Maestro.Shared.UI
-{
-    public delegate void ViewContentActivateEventHandler(object sender, IViewContent content);
-
-    internal partial class ZonedContainer : UserControl
-    {
-        private IViewContentManager _vcManager;
-        private IWorkbenchInitializer _init;
-
-        public ZonedContainer(IWorkbenchInitializer init)
-        {
-            InitializeComponent();
-            _init = init;
-            _vcManager = _init.GetViewContentManager();
-        }
-
-        public IViewContent ActiveDocumentView
-        {
-            get
-            {
-                if (documentTabs.TabCount == 0)
-                    return null;
-
-                var indx = documentTabs.SelectedIndex;
-                if (indx >= 0)
-                {
-                    var page = documentTabs.TabPages[indx];
-                    var cnt = (IViewContent)page.Tag;
-                    return cnt;
-                }
-                return null;
-            }
-        }
-
-        public event ViewContentActivateEventHandler ViewActivated;
-
-        protected override void OnLoad(EventArgs e)
-        {
-            base.OnLoad(e);
-
-            CheckContainerStatus();
-            _vcManager.ViewHidden += new EventHandler(OnViewHidden);
-        }
-
-        void OnViewHidden(object sender, EventArgs e)
-        {
-            CheckContainerStatus();
-        }
-
-        private IEnumerable<TabControl> AllTabs()
-        {
-            yield return bottomZone;
-            yield return documentTabs;
-            yield return leftZone;
-            yield return rightZone;
-        }
-
-        internal void CheckContainerStatus()
-        {
-            docBottomContainer.Panel2Collapsed = (bottomZone.TabPages.Count == 0);
-            topContainer.Panel1Collapsed = (leftZone.TabPages.Count == 0);
-            docRightContainer.Panel2Collapsed = (rightZone.TabPages.Count == 0) ;
-        }
-
-        public void AddContent(IViewContent content)
-        {
-            TabControl zone = null;
-            ImageList zoneImgList = null;
-            switch (content.DefaultRegion)
-            {
-                case ViewRegion.Bottom:
-                    zone = bottomZone;
-                    zoneImgList = bottomImgList;
-                    break;
-                case ViewRegion.Document:
-                    zone = documentTabs;
-                    zoneImgList = docImgList;
-                    break;
-                case ViewRegion.Left:
-                    zone = leftZone;
-                    zoneImgList = leftImgList;
-                    break;
-                case ViewRegion.Right:
-                    zone = rightZone;
-                    zoneImgList = rightImgList;
-                    break;
-                default: //Something further up should've handled this
-                    throw new InvalidOperationException("Not zoned content");
-            }
-
-            var page = TabFactory.CreateTab(content, null);
-            zone.TabPages.Add(page);
-            var idx = zone.TabPages.IndexOf(page);
-            if (zone.SelectedIndex != idx)
-                zone.SelectedIndex = idx;
-            else
-                OnViewActivated(content);
-
-            CheckContainerStatus();
-        }
-
-        // Close button on tabs implementation
-        //
-        // http://www.dotnetspider.com/resources/29206-Custom-drawn-Close-button-TabControl.aspx
-
-        private Point _imageLocation = new Point(17, 4);
-        private Point _imgHitArea = new Point(15, 2);
-
-        private void ZoneDrawItem(object sender, DrawItemEventArgs e)
-        {
-            TabControl tab = (TabControl)sender;
-            //The tag specifies whether the user can manually close this tab
-            var page = tab.TabPages[e.Index];
-
-            bool draw = (page.Tag != null && ((IViewContent)page.Tag).AllowUserClose);
-
-            try
-            {
-                Rectangle r = e.Bounds;
-                r = tab.GetTabRect(e.Index);
-                r.Offset(2, 2);
-
-                Brush TitleBrush = new SolidBrush(Color.Black);
-                Font f = this.Font;
-
-                string title = page.Text;
-
-                var tabRect = tab.GetTabRect(e.Index);
-
-                if (e.Index == tab.SelectedIndex)
-                    e.Graphics.FillRectangle(new SolidBrush(SystemColors.ControlLightLight), tabRect);
-                else
-                    e.Graphics.FillRectangle(new SolidBrush(SystemColors.ControlLight), tabRect);
-
-                e.Graphics.DrawString(title, f, TitleBrush, new Point(r.X, r.Y));
-
-                if (draw)
-                {
-                    //Close Image to draw
-                    Image img = _init.GetDocumentCloseIcon(); // Properties.Resources.cross_small;
-                    e.Graphics.DrawImage(img, new Point(r.X + (tab.GetTabRect(e.Index).Width - _imageLocation.X), _imageLocation.Y));
-                }
-            }
-            catch { }
-        }
-
-        private void ZoneMouseClick(object sender, MouseEventArgs e)
-        {
-            try
-            {
-                TabControl tc = (TabControl)sender;
-                Point p = e.Location;
-                int _tabWidth = 0;
-                _tabWidth = tc.GetTabRect(tc.SelectedIndex).Width - (_imgHitArea.X);
-                Rectangle r = tc.GetTabRect(tc.SelectedIndex);
-                r.Offset(_tabWidth, _imgHitArea.Y);
-                r.Width = 16;
-                r.Height = 16;
-                if (r.Contains(p))
-                {
-                    TabPage page = (TabPage)tc.TabPages[tc.SelectedIndex];
-                    //The tag specifies whether the user can manually close this tab
-                    if (page.Tag != null && ((IViewContent)page.Tag).AllowUserClose)
-                    {
-                        ((IViewContent)page.Tag).Close();
-                    }
-                }
-                else
-                {
-                    if (e.Button == MouseButtons.Right)
-                    {
-                        var pt = new Point(e.X, e.Y);
-                        for (int i = 0; i < tc.TabPages.Count; i++)
-                        {
-                            if (tc.GetTabRect(i).Contains(pt))
-                            {
-                                tc.SelectedIndex = i;
-                                break;
-                            }
-                        }
-
-                        if (this.DocumentTabContextMenuEnabled)
-                            return;
-
-                        ctxDocumentTabs.Show(tc, pt);
-                    }
-                }
-            }
-            catch { }
-        }
-
-        private void OnViewActivated(IViewContent content)
-        {
-            var handler = this.ViewActivated;
-            if (handler != null)
-                handler(this, content);
-        }
-
-        private void ZoneTabSelectedIndexChanged(object sender, EventArgs e)
-        {
-            TabControl tabs = (TabControl)sender;
-            var indx = tabs.SelectedIndex;
-            if (indx >= 0)
-            {
-                TabPage page = tabs.TabPages[indx];
-                OnViewActivated((IViewContent)page.Tag);
-            }
-        }
-
-        private void closeTabToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            if (this.DocumentTabContextMenuEnabled || documentTabs.SelectedIndex < 0)
-                return;
-
-            var tab = documentTabs.TabPages[documentTabs.SelectedIndex];
-            ((IViewContent)tab.Tag).Close();
-        }
-
-        private void closeAllButThisToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            if (this.DocumentTabContextMenuEnabled || documentTabs.SelectedIndex < 0)
-                return;
-
-            var tabs = new List<TabPage>();
-            for (int i = 0; i < documentTabs.TabPages.Count; i++)
-            {
-                if (i == documentTabs.SelectedIndex)
-                    continue;
-
-                var tab = documentTabs.TabPages[i];
-                tabs.Add(tab);
-            }
-            foreach (var tab in tabs)
-            {
-                ((IViewContent)tab.Tag).Close();
-            }
-        }
-
-        private void closeAllTabsToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            if (this.DocumentTabContextMenuEnabled)
-                return;
-
-            var tabs = new List<TabPage>();
-            for (int i = 0; i < documentTabs.TabPages.Count; i++)
-            {
-                var tab = documentTabs.TabPages[i];
-                tabs.Add(tab);
-            }
-            foreach (var tab in tabs)
-            {
-                ((IViewContent)tab.Tag).Close();
-            }
-        }
-
-        [DefaultValue(true)]
-        [Description("Indicates whether the document tabs context menu is enabled")]
-        public bool DocumentTabContextMenuEnabled
-        {
-            get;
-            set;
-        }
-    }
-}

Deleted: trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.resx	2012-05-08 14:12:33 UTC (rev 6627)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/ZonedContainer.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -1,531 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="docRightContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="docRightContainer.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
-  <data name="docBottomContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <data name="docBottomContainer.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
-  <data name="docBottomContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
-    <value>Horizontal</value>
-  </data>
-  <data name="documentTabs.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <metadata name="docImgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>239, 17</value>
-  </metadata>
-  <data name="docImgList.ImageSize" type="System.Drawing.Size, System.Drawing">
-    <value>16, 16</value>
-  </data>
-  <data name="documentTabs.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
-  <data name="documentTabs.Padding" type="System.Drawing.Point, System.Drawing">
-    <value>12, 3</value>
-  </data>
-  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="documentTabs.ShowToolTips" type="System.Boolean, mscorlib">
-    <value>True</value>
-  </data>
-  <data name="documentTabs.Size" type="System.Drawing.Size, System.Drawing">
-    <value>337, 415</value>
-  </data>
-  <data name="documentTabs.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;documentTabs.Name" xml:space="preserve">
-    <value>documentTabs</value>
-  </data>
-  <data name="&gt;&gt;documentTabs.Type" xml:space="preserve">
-    <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;documentTabs.Parent" xml:space="preserve">
-    <value>docBottomContainer.Panel1</value>
-  </data>
-  <data name="&gt;&gt;documentTabs.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="docBottomContainer.Panel1.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
-    <value>No</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel1.Name" xml:space="preserve">
-    <value>docBottomContainer.Panel1</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel1.Parent" xml:space="preserve">
-    <value>docBottomContainer</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel1.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="bottomZone.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <metadata name="bottomImgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>350, 17</value>
-  </metadata>
-  <data name="bottomImgList.ImageSize" type="System.Drawing.Size, System.Drawing">
-    <value>16, 16</value>
-  </data>
-  <data name="bottomZone.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
-  <data name="bottomZone.Padding" type="System.Drawing.Point, System.Drawing">
-    <value>12, 3</value>
-  </data>
-  <data name="bottomZone.ShowToolTips" type="System.Boolean, mscorlib">
-    <value>True</value>
-  </data>
-  <data name="bottomZone.Size" type="System.Drawing.Size, System.Drawing">
-    <value>337, 181</value>
-  </data>
-  <data name="bottomZone.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;bottomZone.Name" xml:space="preserve">
-    <value>bottomZone</value>
-  </data>
-  <data name="&gt;&gt;bottomZone.Type" xml:space="preserve">
-    <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;bottomZone.Parent" xml:space="preserve">
-    <value>docBottomContainer.Panel2</value>
-  </data>
-  <data name="&gt;&gt;bottomZone.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="docBottomContainer.Panel2.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
-    <value>No</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel2.Name" xml:space="preserve">
-    <value>docBottomContainer.Panel2</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel2.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel2.Parent" xml:space="preserve">
-    <value>docBottomContainer</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Panel2.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <data name="docBottomContainer.Panel2MinSize" type="System.Int32, mscorlib">
-    <value>100</value>
-  </data>
-  <data name="docBottomContainer.Size" type="System.Drawing.Size, System.Drawing">
-    <value>337, 600</value>
-  </data>
-  <data name="docBottomContainer.SplitterDistance" type="System.Int32, mscorlib">
-    <value>415</value>
-  </data>
-  <data name="docBottomContainer.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Name" xml:space="preserve">
-    <value>docBottomContainer</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.Parent" xml:space="preserve">
-    <value>docRightContainer.Panel1</value>
-  </data>
-  <data name="&gt;&gt;docBottomContainer.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="docRightContainer.Panel1.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
-    <value>No</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel1.Name" xml:space="preserve">
-    <value>docRightContainer.Panel1</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel1.Parent" xml:space="preserve">
-    <value>docRightContainer</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel1.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="docRightContainer.Panel1MinSize" type="System.Int32, mscorlib">
-    <value>240</value>
-  </data>
-  <data name="rightZone.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <metadata name="rightImgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>122, 17</value>
-  </metadata>
-  <data name="rightImgList.ImageSize" type="System.Drawing.Size, System.Drawing">
-    <value>16, 16</value>
-  </data>
-  <data name="rightZone.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
-  <data name="rightZone.Padding" type="System.Drawing.Point, System.Drawing">
-    <value>12, 3</value>
-  </data>
-  <data name="rightZone.ShowToolTips" type="System.Boolean, mscorlib">
-    <value>True</value>
-  </data>
-  <data name="rightZone.Size" type="System.Drawing.Size, System.Drawing">
-    <value>215, 600</value>
-  </data>
-  <data name="rightZone.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;rightZone.Name" xml:space="preserve">
-    <value>rightZone</value>
-  </data>
-  <data name="&gt;&gt;rightZone.Type" xml:space="preserve">
-    <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;rightZone.Parent" xml:space="preserve">
-    <value>docRightContainer.Panel2</value>
-  </data>
-  <data name="&gt;&gt;rightZone.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="docRightContainer.Panel2.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
-    <value>No</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel2.Name" xml:space="preserve">
-    <value>docRightContainer.Panel2</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel2.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel2.Parent" xml:space="preserve">
-    <value>docRightContainer</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Panel2.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <data name="docRightContainer.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
-    <value>No</value>
-  </data>
-  <data name="docRightContainer.Size" type="System.Drawing.Size, System.Drawing">
-    <value>556, 600</value>
-  </data>
-  <data name="docRightContainer.SplitterDistance" type="System.Int32, mscorlib">
-    <value>337</value>
-  </data>
-  <data name="docRightContainer.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Name" xml:space="preserve">
-    <value>docRightContainer</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.Parent" xml:space="preserve">
-    <value>topContainer.Panel2</value>
-  </data>
-  <data name="&gt;&gt;docRightContainer.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="topContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <data name="topContainer.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
-  <data name="leftZone.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Fill</value>
-  </data>
-  <metadata name="leftImgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <data name="leftImgList.ImageSize" type="System.Drawing.Size, System.Drawing">
-    <value>16, 16</value>
-  </data>
-  <data name="leftZone.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 0</value>
-  </data>
-  <data name="leftZone.Padding" type="System.Drawing.Point, System.Drawing">
-    <value>12, 3</value>
-  </data>
-  <data name="leftZone.ShowToolTips" type="System.Boolean, mscorlib">
-    <value>True</value>
-  </data>
-  <data name="leftZone.Size" type="System.Drawing.Size, System.Drawing">
-    <value>240, 600</value>
-  </data>
-  <data name="leftZone.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;leftZone.Name" xml:space="preserve">
-    <value>leftZone</value>
-  </data>
-  <data name="&gt;&gt;leftZone.Type" xml:space="preserve">
-    <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;leftZone.Parent" xml:space="preserve">
-    <value>topContainer.Panel1</value>
-  </data>
-  <data name="&gt;&gt;leftZone.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel1.Name" xml:space="preserve">
-    <value>topContainer.Panel1</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel1.Parent" xml:space="preserve">
-    <value>topContainer</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel1.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name="topContainer.Panel1MinSize" type="System.Int32, mscorlib">
-    <value>240</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel2.Name" xml:space="preserve">
-    <value>topContainer.Panel2</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel2.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel2.Parent" xml:space="preserve">
-    <value>topContainer</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Panel2.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <data name="topContainer.Size" type="System.Drawing.Size, System.Drawing">
-    <value>800, 600</value>
-  </data>
-  <data name="topContainer.SplitterDistance" type="System.Int32, mscorlib">
-    <value>240</value>
-  </data>
-  <data name="topContainer.TabIndex" type="System.Int32, mscorlib">
-    <value>0</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Name" xml:space="preserve">
-    <value>topContainer</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Type" xml:space="preserve">
-    <value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;topContainer.Parent" xml:space="preserve">
-    <value>$this</value>
-  </data>
-  <data name="&gt;&gt;topContainer.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <metadata name="ctxDocumentTabs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>482, 17</value>
-  </metadata>
-  <data name="closeTabToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
-    <value>166, 22</value>
-  </data>
-  <data name="closeTabToolStripMenuItem.Text" xml:space="preserve">
-    <value>Close</value>
-  </data>
-  <data name="closeAllButThisToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
-    <value>166, 22</value>
-  </data>
-  <data name="closeAllButThisToolStripMenuItem.Text" xml:space="preserve">
-    <value>Close All But This</value>
-  </data>
-  <data name="closeAllTabsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
-    <value>166, 22</value>
-  </data>
-  <data name="closeAllTabsToolStripMenuItem.Text" xml:space="preserve">
-    <value>Close All Tabs</value>
-  </data>
-  <data name="ctxDocumentTabs.Size" type="System.Drawing.Size, System.Drawing">
-    <value>167, 70</value>
-  </data>
-  <data name="&gt;&gt;ctxDocumentTabs.Name" xml:space="preserve">
-    <value>ctxDocumentTabs</value>
-  </data>
-  <data name="&gt;&gt;ctxDocumentTabs.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
-    <value>800, 600</value>
-  </data>
-  <data name="&gt;&gt;docImgList.Name" xml:space="preserve">
-    <value>docImgList</value>
-  </data>
-  <data name="&gt;&gt;docImgList.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;bottomImgList.Name" xml:space="preserve">
-    <value>bottomImgList</value>
-  </data>
-  <data name="&gt;&gt;bottomImgList.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;rightImgList.Name" xml:space="preserve">
-    <value>rightImgList</value>
-  </data>
-  <data name="&gt;&gt;rightImgList.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;leftImgList.Name" xml:space="preserve">
-    <value>leftImgList</value>
-  </data>
-  <data name="&gt;&gt;leftImgList.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;closeTabToolStripMenuItem.Name" xml:space="preserve">
-    <value>closeTabToolStripMenuItem</value>
-  </data>
-  <data name="&gt;&gt;closeTabToolStripMenuItem.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;closeAllButThisToolStripMenuItem.Name" xml:space="preserve">
-    <value>closeAllButThisToolStripMenuItem</value>
-  </data>
-  <data name="&gt;&gt;closeAllButThisToolStripMenuItem.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;closeAllTabsToolStripMenuItem.Name" xml:space="preserve">
-    <value>closeAllTabsToolStripMenuItem</value>
-  </data>
-  <data name="&gt;&gt;closeAllTabsToolStripMenuItem.Type" xml:space="preserve">
-    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;$this.Name" xml:space="preserve">
-    <value>ZonedContainer</value>
-  </data>
-  <data name="&gt;&gt;$this.Type" xml:space="preserve">
-    <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-</root>
\ No newline at end of file


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

Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/AutoHideStripBase.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/AutoHideStripBase.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/AutoHideStripBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,530 @@
+using System;
+using System.Collections;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public abstract partial class AutoHideStripBase : Control
+	{
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        protected class Tab : IDisposable
+        {
+            private IDockContent m_content;
+
+            protected internal Tab(IDockContent content)
+            {
+                m_content = content;
+            }
+
+            ~Tab()
+            {
+                Dispose(false);
+            }
+
+            public IDockContent Content
+            {
+                get { return m_content; }
+            }
+
+            public void Dispose()
+            {
+                Dispose(true);
+                GC.SuppressFinalize(this);
+            }
+
+            protected virtual void Dispose(bool disposing)
+            {
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        protected sealed class TabCollection : IEnumerable<Tab>
+        {
+            #region IEnumerable Members
+            IEnumerator<Tab> IEnumerable<Tab>.GetEnumerator()
+            {
+                for (int i = 0; i < Count; i++)
+                    yield return this[i];
+            }
+
+            IEnumerator IEnumerable.GetEnumerator()
+            {
+                for (int i = 0; i < Count; i++)
+                    yield return this[i];
+            }
+            #endregion
+
+            internal TabCollection(DockPane pane)
+            {
+                m_dockPane = pane;
+            }
+
+            private DockPane m_dockPane = null;
+            public DockPane DockPane
+            {
+                get { return m_dockPane; }
+            }
+
+            public DockPanel DockPanel
+            {
+                get { return DockPane.DockPanel; }
+            }
+
+            public int Count
+            {
+                get { return DockPane.DisplayingContents.Count; }
+            }
+
+            public Tab this[int index]
+            {
+                get
+                {
+                    IDockContent content = DockPane.DisplayingContents[index];
+                    if (content == null)
+                        throw (new ArgumentOutOfRangeException("index"));
+                    if (content.DockHandler.AutoHideTab == null)
+                        content.DockHandler.AutoHideTab = (DockPanel.AutoHideStripControl.CreateTab(content));
+                    return content.DockHandler.AutoHideTab as Tab;
+                }
+            }
+
+            public bool Contains(Tab tab)
+            {
+                return (IndexOf(tab) != -1);
+            }
+
+            public bool Contains(IDockContent content)
+            {
+                return (IndexOf(content) != -1);
+            }
+
+            public int IndexOf(Tab tab)
+            {
+                if (tab == null)
+                    return -1;
+
+                return IndexOf(tab.Content);
+            }
+
+            public int IndexOf(IDockContent content)
+            {
+                return DockPane.DisplayingContents.IndexOf(content);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        protected class Pane : IDisposable
+        {
+            private DockPane m_dockPane;
+
+            protected internal Pane(DockPane dockPane)
+            {
+                m_dockPane = dockPane;
+            }
+
+            ~Pane()
+            {
+                Dispose(false);
+            }
+
+            public DockPane DockPane
+            {
+                get { return m_dockPane; }
+            }
+
+            public TabCollection AutoHideTabs
+            {
+                get
+                {
+                    if (DockPane.AutoHideTabs == null)
+                        DockPane.AutoHideTabs = new TabCollection(DockPane);
+                    return DockPane.AutoHideTabs as TabCollection;
+                }
+            }
+
+            public void Dispose()
+            {
+                Dispose(true);
+                GC.SuppressFinalize(this);
+            }
+
+            protected virtual void Dispose(bool disposing)
+            {
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        protected sealed class PaneCollection : IEnumerable<Pane>
+        {
+            private class AutoHideState
+            {
+                public DockState m_dockState;
+                public bool m_selected = false;
+
+                public AutoHideState(DockState dockState)
+                {
+                    m_dockState = dockState;
+                }
+
+                public DockState DockState
+                {
+                    get { return m_dockState; }
+                }
+
+                public bool Selected
+                {
+                    get { return m_selected; }
+                    set { m_selected = value; }
+                }
+            }
+
+            private class AutoHideStateCollection
+            {
+                private AutoHideState[] m_states;
+
+                public AutoHideStateCollection()
+                {
+                    m_states = new AutoHideState[]	{	
+												new AutoHideState(DockState.DockTopAutoHide),
+												new AutoHideState(DockState.DockBottomAutoHide),
+												new AutoHideState(DockState.DockLeftAutoHide),
+												new AutoHideState(DockState.DockRightAutoHide)
+											};
+                }
+
+                public AutoHideState this[DockState dockState]
+                {
+                    get
+                    {
+                        for (int i = 0; i < m_states.Length; i++)
+                        {
+                            if (m_states[i].DockState == dockState)
+                                return m_states[i];
+                        }
+                        throw new ArgumentOutOfRangeException("dockState");
+                    }
+                }
+
+                public bool ContainsPane(DockPane pane)
+                {
+                    if (pane.IsHidden)
+                        return false;
+
+                    for (int i = 0; i < m_states.Length; i++)
+                    {
+                        if (m_states[i].DockState == pane.DockState && m_states[i].Selected)
+                            return true;
+                    }
+                    return false;
+                }
+            }
+
+            internal PaneCollection(DockPanel panel, DockState dockState)
+            {
+                m_dockPanel = panel;
+                m_states = new AutoHideStateCollection();
+                States[DockState.DockTopAutoHide].Selected = (dockState == DockState.DockTopAutoHide);
+                States[DockState.DockBottomAutoHide].Selected = (dockState == DockState.DockBottomAutoHide);
+                States[DockState.DockLeftAutoHide].Selected = (dockState == DockState.DockLeftAutoHide);
+                States[DockState.DockRightAutoHide].Selected = (dockState == DockState.DockRightAutoHide);
+            }
+
+            private DockPanel m_dockPanel;
+            public DockPanel DockPanel
+            {
+                get { return m_dockPanel; }
+            }
+
+            private AutoHideStateCollection m_states;
+            private AutoHideStateCollection States
+            {
+                get { return m_states; }
+            }
+
+            public int Count
+            {
+                get
+                {
+                    int count = 0;
+                    foreach (DockPane pane in DockPanel.Panes)
+                    {
+                        if (States.ContainsPane(pane))
+                            count++;
+                    }
+
+                    return count;
+                }
+            }
+
+            public Pane this[int index]
+            {
+                get
+                {
+                    int count = 0;
+                    foreach (DockPane pane in DockPanel.Panes)
+                    {
+                        if (!States.ContainsPane(pane))
+                            continue;
+
+                        if (count == index)
+                        {
+                            if (pane.AutoHidePane == null)
+                                pane.AutoHidePane = DockPanel.AutoHideStripControl.CreatePane(pane);
+                            return pane.AutoHidePane as Pane;
+                        }
+
+                        count++;
+                    }
+                    throw new ArgumentOutOfRangeException("index");
+                }
+            }
+
+            public bool Contains(Pane pane)
+            {
+                return (IndexOf(pane) != -1);
+            }
+
+            public int IndexOf(Pane pane)
+            {
+                if (pane == null)
+                    return -1;
+
+                int index = 0;
+                foreach (DockPane dockPane in DockPanel.Panes)
+                {
+                    if (!States.ContainsPane(pane.DockPane))
+                        continue;
+
+                    if (pane == dockPane.AutoHidePane)
+                        return index;
+
+                    index++;
+                }
+                return -1;
+            }
+
+            #region IEnumerable Members
+
+            IEnumerator<Pane> IEnumerable<Pane>.GetEnumerator()
+            {
+                for (int i = 0; i < Count; i++)
+                    yield return this[i];
+            }
+
+            IEnumerator IEnumerable.GetEnumerator()
+            {
+                for (int i = 0; i < Count; i++)
+                    yield return this[i];
+            }
+
+            #endregion
+        }
+
+		protected AutoHideStripBase(DockPanel panel)
+		{
+			m_dockPanel = panel;
+			m_panesTop = new PaneCollection(panel, DockState.DockTopAutoHide);
+			m_panesBottom = new PaneCollection(panel, DockState.DockBottomAutoHide);
+			m_panesLeft = new PaneCollection(panel, DockState.DockLeftAutoHide);
+			m_panesRight = new PaneCollection(panel, DockState.DockRightAutoHide);
+
+			SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+			SetStyle(ControlStyles.Selectable, false);
+		}
+
+		private DockPanel m_dockPanel;
+		protected DockPanel DockPanel
+		{
+			get	{	return m_dockPanel;	}
+		}
+
+		private PaneCollection m_panesTop;
+		protected PaneCollection PanesTop
+		{
+			get	{	return m_panesTop;	}
+		}
+
+		private PaneCollection m_panesBottom;
+		protected PaneCollection PanesBottom
+		{
+			get	{	return m_panesBottom;	}
+		}
+
+		private PaneCollection m_panesLeft;
+		protected PaneCollection PanesLeft
+		{
+			get	{	return m_panesLeft;	}
+		}
+
+		private PaneCollection m_panesRight;
+		protected PaneCollection PanesRight
+		{
+			get	{	return m_panesRight;	}
+		}
+
+		protected PaneCollection GetPanes(DockState dockState)
+		{
+			if (dockState == DockState.DockTopAutoHide)
+				return PanesTop;
+			else if (dockState == DockState.DockBottomAutoHide)
+				return PanesBottom;
+			else if (dockState == DockState.DockLeftAutoHide)
+				return PanesLeft;
+			else if (dockState == DockState.DockRightAutoHide)
+				return PanesRight;
+			else
+				throw new ArgumentOutOfRangeException("dockState");
+		}
+
+        internal int GetNumberOfPanes(DockState dockState)
+        {
+            return GetPanes(dockState).Count;
+        }
+
+		protected Rectangle RectangleTopLeft
+		{
+			get
+			{	
+				int height = MeasureHeight();
+				return PanesTop.Count > 0 && PanesLeft.Count > 0 ? new Rectangle(0, 0, height, height) : Rectangle.Empty;
+			}
+		}
+
+		protected Rectangle RectangleTopRight
+		{
+			get
+			{
+				int height = MeasureHeight();
+				return PanesTop.Count > 0 && PanesRight.Count > 0 ? new Rectangle(Width - height, 0, height, height) : Rectangle.Empty;
+			}
+		}
+
+		protected Rectangle RectangleBottomLeft
+		{
+			get
+			{
+				int height = MeasureHeight();
+				return PanesBottom.Count > 0 && PanesLeft.Count > 0 ? new Rectangle(0, Height - height, height, height) : Rectangle.Empty;
+			}
+		}
+
+		protected Rectangle RectangleBottomRight
+		{
+			get
+			{
+				int height = MeasureHeight();
+				return PanesBottom.Count > 0 && PanesRight.Count > 0 ? new Rectangle(Width - height, Height - height, height, height) : Rectangle.Empty;
+			}
+		}
+
+		protected internal Rectangle GetTabStripRectangle(DockState dockState)
+		{
+			int height = MeasureHeight();
+			if (dockState == DockState.DockTopAutoHide && PanesTop.Count > 0)
+				return new Rectangle(RectangleTopLeft.Width, 0, Width - RectangleTopLeft.Width - RectangleTopRight.Width, height);
+			else if (dockState == DockState.DockBottomAutoHide && PanesBottom.Count > 0)
+				return new Rectangle(RectangleBottomLeft.Width, Height - height, Width - RectangleBottomLeft.Width - RectangleBottomRight.Width, height);
+			else if (dockState == DockState.DockLeftAutoHide && PanesLeft.Count > 0)
+				return new Rectangle(0, RectangleTopLeft.Width, height, Height - RectangleTopLeft.Height - RectangleBottomLeft.Height);
+			else if (dockState == DockState.DockRightAutoHide && PanesRight.Count > 0)
+				return new Rectangle(Width - height, RectangleTopRight.Width, height, Height - RectangleTopRight.Height - RectangleBottomRight.Height);
+			else
+				return Rectangle.Empty;
+		}
+
+		private GraphicsPath m_displayingArea = null;
+		private GraphicsPath DisplayingArea
+		{
+			get
+			{
+				if (m_displayingArea == null)
+					m_displayingArea = new GraphicsPath();
+
+				return m_displayingArea;
+			}
+		}
+
+		private void SetRegion()
+		{
+			DisplayingArea.Reset();
+			DisplayingArea.AddRectangle(RectangleTopLeft);
+			DisplayingArea.AddRectangle(RectangleTopRight);
+			DisplayingArea.AddRectangle(RectangleBottomLeft);
+			DisplayingArea.AddRectangle(RectangleBottomRight);
+			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockTopAutoHide));
+			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockBottomAutoHide));
+			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockLeftAutoHide));
+			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockRightAutoHide));
+			Region = new Region(DisplayingArea);
+		}
+
+		protected override void OnMouseDown(MouseEventArgs e)
+		{
+			base.OnMouseDown(e);
+
+			if (e.Button != MouseButtons.Left)
+				return;
+
+			IDockContent content = HitTest();
+			if (content == null)
+				return;
+
+			content.DockHandler.Activate();
+		}
+
+		protected override void OnMouseHover(EventArgs e)
+		{
+			base.OnMouseHover(e);
+
+			IDockContent content = HitTest();
+			if (content != null && DockPanel.ActiveAutoHideContent != content)
+				DockPanel.ActiveAutoHideContent = content;
+
+			// requires further tracking of mouse hover behavior,
+            ResetMouseEventArgs();
+		}
+
+		protected override void OnLayout(LayoutEventArgs levent)
+		{
+			RefreshChanges();
+			base.OnLayout (levent);
+		}
+
+		internal void RefreshChanges()
+		{
+            if (IsDisposed)
+                return;
+
+			SetRegion();
+			OnRefreshChanges();
+		}
+
+		protected virtual void OnRefreshChanges()
+		{
+		}
+
+		protected internal abstract int MeasureHeight();
+
+		private IDockContent HitTest()
+		{
+			Point ptMouse = PointToClient(Control.MousePosition);
+			return HitTest(ptMouse);
+		}
+
+        protected virtual Tab CreateTab(IDockContent content)
+        {
+            return new Tab(content);
+        }
+
+        protected virtual Pane CreatePane(DockPane dockPane)
+        {
+            return new Pane(dockPane);
+        }
+
+		protected abstract IDockContent HitTest(Point point);
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockAreasEditor.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockAreasEditor.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockAreasEditor.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,142 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Design;
+using System.Windows.Forms;
+using System.Windows.Forms.Design;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{	
+	internal class DockAreasEditor : UITypeEditor
+	{
+		private class DockAreasEditorControl : System.Windows.Forms.UserControl
+		{
+			private CheckBox checkBoxFloat;
+			private CheckBox checkBoxDockLeft;
+			private CheckBox checkBoxDockRight;
+			private CheckBox checkBoxDockTop;
+			private CheckBox checkBoxDockBottom;
+			private CheckBox checkBoxDockFill;
+			private DockAreas m_oldDockAreas;
+
+			public DockAreas DockAreas
+			{
+				get
+				{
+					DockAreas dockAreas = 0;
+					if (checkBoxFloat.Checked)
+						dockAreas |= DockAreas.Float;
+					if (checkBoxDockLeft.Checked)
+						dockAreas |= DockAreas.DockLeft;
+					if (checkBoxDockRight.Checked)
+						dockAreas |= DockAreas.DockRight;
+					if (checkBoxDockTop.Checked)
+						dockAreas |= DockAreas.DockTop;
+					if (checkBoxDockBottom.Checked)
+						dockAreas |= DockAreas.DockBottom;
+					if (checkBoxDockFill.Checked)
+						dockAreas |= DockAreas.Document;
+
+					if (dockAreas == 0)
+						return m_oldDockAreas;
+					else
+						return dockAreas;
+				}
+			}
+
+			public DockAreasEditorControl()
+			{
+				checkBoxFloat = new CheckBox();
+				checkBoxDockLeft = new CheckBox();
+				checkBoxDockRight = new CheckBox();
+				checkBoxDockTop = new CheckBox();
+				checkBoxDockBottom = new CheckBox();
+				checkBoxDockFill = new CheckBox();
+
+				SuspendLayout();
+
+				checkBoxFloat.Appearance = Appearance.Button;
+				checkBoxFloat.Dock = DockStyle.Top;
+				checkBoxFloat.Height = 24;
+				checkBoxFloat.Text = Strings.DockAreaEditor_FloatCheckBoxText;
+				checkBoxFloat.TextAlign = ContentAlignment.MiddleCenter;
+				checkBoxFloat.FlatStyle = FlatStyle.System;
+			
+				checkBoxDockLeft.Appearance = System.Windows.Forms.Appearance.Button;
+				checkBoxDockLeft.Dock = System.Windows.Forms.DockStyle.Left;
+				checkBoxDockLeft.Width = 24;
+				checkBoxDockLeft.FlatStyle = FlatStyle.System;
+
+				checkBoxDockRight.Appearance = System.Windows.Forms.Appearance.Button;
+				checkBoxDockRight.Dock = System.Windows.Forms.DockStyle.Right;
+				checkBoxDockRight.Width = 24;
+				checkBoxDockRight.FlatStyle = FlatStyle.System;
+
+				checkBoxDockTop.Appearance = System.Windows.Forms.Appearance.Button;
+				checkBoxDockTop.Dock = System.Windows.Forms.DockStyle.Top;
+				checkBoxDockTop.Height = 24;
+				checkBoxDockTop.FlatStyle = FlatStyle.System;
+
+				checkBoxDockBottom.Appearance = System.Windows.Forms.Appearance.Button;
+				checkBoxDockBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
+				checkBoxDockBottom.Height = 24;
+				checkBoxDockBottom.FlatStyle = FlatStyle.System;
+			
+				checkBoxDockFill.Appearance = System.Windows.Forms.Appearance.Button;
+				checkBoxDockFill.Dock = System.Windows.Forms.DockStyle.Fill;
+				checkBoxDockFill.FlatStyle = FlatStyle.System;
+
+				this.Controls.AddRange(new Control[] {
+														 checkBoxDockFill,
+														 checkBoxDockBottom,
+														 checkBoxDockTop,
+														 checkBoxDockRight,
+														 checkBoxDockLeft,
+														 checkBoxFloat});
+
+				Size = new System.Drawing.Size(160, 144);
+				BackColor = SystemColors.Control;
+				ResumeLayout();
+			}
+
+			public void SetStates(DockAreas dockAreas)
+			{
+				m_oldDockAreas = dockAreas;
+				if ((dockAreas & DockAreas.DockLeft) != 0)
+					checkBoxDockLeft.Checked = true;
+				if ((dockAreas & DockAreas.DockRight) != 0)
+					checkBoxDockRight.Checked = true;
+				if ((dockAreas & DockAreas.DockTop) != 0)
+					checkBoxDockTop.Checked = true;
+				if ((dockAreas & DockAreas.DockTop) != 0)
+					checkBoxDockTop.Checked = true;
+				if ((dockAreas & DockAreas.DockBottom) != 0)
+					checkBoxDockBottom.Checked = true;
+				if ((dockAreas & DockAreas.Document) != 0)
+					checkBoxDockFill.Checked = true;
+				if ((dockAreas & DockAreas.Float) != 0)
+					checkBoxFloat.Checked = true;
+			}
+		}
+
+		private DockAreasEditor.DockAreasEditorControl m_ui = null;
+
+		public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
+		{
+			return UITypeEditorEditStyle.DropDown;
+		}
+
+		public override object EditValue(ITypeDescriptorContext context, IServiceProvider sp, object value)
+		{
+			if (m_ui == null)
+				m_ui = new DockAreasEditor.DockAreasEditorControl();
+
+			m_ui.SetStates((DockAreas)value);
+
+            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)sp.GetService(typeof(IWindowsFormsEditorService));
+			edSvc.DropDownControl(m_ui);
+
+			return m_ui.DockAreas;
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContent.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContent.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContent.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,304 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public class DockContent : Form, IDockContent
+	{
+		public DockContent()
+		{
+			m_dockHandler = new DockContentHandler(this, new GetPersistStringCallback(GetPersistString));
+			m_dockHandler.DockStateChanged += new EventHandler(DockHandler_DockStateChanged);
+			//Suggested as a fix by bensty regarding form resize
+            this.ParentChanged += new EventHandler(DockContent_ParentChanged);
+		}
+
+		//Suggested as a fix by bensty regarding form resize
+        private void DockContent_ParentChanged(object Sender, EventArgs e)
+        {
+            if (this.Parent != null)
+                this.Font = this.Parent.Font;
+		}
+
+		private DockContentHandler m_dockHandler = null;
+		[Browsable(false)]
+		public DockContentHandler DockHandler
+		{
+			get	{	return m_dockHandler;	}
+		}
+
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_AllowEndUserDocking_Description")]
+		[DefaultValue(true)]
+		public bool AllowEndUserDocking
+		{
+			get	{	return DockHandler.AllowEndUserDocking;	}
+			set	{	DockHandler.AllowEndUserDocking = value;	}
+		}
+
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_DockAreas_Description")]
+		[DefaultValue(DockAreas.DockLeft|DockAreas.DockRight|DockAreas.DockTop|DockAreas.DockBottom|DockAreas.Document|DockAreas.Float)]
+		public DockAreas DockAreas
+		{
+			get	{	return DockHandler.DockAreas;	}
+			set	{	DockHandler.DockAreas = value;	}
+		}
+
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_AutoHidePortion_Description")]
+		[DefaultValue(0.25)]
+		public double AutoHidePortion
+		{
+			get	{	return DockHandler.AutoHidePortion;	}
+			set	{	DockHandler.AutoHidePortion = value;	}
+		}
+
+		[Localizable(true)]
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_TabText_Description")]
+		[DefaultValue(null)]
+        private string m_tabText = null;
+		public string TabText
+		{
+            get { return m_tabText; }
+            set { DockHandler.TabText = m_tabText = value; }
+		}
+		private bool ShouldSerializeTabText()
+		{
+			return (m_tabText != null);
+		}
+
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_CloseButton_Description")]
+		[DefaultValue(true)]
+		public bool CloseButton
+		{
+			get	{	return DockHandler.CloseButton;	}
+			set	{	DockHandler.CloseButton = value;	}
+		}
+
+        [LocalizedCategory("Category_Docking")]
+        [LocalizedDescription("DockContent_CloseButtonVisible_Description")]
+        [DefaultValue(true)]
+        public bool CloseButtonVisible
+        {
+            get { return DockHandler.CloseButtonVisible; }
+            set { DockHandler.CloseButtonVisible = value; }
+        }
+		
+		[Browsable(false)]
+		public DockPanel DockPanel
+		{
+			get {	return DockHandler.DockPanel; }
+			set	{	DockHandler.DockPanel = value;	}
+		}
+
+		[Browsable(false)]
+		public DockState DockState
+		{
+			get	{	return DockHandler.DockState;	}
+			set	{	DockHandler.DockState = value;	}
+		}
+
+		[Browsable(false)]
+		public DockPane Pane
+		{
+			get {	return DockHandler.Pane; }
+			set	{	DockHandler.Pane = value;		}
+		}
+
+		[Browsable(false)]
+		public bool IsHidden
+		{
+			get	{	return DockHandler.IsHidden;	}
+			set	{	DockHandler.IsHidden = value;	}
+		}
+
+		[Browsable(false)]
+		public DockState VisibleState
+		{
+			get	{	return DockHandler.VisibleState;	}
+			set	{	DockHandler.VisibleState = value;	}
+		}
+
+		[Browsable(false)]
+		public bool IsFloat
+		{
+			get	{	return DockHandler.IsFloat;	}
+			set	{	DockHandler.IsFloat = value;	}
+		}
+
+		[Browsable(false)]
+		public DockPane PanelPane
+		{
+			get	{	return DockHandler.PanelPane;	}
+			set	{	DockHandler.PanelPane = value;	}
+		}
+
+		[Browsable(false)]
+		public DockPane FloatPane
+		{
+			get	{	return DockHandler.FloatPane;	}
+			set	{	DockHandler.FloatPane = value;	}
+		}
+
+        [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
+        protected virtual string GetPersistString()
+		{
+            return GetType().ToString();
+		}
+
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_HideOnClose_Description")]
+		[DefaultValue(false)]
+		public bool HideOnClose
+		{
+			get	{	return DockHandler.HideOnClose;	}
+			set	{	DockHandler.HideOnClose = value;	}
+		}
+
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_ShowHint_Description")]
+		[DefaultValue(DockState.Unknown)]
+		public DockState ShowHint
+		{
+			get	{	return DockHandler.ShowHint;	}
+			set	{	DockHandler.ShowHint = value;	}
+		}
+
+		[Browsable(false)]
+		public bool IsActivated
+		{
+			get	{	return DockHandler.IsActivated;	}
+		}
+
+		public bool IsDockStateValid(DockState dockState)
+		{
+			return DockHandler.IsDockStateValid(dockState);
+		}
+
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockContent_TabPageContextMenu_Description")]
+		[DefaultValue(null)]
+		public ContextMenu TabPageContextMenu
+		{
+			get	{	return DockHandler.TabPageContextMenu;	}
+			set	{	DockHandler.TabPageContextMenu = value;	}
+		}
+
+        [LocalizedCategory("Category_Docking")]
+        [LocalizedDescription("DockContent_TabPageContextMenuStrip_Description")]
+        [DefaultValue(null)]
+        public ContextMenuStrip TabPageContextMenuStrip
+        {
+            get { return DockHandler.TabPageContextMenuStrip; }
+            set { DockHandler.TabPageContextMenuStrip = value; }
+        }
+
+		[Localizable(true)]
+		[Category("Appearance")]
+		[LocalizedDescription("DockContent_ToolTipText_Description")]
+		[DefaultValue(null)]
+		public string ToolTipText
+		{
+			get	{	return DockHandler.ToolTipText;	}
+			set {	DockHandler.ToolTipText = value;	}
+		}
+
+		public new void Activate()
+		{
+			DockHandler.Activate();
+		}
+
+		public new void Hide()
+		{
+			DockHandler.Hide();
+		}
+
+		public new void Show()
+		{
+			DockHandler.Show();
+		}
+
+		public void Show(DockPanel dockPanel)
+		{
+			DockHandler.Show(dockPanel);
+		}
+
+		public void Show(DockPanel dockPanel, DockState dockState)
+		{
+			DockHandler.Show(dockPanel, dockState);
+		}
+
+        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+		public void Show(DockPanel dockPanel, Rectangle floatWindowBounds)
+		{
+			DockHandler.Show(dockPanel, floatWindowBounds);
+		}
+
+		public void Show(DockPane pane, IDockContent beforeContent)
+		{
+			DockHandler.Show(pane, beforeContent);
+		}
+
+		public void Show(DockPane previousPane, DockAlignment alignment, double proportion)
+		{
+			DockHandler.Show(previousPane, alignment, proportion);
+		}
+
+        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+        public void FloatAt(Rectangle floatWindowBounds)
+        {
+            DockHandler.FloatAt(floatWindowBounds);
+        }
+
+        public void DockTo(DockPane paneTo, DockStyle dockStyle, int contentIndex)
+        {
+            DockHandler.DockTo(paneTo, dockStyle, contentIndex);
+        }
+
+        public void DockTo(DockPanel panel, DockStyle dockStyle)
+        {
+            DockHandler.DockTo(panel, dockStyle);
+        }
+
+		#region IDockContent Members
+		void IDockContent.OnActivated(EventArgs e)
+		{
+			this.OnActivated(e);
+		}
+
+		void IDockContent.OnDeactivate(EventArgs e)
+		{
+			this.OnDeactivate(e);
+		}
+		#endregion
+
+		#region Events
+		private void DockHandler_DockStateChanged(object sender, EventArgs e)
+		{
+			OnDockStateChanged(e);
+		}
+
+		private static readonly object DockStateChangedEvent = new object();
+		[LocalizedCategory("Category_PropertyChanged")]
+		[LocalizedDescription("Pane_DockStateChanged_Description")]
+		public event EventHandler DockStateChanged
+		{
+			add	{	Events.AddHandler(DockStateChangedEvent, value);	}
+			remove	{	Events.RemoveHandler(DockStateChangedEvent, value);	}
+		}
+		protected virtual void OnDockStateChanged(EventArgs e)
+		{
+			EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
+			if (handler != null)
+				handler(this, e);
+		}
+		#endregion
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentCollection.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentCollection.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentCollection.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,175 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    public class DockContentCollection : ReadOnlyCollection<IDockContent>
+    {
+        private static List<IDockContent> _emptyList = new List<IDockContent>(0);
+
+        internal DockContentCollection()
+            : base(new List<IDockContent>())
+        {
+        }
+
+        internal DockContentCollection(DockPane pane)
+            : base(_emptyList)
+        {
+            m_dockPane = pane;
+        }
+
+        private DockPane m_dockPane = null;
+        private DockPane DockPane
+        {
+            get { return m_dockPane; }
+        }
+
+        public new IDockContent this[int index]
+        {
+            get
+            {
+                if (DockPane == null)
+                    return Items[index] as IDockContent;
+                else
+                    return GetVisibleContent(index);
+            }
+        }
+
+        internal int Add(IDockContent content)
+        {
+#if DEBUG
+			if (DockPane != null)
+				throw new InvalidOperationException();
+#endif
+
+            if (Contains(content))
+                return IndexOf(content);
+
+            Items.Add(content);
+            return Count - 1;
+        }
+
+        internal void AddAt(IDockContent content, int index)
+        {
+#if DEBUG
+			if (DockPane != null)
+				throw new InvalidOperationException();
+#endif
+
+            if (index < 0 || index > Items.Count - 1)
+                return;
+
+            if (Contains(content))
+                return;
+
+            Items.Insert(index, content);
+        }
+
+        public new bool Contains(IDockContent content)
+        {
+            if (DockPane == null)
+                return Items.Contains(content);
+            else
+                return (GetIndexOfVisibleContents(content) != -1);
+        }
+
+        public new int Count
+        {
+            get
+            {
+                if (DockPane == null)
+                    return base.Count;
+                else
+                    return CountOfVisibleContents;
+            }
+        }
+
+        public new int IndexOf(IDockContent content)
+        {
+            if (DockPane == null)
+            {
+                if (!Contains(content))
+                    return -1;
+                else
+                    return Items.IndexOf(content);
+            }
+            else
+                return GetIndexOfVisibleContents(content);
+        }
+
+        internal void Remove(IDockContent content)
+        {
+            if (DockPane != null)
+                throw new InvalidOperationException();
+
+            if (!Contains(content))
+                return;
+
+            Items.Remove(content);
+        }
+
+        private int CountOfVisibleContents
+        {
+            get
+            {
+#if DEBUG
+				if (DockPane == null)
+					throw new InvalidOperationException();
+#endif
+
+                int count = 0;
+                foreach (IDockContent content in DockPane.Contents)
+                {
+                    if (content.DockHandler.DockState == DockPane.DockState)
+                        count++;
+                }
+                return count;
+            }
+        }
+
+        private IDockContent GetVisibleContent(int index)
+        {
+#if DEBUG
+			if (DockPane == null)
+				throw new InvalidOperationException();
+#endif
+
+            int currentIndex = -1;
+            foreach (IDockContent content in DockPane.Contents)
+            {
+                if (content.DockHandler.DockState == DockPane.DockState)
+                    currentIndex++;
+
+                if (currentIndex == index)
+                    return content;
+            }
+            throw (new ArgumentOutOfRangeException());
+        }
+
+        private int GetIndexOfVisibleContents(IDockContent content)
+        {
+#if DEBUG
+			if (DockPane == null)
+				throw new InvalidOperationException();
+#endif
+
+            if (content == null)
+                return -1;
+
+            int index = -1;
+            foreach (IDockContent c in DockPane.Contents)
+            {
+                if (c.DockHandler.DockState == DockPane.DockState)
+                {
+                    index++;
+
+                    if (c == content)
+                        return index;
+                }
+            }
+            return -1;
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentEventArgs.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentEventArgs.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentEventArgs.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,19 @@
+using System;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public class DockContentEventArgs : EventArgs
+	{
+		private IDockContent m_content;
+
+		public DockContentEventArgs(IDockContent content)
+		{
+			m_content = content;
+		}
+
+		public IDockContent Content
+		{
+			get	{	return m_content;	}
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentHandler.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentHandler.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockContentHandler.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,1070 @@
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public delegate string GetPersistStringCallback();
+
+	public class DockContentHandler : IDisposable, IDockDragSource
+	{
+		public DockContentHandler(Form form) : this(form, null)
+		{
+		}
+
+		public DockContentHandler(Form form, GetPersistStringCallback getPersistStringCallback)
+		{
+			if (!(form is IDockContent))
+				throw new ArgumentException(Strings.DockContent_Constructor_InvalidForm, "form");
+
+			m_form = form;
+			m_getPersistStringCallback = getPersistStringCallback;
+
+			m_events = new EventHandlerList();
+			Form.Disposed +=new EventHandler(Form_Disposed);
+			Form.TextChanged += new EventHandler(Form_TextChanged);
+		}
+
+		public void Dispose()
+		{
+			Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+
+		protected virtual void Dispose(bool disposing)
+		{
+			if(disposing)
+			{
+				lock(this)
+				{
+					DockPanel = null;
+					if (m_autoHideTab != null)
+						m_autoHideTab.Dispose();
+					if (m_tab != null)
+						m_tab.Dispose();
+
+					Form.Disposed -= new EventHandler(Form_Disposed);
+					Form.TextChanged -= new EventHandler(Form_TextChanged);
+					m_events.Dispose();
+				}
+			}
+		}
+
+		private Form m_form;
+		public Form Form
+		{
+			get	{	return m_form;	}
+		}
+
+		public IDockContent Content
+		{
+			get	{	return Form as IDockContent;	}
+		}
+
+        private IDockContent m_previousActive = null;
+        public IDockContent PreviousActive
+        {
+            get { return m_previousActive; }
+            internal set { m_previousActive = value; }
+        }
+
+        private IDockContent m_nextActive = null;
+        public IDockContent NextActive
+        {
+            get { return m_nextActive; }
+            internal set { m_nextActive = value; }
+        }
+
+		private EventHandlerList m_events;
+		private EventHandlerList Events
+		{
+			get	{	return m_events;	}
+		}
+
+		private bool m_allowEndUserDocking = true;
+		public bool AllowEndUserDocking
+		{
+			get	{	return m_allowEndUserDocking;	}
+			set	{	m_allowEndUserDocking = value;	}
+		}
+
+		private double m_autoHidePortion = 0.25;
+		public double AutoHidePortion
+		{
+			get	{	return m_autoHidePortion;	}
+			set
+			{
+				if (value <= 0)
+					throw(new ArgumentOutOfRangeException(Strings.DockContentHandler_AutoHidePortion_OutOfRange));
+
+				if (m_autoHidePortion == value)
+					return;
+
+				m_autoHidePortion = value;
+
+				if (DockPanel == null)
+					return;
+
+				if (DockPanel.ActiveAutoHideContent == Content)
+					DockPanel.PerformLayout();
+			}
+		}
+
+		private bool m_closeButton = true;
+		public bool CloseButton
+		{
+			get	{	return m_closeButton;	}
+			set
+			{
+				if (m_closeButton == value)
+					return;
+
+				m_closeButton = value;
+				if (Pane != null)
+					if (Pane.ActiveContent.DockHandler == this)
+						Pane.RefreshChanges();
+			}
+		}
+
+        private bool m_closeButtonVisible = true;
+        /// <summary>
+        /// Determines whether the close button is visible on the content
+        /// </summary>
+        public bool CloseButtonVisible
+        {
+            get { return m_closeButtonVisible; }
+            set { m_closeButtonVisible = value; }
+        }
+		
+		private DockState DefaultDockState
+		{
+			get
+			{
+				if (ShowHint != DockState.Unknown && ShowHint != DockState.Hidden)
+					return ShowHint;
+
+				if ((DockAreas & DockAreas.Document) != 0)
+					return DockState.Document;
+				if ((DockAreas & DockAreas.DockRight) != 0)
+					return DockState.DockRight;
+				if ((DockAreas & DockAreas.DockLeft) != 0)
+					return DockState.DockLeft;
+				if ((DockAreas & DockAreas.DockBottom) != 0)
+					return DockState.DockBottom;
+				if ((DockAreas & DockAreas.DockTop) != 0)
+					return DockState.DockTop;
+
+				return DockState.Unknown;
+			}
+		}
+
+		private DockState DefaultShowState
+		{
+			get
+			{
+				if (ShowHint != DockState.Unknown)
+					return ShowHint;
+
+				if ((DockAreas & DockAreas.Document) != 0)
+					return DockState.Document;
+				if ((DockAreas & DockAreas.DockRight) != 0)
+					return DockState.DockRight;
+				if ((DockAreas & DockAreas.DockLeft) != 0)
+					return DockState.DockLeft;
+				if ((DockAreas & DockAreas.DockBottom) != 0)
+					return DockState.DockBottom;
+				if ((DockAreas & DockAreas.DockTop) != 0)
+					return DockState.DockTop;
+				if ((DockAreas & DockAreas.Float) != 0)
+					return DockState.Float;
+
+				return DockState.Unknown;
+			}
+		}
+
+		private DockAreas m_allowedAreas = DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.DockBottom | DockAreas.Document | DockAreas.Float;
+		public DockAreas DockAreas
+		{
+			get	{	return m_allowedAreas;	}
+			set
+			{
+				if (m_allowedAreas == value)
+					return;
+
+				if (!DockHelper.IsDockStateValid(DockState, value))
+					throw(new InvalidOperationException(Strings.DockContentHandler_DockAreas_InvalidValue));
+
+				m_allowedAreas = value;
+
+				if (!DockHelper.IsDockStateValid(ShowHint, m_allowedAreas))
+					ShowHint = DockState.Unknown;
+			}
+		}
+
+		private DockState m_dockState = DockState.Unknown;
+		public DockState DockState
+		{
+			get	{	return m_dockState;	}
+			set
+			{
+				if (m_dockState == value)
+					return;
+
+                DockPanel.SuspendLayout(true);
+
+				if (value == DockState.Hidden)
+					IsHidden = true;
+				else
+					SetDockState(false, value, Pane);
+
+                DockPanel.ResumeLayout(true, true);
+			}
+		}
+
+		private DockPanel m_dockPanel = null;
+		public DockPanel DockPanel
+		{
+			get { return m_dockPanel; }
+			set
+			{
+				if (m_dockPanel == value)
+					return;
+
+				Pane = null;
+
+				if (m_dockPanel != null)
+					m_dockPanel.RemoveContent(Content);
+
+				if (m_tab != null)
+				{
+					m_tab.Dispose();
+					m_tab = null;
+				}
+
+				if (m_autoHideTab != null)
+				{
+					m_autoHideTab.Dispose();
+					m_autoHideTab = null;
+				}
+
+				m_dockPanel = value;
+
+				if (m_dockPanel != null)
+				{
+					m_dockPanel.AddContent(Content);
+					Form.TopLevel = false;
+					Form.FormBorderStyle = FormBorderStyle.None;
+					Form.ShowInTaskbar = false;
+                    Form.WindowState = FormWindowState.Normal;
+                    if (!Win32Helper.IsRunningOnMono())		    
+					NativeMethods.SetWindowPos(Form.Handle, IntPtr.Zero, 0, 0, 0, 0,
+						Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
+						Win32.FlagsSetWindowPos.SWP_NOMOVE |
+						Win32.FlagsSetWindowPos.SWP_NOSIZE |
+						Win32.FlagsSetWindowPos.SWP_NOZORDER |
+						Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
+						Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
+				}
+			}
+		}
+
+		public Icon Icon
+		{
+			get	{	return Form.Icon;	}
+		}
+
+		public DockPane Pane
+		{
+			get {	return IsFloat ? FloatPane : PanelPane; }
+			set
+			{
+				if (Pane == value)
+					return;
+
+                DockPanel.SuspendLayout(true);
+
+				DockPane oldPane = Pane;
+
+				SuspendSetDockState();
+				FloatPane = (value == null ? null : (value.IsFloat ? value : FloatPane));
+				PanelPane = (value == null ? null : (value.IsFloat ? PanelPane : value));
+				ResumeSetDockState(IsHidden, value != null ? value.DockState : DockState.Unknown, oldPane);
+
+                DockPanel.ResumeLayout(true, true);
+			}
+		}
+
+		private bool m_isHidden = true;
+		public bool IsHidden
+		{
+			get	{	return m_isHidden;	}
+			set
+			{
+				if (m_isHidden == value)
+					return;
+
+				SetDockState(value, VisibleState, Pane);
+			}
+		}
+
+		private string m_tabText = null;
+		public string TabText
+		{
+            get { return m_tabText == null || m_tabText == "" ? Form.Text : m_tabText; }
+			set
+			{
+				if (m_tabText == value)
+					return;
+
+				m_tabText = value;
+				if (Pane != null)
+					Pane.RefreshChanges();
+			}
+		}
+
+		private DockState m_visibleState = DockState.Unknown;
+		public DockState VisibleState
+		{
+			get	{	return m_visibleState;	}
+			set
+			{
+				if (m_visibleState == value)
+					return;
+
+				SetDockState(IsHidden, value, Pane);
+			}
+		}
+
+		private bool m_isFloat = false;
+		public bool IsFloat
+		{
+			get	{	return m_isFloat;	}
+			set
+			{
+				if (m_isFloat == value)
+					return;
+
+                DockState visibleState = CheckDockState(value);
+
+				if (visibleState == DockState.Unknown)
+					throw new InvalidOperationException(Strings.DockContentHandler_IsFloat_InvalidValue);
+
+				SetDockState(IsHidden, visibleState, Pane);
+			}
+		}
+
+        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+        public DockState CheckDockState(bool isFloat)
+        {
+            DockState dockState;
+
+            if (isFloat)
+            {
+                if (!IsDockStateValid(DockState.Float))
+                    dockState = DockState.Unknown;
+                else
+                    dockState = DockState.Float;
+            }
+            else
+            {
+                dockState = (PanelPane != null) ? PanelPane.DockState : DefaultDockState;
+                if (dockState != DockState.Unknown && !IsDockStateValid(dockState))
+                    dockState = DockState.Unknown;
+            }
+
+            return dockState;
+        }
+
+		private DockPane m_panelPane = null;
+		public DockPane PanelPane
+		{
+			get	{	return m_panelPane;	}
+			set
+			{
+				if (m_panelPane == value)
+					return;
+
+				if (value != null)
+				{
+					if (value.IsFloat || value.DockPanel != DockPanel)
+						throw new InvalidOperationException(Strings.DockContentHandler_DockPane_InvalidValue);
+				}
+
+				DockPane oldPane = Pane;
+
+                if (m_panelPane != null)
+                    RemoveFromPane(m_panelPane);
+				m_panelPane = value;
+				if (m_panelPane != null)
+				{
+					m_panelPane.AddContent(Content);
+					SetDockState(IsHidden, IsFloat ? DockState.Float : m_panelPane.DockState, oldPane);
+				}
+				else
+					SetDockState(IsHidden, DockState.Unknown, oldPane);
+			}
+		}
+
+        private void RemoveFromPane(DockPane pane)
+        {
+            pane.RemoveContent(Content);
+            SetPane(null);
+            if (pane.Contents.Count == 0)
+                pane.Dispose();
+        }
+
+		private DockPane m_floatPane = null;
+		public DockPane FloatPane
+		{
+			get	{	return m_floatPane;	}
+			set
+			{
+				if (m_floatPane == value)
+					return;
+
+				if (value != null)
+				{
+					if (!value.IsFloat || value.DockPanel != DockPanel)
+						throw new InvalidOperationException(Strings.DockContentHandler_FloatPane_InvalidValue);
+				}
+
+				DockPane oldPane = Pane;
+
+                if (m_floatPane != null)
+                    RemoveFromPane(m_floatPane);
+				m_floatPane = value;
+				if (m_floatPane != null)
+				{
+					m_floatPane.AddContent(Content);
+					SetDockState(IsHidden, IsFloat ? DockState.Float : VisibleState, oldPane);
+				}
+				else
+					SetDockState(IsHidden, DockState.Unknown, oldPane);
+			}
+		}
+
+		private int m_countSetDockState = 0;
+		private void SuspendSetDockState()
+		{
+			m_countSetDockState ++;
+		}
+
+		private void ResumeSetDockState()
+		{
+			m_countSetDockState --;
+			if (m_countSetDockState < 0)
+				m_countSetDockState = 0;
+		}
+
+		internal bool IsSuspendSetDockState
+		{
+			get	{	return m_countSetDockState != 0;	}
+		}
+
+		private void ResumeSetDockState(bool isHidden, DockState visibleState, DockPane oldPane)
+		{
+			ResumeSetDockState();
+			SetDockState(isHidden, visibleState, oldPane);
+		}
+
+		internal void SetDockState(bool isHidden, DockState visibleState, DockPane oldPane)
+		{
+			if (IsSuspendSetDockState)
+				return;
+
+			if (DockPanel == null && visibleState != DockState.Unknown)
+				throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_NullPanel);
+
+			if (visibleState == DockState.Hidden || (visibleState != DockState.Unknown && !IsDockStateValid(visibleState)))
+				throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_InvalidState);
+
+            DockPanel dockPanel = DockPanel;
+            if (dockPanel != null)
+                dockPanel.SuspendLayout(true);
+
+			SuspendSetDockState();
+
+			DockState oldDockState = DockState;
+
+			if (m_isHidden != isHidden || oldDockState == DockState.Unknown)
+			{
+				m_isHidden = isHidden;
+			}
+			m_visibleState = visibleState;
+			m_dockState = isHidden ? DockState.Hidden : visibleState;
+
+            if (visibleState == DockState.Unknown)
+                Pane = null;
+            else
+            {
+                m_isFloat = (m_visibleState == DockState.Float);
+
+                if (Pane == null)
+                    Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true);
+                else if (Pane.DockState != visibleState)
+                {
+                    if (Pane.Contents.Count == 1)
+                        Pane.SetDockState(visibleState);
+                    else
+                        Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true);
+                }
+            }
+
+            if (Form.ContainsFocus)
+                if (DockState == DockState.Hidden || DockState == DockState.Unknown)
+                    if (!Win32Helper.IsRunningOnMono())                    
+                    DockPanel.ContentFocusManager.GiveUpFocus(Content);
+
+            SetPaneAndVisible(Pane);
+
+			if (oldPane != null && !oldPane.IsDisposed && oldDockState == oldPane.DockState)
+				RefreshDockPane(oldPane);
+
+			if (Pane != null && DockState == Pane.DockState)
+			{
+				if ((Pane != oldPane) ||
+					(Pane == oldPane && oldDockState != oldPane.DockState))
+					// Avoid early refresh of hidden AutoHide panes
+					if ((Pane.DockWindow == null || Pane.DockWindow.Visible || Pane.IsHidden) && !Pane.IsAutoHide)
+						RefreshDockPane(Pane);			
+			}
+
+            if (oldDockState != DockState)
+            {
+                if (DockState == DockState.Hidden || DockState == DockState.Unknown ||
+                    DockHelper.IsDockStateAutoHide(DockState))
+                    if (!Win32Helper.IsRunningOnMono())
+                    DockPanel.ContentFocusManager.RemoveFromList(Content);
+                else
+                    if (!Win32Helper.IsRunningOnMono())
+                    DockPanel.ContentFocusManager.AddToList(Content);
+
+                OnDockStateChanged(EventArgs.Empty);
+            }
+			ResumeSetDockState();
+
+            if (dockPanel != null)
+                dockPanel.ResumeLayout(true, true);
+		}
+
+		private static void RefreshDockPane(DockPane pane)
+		{
+			pane.RefreshChanges();
+			pane.ValidateActiveContent();
+		}
+
+		internal string PersistString
+		{
+			get	{	return GetPersistStringCallback == null ? Form.GetType().ToString() : GetPersistStringCallback();	}
+		}
+
+		private GetPersistStringCallback m_getPersistStringCallback = null;
+		public GetPersistStringCallback GetPersistStringCallback
+		{
+			get	{	return m_getPersistStringCallback;	}
+			set	{	m_getPersistStringCallback = value;	}
+		}
+
+
+		private bool m_hideOnClose = false;
+		public bool HideOnClose
+		{
+			get	{	return m_hideOnClose;	}
+			set	{	m_hideOnClose = value;	}
+		}
+
+		private DockState m_showHint = DockState.Unknown;
+		public DockState ShowHint
+		{
+			get	{	return m_showHint;	}
+			set
+			{	
+				if (!DockHelper.IsDockStateValid(value, DockAreas))
+					throw (new InvalidOperationException(Strings.DockContentHandler_ShowHint_InvalidValue));
+
+				if (m_showHint == value)
+					return;
+
+				m_showHint = value;
+			}
+		}
+
+		private bool m_isActivated = false;
+		public bool IsActivated
+		{
+			get	{	return m_isActivated;	}
+		    internal set
+		    {
+	            if (m_isActivated == value)
+		            return;
+
+	            m_isActivated = value;
+		    }
+		}
+
+		public bool IsDockStateValid(DockState dockState)
+		{
+			if (DockPanel != null && dockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
+				return false;
+			else
+				return DockHelper.IsDockStateValid(dockState, DockAreas);
+		}
+
+		private ContextMenu m_tabPageContextMenu = null;
+		public ContextMenu TabPageContextMenu
+		{
+			get	{	return m_tabPageContextMenu;	}
+			set	{	m_tabPageContextMenu = value;	}
+		}
+
+		private string m_toolTipText = null;
+		public string ToolTipText
+		{
+			get	{	return m_toolTipText;	}
+			set {	m_toolTipText = value;	}
+		}
+
+		public void Activate()
+		{
+			if (DockPanel == null)
+				Form.Activate();
+			else if (Pane == null)
+				Show(DockPanel);
+			else
+			{
+				IsHidden = false;
+				Pane.ActiveContent = Content;
+                if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
+                {
+                    Form.Activate();
+                    return;
+                }
+                else if (DockHelper.IsDockStateAutoHide(DockState))
+                    DockPanel.ActiveAutoHideContent = Content;
+
+                if (!Form.ContainsFocus)
+                    if (!Win32Helper.IsRunningOnMono())
+                    DockPanel.ContentFocusManager.Activate(Content);
+			}
+		}
+
+        public void GiveUpFocus()
+        {
+            if (!Win32Helper.IsRunningOnMono())
+            DockPanel.ContentFocusManager.GiveUpFocus(Content);
+        }
+
+		private IntPtr m_activeWindowHandle = IntPtr.Zero;
+		internal IntPtr ActiveWindowHandle
+		{
+			get	{	return m_activeWindowHandle;	}
+			set	{	m_activeWindowHandle = value;	}
+		}
+
+		public void Hide()
+		{
+			IsHidden = true;
+		}
+
+        internal void SetPaneAndVisible(DockPane pane)
+        {
+            SetPane(pane);
+            SetVisible();
+        }
+
+		private void SetPane(DockPane pane)
+		{
+			if (pane != null && pane.DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
+			{
+				if (Form.Parent is DockPane)
+					SetParent(null);
+				if (Form.MdiParent != DockPanel.ParentForm)
+				{
+					FlagClipWindow = true;
+					Form.MdiParent = DockPanel.ParentForm;
+				}
+			}
+			else
+			{
+				FlagClipWindow = true;
+				if (Form.MdiParent != null)
+					Form.MdiParent = null;
+				if (Form.TopLevel)
+					Form.TopLevel = false;
+				SetParent(pane);
+			}
+		}
+
+		internal void SetVisible()
+		{
+			bool visible;
+
+			if (IsHidden)
+				visible = false;
+			else if (Pane != null && Pane.DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
+				visible = true;
+			else if (Pane != null && Pane.ActiveContent == Content)
+				visible = true;
+			else if (Pane != null && Pane.ActiveContent != Content)
+				visible = false;
+			else
+				visible = Form.Visible;
+
+            if (Form.Visible != visible)
+                Form.Visible = visible;
+		}
+
+		private void SetParent(Control value)
+		{
+			if (Form.Parent == value)
+				return;
+
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            // Workaround of .Net Framework bug:
+            // Change the parent of a control with focus may result in the first
+            // MDI child form get activated. 
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            bool bRestoreFocus = false;
+            if (Form.ContainsFocus)
+            {
+				//Suggested as a fix for a memory leak by bugreports
+                if (value == null && !IsFloat)
+                    if (!Win32Helper.IsRunningOnMono())
+                    DockPanel.ContentFocusManager.GiveUpFocus(this.Content);
+                else
+                {
+                    DockPanel.SaveFocus();
+                    bRestoreFocus = true;
+                }
+            }
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+            Form.Parent = value;
+
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            // Workaround of .Net Framework bug:
+            // Change the parent of a control with focus may result in the first
+            // MDI child form get activated. 
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            if (bRestoreFocus)
+                Activate();
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+        }
+
+		public void Show()
+		{
+			if (DockPanel == null)
+				Form.Show();
+			else
+				Show(DockPanel);
+		}
+
+		public void Show(DockPanel dockPanel)
+		{
+			if (dockPanel == null)
+				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
+
+			if (DockState == DockState.Unknown)
+				Show(dockPanel, DefaultShowState);
+			else			
+				Activate();
+		}
+
+		public void Show(DockPanel dockPanel, DockState dockState)
+		{
+			if (dockPanel == null)
+				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
+
+			if (dockState == DockState.Unknown || dockState == DockState.Hidden)
+				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidDockState));
+
+            dockPanel.SuspendLayout(true);
+
+			DockPanel = dockPanel;
+
+			if (dockState == DockState.Float && FloatPane == null)
+				Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Float, true);
+			else if (PanelPane == null)
+			{
+				DockPane paneExisting = null;
+				foreach (DockPane pane in DockPanel.Panes)
+					if (pane.DockState == dockState)
+					{
+						paneExisting = pane;
+						break;
+					}
+
+				if (paneExisting == null)
+					Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, dockState, true);
+				else
+					Pane = paneExisting;
+			}
+
+			DockState = dockState;
+            dockPanel.ResumeLayout(true, true); //we'll resume the layout before activating to ensure that the position
+            Activate();                         //and size of the form are finally processed before the form is shown
+		}
+
+        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+		public void Show(DockPanel dockPanel, Rectangle floatWindowBounds)
+		{
+			if (dockPanel == null)
+				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
+
+            dockPanel.SuspendLayout(true);
+
+			DockPanel = dockPanel;
+			if (FloatPane == null)
+			{
+				IsHidden = true;	// to reduce the screen flicker
+				FloatPane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Float, false);
+				FloatPane.FloatWindow.StartPosition = FormStartPosition.Manual;
+			}
+
+			FloatPane.FloatWindow.Bounds = floatWindowBounds;
+			
+			Show(dockPanel, DockState.Float);
+			Activate();
+
+            dockPanel.ResumeLayout(true, true);
+		}
+
+		public void Show(DockPane pane, IDockContent beforeContent)
+		{
+			if (pane == null)
+				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullPane));
+
+			if (beforeContent != null && pane.Contents.IndexOf(beforeContent) == -1)
+				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidBeforeContent));
+
+            pane.DockPanel.SuspendLayout(true);
+
+			DockPanel = pane.DockPanel;
+			Pane = pane;
+			pane.SetContentIndex(Content, pane.Contents.IndexOf(beforeContent));
+			Show();
+
+            pane.DockPanel.ResumeLayout(true, true);
+		}
+
+		public void Show(DockPane previousPane, DockAlignment alignment, double proportion)
+		{
+			if (previousPane == null)
+				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidPrevPane));
+
+			if (DockHelper.IsDockStateAutoHide(previousPane.DockState))
+				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidPrevPane));
+
+            previousPane.DockPanel.SuspendLayout(true);
+
+			DockPanel = previousPane.DockPanel;
+			DockPanel.DockPaneFactory.CreateDockPane(Content, previousPane, alignment, proportion, true);
+			Show();
+
+            previousPane.DockPanel.ResumeLayout(true, true);
+		}
+
+		public void Close()
+		{
+			DockPanel dockPanel = DockPanel;
+            if (dockPanel != null)
+                dockPanel.SuspendLayout(true);
+			Form.Close();
+			if (dockPanel != null)
+				dockPanel.ResumeLayout(true, true);
+
+		}
+
+		private DockPaneStripBase.Tab m_tab = null;
+		internal DockPaneStripBase.Tab GetTab(DockPaneStripBase dockPaneStrip)
+		{
+            if (m_tab == null)
+                m_tab = dockPaneStrip.CreateTab(Content);
+
+            return m_tab;
+		}
+
+		private IDisposable m_autoHideTab = null;
+		internal IDisposable AutoHideTab
+		{
+            get { return m_autoHideTab; }
+            set { m_autoHideTab = value; }
+		}
+
+		#region Events
+		private static readonly object DockStateChangedEvent = new object();
+		public event EventHandler DockStateChanged
+		{
+			add	{	Events.AddHandler(DockStateChangedEvent, value);	}
+			remove	{	Events.RemoveHandler(DockStateChangedEvent, value);	}
+		}
+		protected virtual void OnDockStateChanged(EventArgs e)
+		{
+			EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
+			if (handler != null)
+				handler(this, e);
+		}
+		#endregion
+
+		private void Form_Disposed(object sender, EventArgs e)
+		{
+			Dispose();
+		}
+
+		private void Form_TextChanged(object sender, EventArgs e)
+		{
+			if (DockHelper.IsDockStateAutoHide(DockState))
+				DockPanel.RefreshAutoHideStrip();
+			else if (Pane != null)
+			{
+				if (Pane.FloatWindow != null)
+					Pane.FloatWindow.SetText();
+				Pane.RefreshChanges();
+			}
+		}
+
+		private bool m_flagClipWindow = false;
+		internal bool FlagClipWindow
+		{
+			get	{	return m_flagClipWindow;	}
+			set
+			{
+				if (m_flagClipWindow == value)
+					return;
+
+				m_flagClipWindow = value;
+				if (m_flagClipWindow)
+					Form.Region = new Region(Rectangle.Empty);
+				else
+					Form.Region = null;
+			}
+		}
+
+        private ContextMenuStrip m_tabPageContextMenuStrip = null;
+        public ContextMenuStrip TabPageContextMenuStrip
+        {
+            get { return m_tabPageContextMenuStrip; }
+            set { m_tabPageContextMenuStrip = value; }
+        }
+
+        #region IDockDragSource Members
+
+        Control IDragSource.DragControl
+        {
+            get { return Form; }
+        }
+
+        bool IDockDragSource.CanDockTo(DockPane pane)
+        {
+            if (!IsDockStateValid(pane.DockState))
+                return false;
+
+            if (Pane == pane && pane.DisplayingContents.Count == 1)
+                return false;
+
+            return true;
+        }
+
+        Rectangle IDockDragSource.BeginDrag(Point ptMouse)
+        {
+            Size size;
+            DockPane floatPane = this.FloatPane;
+            if (DockState == DockState.Float || floatPane == null || floatPane.FloatWindow.NestedPanes.Count != 1)
+                size = DockPanel.DefaultFloatWindowSize;
+            else
+                size = floatPane.FloatWindow.Size;
+
+            Point location;
+			Rectangle rectPane = Pane.ClientRectangle;
+            if (DockState == DockState.Document)
+            {
+                if (Pane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    location = new Point(rectPane.Left, rectPane.Bottom - size.Height);
+                else
+                    location = new Point(rectPane.Left, rectPane.Top);
+            }
+            else
+            {
+                location = new Point(rectPane.Left, rectPane.Bottom);
+                location.Y -= size.Height;
+            }
+            location = Pane.PointToScreen(location);
+
+            if (ptMouse.X > location.X + size.Width)
+                location.X += ptMouse.X - (location.X + size.Width) + Measures.SplitterSize;
+
+            return new Rectangle(location, size);
+        }
+
+        public void FloatAt(Rectangle floatWindowBounds)
+        {
+            DockPane pane = DockPanel.DockPaneFactory.CreateDockPane(Content, floatWindowBounds, true);
+        }
+
+        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
+        {
+			if (dockStyle == DockStyle.Fill)
+			{
+				bool samePane = (Pane == pane);
+				if (!samePane)
+					Pane = pane;
+
+				if (contentIndex == -1 || !samePane)
+					pane.SetContentIndex(Content, contentIndex);
+				else
+				{
+					DockContentCollection contents = pane.Contents;
+					int oldIndex = contents.IndexOf(Content);
+					int newIndex = contentIndex;
+					if (oldIndex < newIndex)
+					{
+						newIndex += 1;
+						if (newIndex > contents.Count -1)
+							newIndex = -1;
+					}
+					pane.SetContentIndex(Content, newIndex);
+				}
+			}
+			else
+			{
+				DockPane paneFrom = DockPanel.DockPaneFactory.CreateDockPane(Content, pane.DockState, true);
+				INestedPanesContainer container = pane.NestedPanesContainer;
+				if (dockStyle == DockStyle.Left)
+					paneFrom.DockTo(container, pane, DockAlignment.Left, 0.5);
+				else if (dockStyle == DockStyle.Right) 
+					paneFrom.DockTo(container, pane, DockAlignment.Right, 0.5);
+				else if (dockStyle == DockStyle.Top)
+					paneFrom.DockTo(container, pane, DockAlignment.Top, 0.5);
+				else if (dockStyle == DockStyle.Bottom) 
+					paneFrom.DockTo(container, pane, DockAlignment.Bottom, 0.5);
+
+				paneFrom.DockState = pane.DockState;
+			}
+        }
+
+        public void DockTo(DockPanel panel, DockStyle dockStyle)
+        {
+            if (panel != DockPanel)
+                throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
+
+            DockPane pane;
+
+            if (dockStyle == DockStyle.Top)
+                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockTop, true);
+            else if (dockStyle == DockStyle.Bottom)
+                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockBottom, true);
+            else if (dockStyle == DockStyle.Left)
+                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockLeft, true);
+            else if (dockStyle == DockStyle.Right)
+                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockRight, true);
+            else if (dockStyle == DockStyle.Fill)
+                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Document, true);
+            else
+                return;
+        }
+
+        #endregion
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockOutlineBase.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockOutlineBase.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockOutlineBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,161 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    internal abstract class DockOutlineBase
+    {
+        public DockOutlineBase()
+        {
+            Init();
+        }
+
+        private void Init()
+        {
+            SetValues(Rectangle.Empty, null, DockStyle.None, -1);
+            SaveOldValues();
+        }
+
+        private Rectangle m_oldFloatWindowBounds;
+        protected Rectangle OldFloatWindowBounds
+        {
+            get { return m_oldFloatWindowBounds; }
+        }
+
+        private Control m_oldDockTo;
+        protected Control OldDockTo
+        {
+            get { return m_oldDockTo; }
+        }
+
+        private DockStyle m_oldDock;
+        protected DockStyle OldDock
+        {
+            get { return m_oldDock; }
+        }
+
+        private int m_oldContentIndex;
+        protected int OldContentIndex
+        {
+            get { return m_oldContentIndex; }
+        }
+
+        protected bool SameAsOldValue
+        {
+            get
+            {
+                return FloatWindowBounds == OldFloatWindowBounds &&
+                    DockTo == OldDockTo &&
+                    Dock == OldDock &&
+                    ContentIndex == OldContentIndex;
+            }
+        }
+
+        private Rectangle m_floatWindowBounds;
+        public Rectangle FloatWindowBounds
+        {
+            get { return m_floatWindowBounds; }
+        }
+
+        private Control m_dockTo;
+        public Control DockTo
+        {
+            get { return m_dockTo; }
+        }
+
+        private DockStyle m_dock;
+        public DockStyle Dock
+        {
+            get { return m_dock; }
+        }
+
+        private int m_contentIndex;
+        public int ContentIndex
+        {
+            get { return m_contentIndex; }
+        }
+
+        public bool FlagFullEdge
+        {
+            get { return m_contentIndex != 0; }
+        }
+
+        private bool m_flagTestDrop = false;
+        public bool FlagTestDrop
+        {
+            get { return m_flagTestDrop; }
+            set { m_flagTestDrop = value; }
+        }
+
+        private void SaveOldValues()
+        {
+            m_oldDockTo = m_dockTo;
+            m_oldDock = m_dock;
+            m_oldContentIndex = m_contentIndex;
+            m_oldFloatWindowBounds = m_floatWindowBounds;
+        }
+
+        protected abstract void OnShow();
+
+        protected abstract void OnClose();
+
+        private void SetValues(Rectangle floatWindowBounds, Control dockTo, DockStyle dock, int contentIndex)
+        {
+            m_floatWindowBounds = floatWindowBounds;
+            m_dockTo = dockTo;
+            m_dock = dock;
+            m_contentIndex = contentIndex;
+            FlagTestDrop = true;
+        }
+
+        private void TestChange()
+        {
+            if (m_floatWindowBounds != m_oldFloatWindowBounds ||
+                m_dockTo != m_oldDockTo ||
+                m_dock != m_oldDock ||
+                m_contentIndex != m_oldContentIndex)
+                OnShow();
+        }
+
+        public void Show()
+        {
+            SaveOldValues();
+            SetValues(Rectangle.Empty, null, DockStyle.None, -1);
+            TestChange();
+        }
+
+        public void Show(DockPane pane, DockStyle dock)
+        {
+            SaveOldValues();
+            SetValues(Rectangle.Empty, pane, dock, -1);
+            TestChange();
+        }
+
+        public void Show(DockPane pane, int contentIndex)
+        {
+            SaveOldValues();
+            SetValues(Rectangle.Empty, pane, DockStyle.Fill, contentIndex);
+            TestChange();
+        }
+
+        public void Show(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
+        {
+            SaveOldValues();
+            SetValues(Rectangle.Empty, dockPanel, dock, fullPanelEdge ? -1 : 0);
+            TestChange();
+        }
+
+        public void Show(Rectangle floatWindowBounds)
+        {
+            SaveOldValues();
+            SetValues(floatWindowBounds, null, DockStyle.None, -1);
+            TestChange();
+        }
+
+        public void Close()
+        {
+            OnClose();
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.SplitterControl.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.SplitterControl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.SplitterControl.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,157 @@
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    partial class DockPane
+    {
+        private class SplitterControl : Control, ISplitterDragSource
+        {
+            DockPane m_pane;
+
+            public SplitterControl(DockPane pane)
+            {
+                SetStyle(ControlStyles.Selectable, false);
+                m_pane = pane;
+            }
+
+            public DockPane DockPane
+            {
+                get { return m_pane; }
+            }
+
+            private DockAlignment m_alignment;
+            public DockAlignment Alignment
+            {
+                get { return m_alignment; }
+                set
+                {
+                    m_alignment = value;
+                    if (m_alignment == DockAlignment.Left || m_alignment == DockAlignment.Right)
+                        Cursor = Cursors.VSplit;
+                    else if (m_alignment == DockAlignment.Top || m_alignment == DockAlignment.Bottom)
+                        Cursor = Cursors.HSplit;
+                    else
+                        Cursor = Cursors.Default;
+
+                    if (DockPane.DockState == DockState.Document)
+                        Invalidate();
+                }
+            }
+
+            protected override void OnPaint(PaintEventArgs e)
+            {
+                base.OnPaint(e);
+
+                if (DockPane.DockState != DockState.Document)
+                    return;
+
+                Graphics g = e.Graphics;
+                Rectangle rect = ClientRectangle;
+                if (Alignment == DockAlignment.Top || Alignment == DockAlignment.Bottom)
+                    g.DrawLine(SystemPens.ControlDark, rect.Left, rect.Bottom - 1, rect.Right, rect.Bottom - 1);
+                else if (Alignment == DockAlignment.Left || Alignment == DockAlignment.Right)
+                    g.DrawLine(SystemPens.ControlDarkDark, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom);
+            }
+
+            protected override void OnMouseDown(MouseEventArgs e)
+            {
+                base.OnMouseDown(e);
+
+                if (e.Button != MouseButtons.Left)
+                    return;
+
+                DockPane.DockPanel.BeginDrag(this, Parent.RectangleToScreen(Bounds));
+            }
+
+            #region ISplitterDragSource Members
+
+            void ISplitterDragSource.BeginDrag(Rectangle rectSplitter)
+            {
+            }
+
+            void ISplitterDragSource.EndDrag()
+            {
+            }
+
+            bool ISplitterDragSource.IsVertical
+            {
+                get
+                {
+                    NestedDockingStatus status = DockPane.NestedDockingStatus;
+                    return (status.DisplayingAlignment == DockAlignment.Left ||
+                        status.DisplayingAlignment == DockAlignment.Right);
+                }
+            }
+
+            Rectangle ISplitterDragSource.DragLimitBounds
+            {
+                get
+                {
+                    NestedDockingStatus status = DockPane.NestedDockingStatus;
+                    Rectangle rectLimit = Parent.RectangleToScreen(status.LogicalBounds);
+                    if (((ISplitterDragSource)this).IsVertical)
+                    {
+                        rectLimit.X += MeasurePane.MinSize;
+                        rectLimit.Width -= 2 * MeasurePane.MinSize;
+                    }
+                    else
+                    {
+                        rectLimit.Y += MeasurePane.MinSize;
+                        rectLimit.Height -= 2 * MeasurePane.MinSize;
+                    }
+
+                    return rectLimit;
+                }
+            }
+
+            void ISplitterDragSource.MoveSplitter(int offset)
+            {
+                NestedDockingStatus status = DockPane.NestedDockingStatus;
+                double proportion = status.Proportion;
+                if (status.LogicalBounds.Width <= 0 || status.LogicalBounds.Height <= 0)
+                    return;
+                else if (status.DisplayingAlignment == DockAlignment.Left)
+                    proportion += ((double)offset) / (double)status.LogicalBounds.Width;
+                else if (status.DisplayingAlignment == DockAlignment.Right)
+                    proportion -= ((double)offset) / (double)status.LogicalBounds.Width;
+                else if (status.DisplayingAlignment == DockAlignment.Top)
+                    proportion += ((double)offset) / (double)status.LogicalBounds.Height;
+                else
+                    proportion -= ((double)offset) / (double)status.LogicalBounds.Height;
+
+                DockPane.SetNestedDockingProportion(proportion);
+            }
+
+            #region IDragSource Members
+
+            Control IDragSource.DragControl
+            {
+                get { return this; }
+            }
+
+            #endregion
+
+            #endregion
+        }
+
+        private SplitterControl m_splitter;
+        private SplitterControl Splitter
+        {
+            get { return m_splitter; }
+        }
+
+        internal Rectangle SplitterBounds
+        {
+            set { Splitter.Bounds = value; }
+        }
+
+        internal DockAlignment SplitterAlignment
+        {
+            set { Splitter.Alignment = value; }
+        }
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPane.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,1300 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    [ToolboxItem(false)]
+    public partial class DockPane : UserControl, IDockDragSource
+    {
+        public enum AppearanceStyle
+        {
+            ToolWindow,
+            Document
+        }
+
+        private enum HitTestArea
+        {
+            Caption,
+            TabStrip,
+            Content,
+            None
+        }
+
+        private struct HitTestResult
+        {
+            public HitTestArea HitArea;
+            public int Index;
+
+            public HitTestResult(HitTestArea hitTestArea, int index)
+            {
+                HitArea = hitTestArea;
+                Index = index;
+            }
+        }
+
+        private DockPaneCaptionBase m_captionControl;
+        private DockPaneCaptionBase CaptionControl
+        {
+            get { return m_captionControl; }
+        }
+
+        private DockPaneStripBase m_tabStripControl;
+        internal DockPaneStripBase TabStripControl
+        {
+            get { return m_tabStripControl; }
+        }
+
+        internal protected DockPane(IDockContent content, DockState visibleState, bool show)
+        {
+            InternalConstruct(content, visibleState, false, Rectangle.Empty, null, DockAlignment.Right, 0.5, show);
+        }
+
+        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
+        internal protected DockPane(IDockContent content, FloatWindow floatWindow, bool show)
+        {
+            if (floatWindow == null)
+                throw new ArgumentNullException("floatWindow");
+
+            InternalConstruct(content, DockState.Float, false, Rectangle.Empty, floatWindow.NestedPanes.GetDefaultPreviousPane(this), DockAlignment.Right, 0.5, show);
+        }
+
+        internal protected DockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion, bool show)
+        {
+            if (previousPane == null)
+                throw (new ArgumentNullException("previousPane"));
+            InternalConstruct(content, previousPane.DockState, false, Rectangle.Empty, previousPane, alignment, proportion, show);
+        }
+
+        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
+        internal protected DockPane(IDockContent content, Rectangle floatWindowBounds, bool show)
+        {
+            InternalConstruct(content, DockState.Float, true, floatWindowBounds, null, DockAlignment.Right, 0.5, show);
+        }
+
+        private void InternalConstruct(IDockContent content, DockState dockState, bool flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, double proportion, bool show)
+        {
+            if (dockState == DockState.Hidden || dockState == DockState.Unknown)
+                throw new ArgumentException(Strings.DockPane_SetDockState_InvalidState);
+
+            if (content == null)
+                throw new ArgumentNullException(Strings.DockPane_Constructor_NullContent);
+
+            if (content.DockHandler.DockPanel == null)
+                throw new ArgumentException(Strings.DockPane_Constructor_NullDockPanel);
+
+
+            SuspendLayout();
+            SetStyle(ControlStyles.Selectable, false);
+
+            m_isFloat = (dockState == DockState.Float);
+
+            m_contents = new DockContentCollection();
+            m_displayingContents = new DockContentCollection(this);
+            m_dockPanel = content.DockHandler.DockPanel;
+            m_dockPanel.AddPane(this);
+
+            m_splitter = new SplitterControl(this);
+
+            m_nestedDockingStatus = new NestedDockingStatus(this);
+
+            m_captionControl = DockPanel.DockPaneCaptionFactory.CreateDockPaneCaption(this);
+            m_tabStripControl = DockPanel.DockPaneStripFactory.CreateDockPaneStrip(this);
+            Controls.AddRange(new Control[] { m_captionControl, m_tabStripControl });
+
+            DockPanel.SuspendLayout(true);
+            if (flagBounds)
+                FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
+            else if (prevPane != null)
+                DockTo(prevPane.NestedPanesContainer, prevPane, alignment, proportion);
+
+            SetDockState(dockState);
+            if (show)
+                content.DockHandler.Pane = this;
+            else if (this.IsFloat)
+                content.DockHandler.FloatPane = this;
+            else
+                content.DockHandler.PanelPane = this;
+
+            ResumeLayout();
+            DockPanel.ResumeLayout(true, true);
+        }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                m_dockState = DockState.Unknown;
+
+                if (NestedPanesContainer != null)
+                    NestedPanesContainer.NestedPanes.Remove(this);
+
+                if (DockPanel != null)
+                {
+                    DockPanel.RemovePane(this);
+                    m_dockPanel = null;
+                }
+
+                Splitter.Dispose();
+                if (m_autoHidePane != null)
+                    m_autoHidePane.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private IDockContent m_activeContent = null;
+        public virtual IDockContent ActiveContent
+        {
+            get { return m_activeContent; }
+            set
+            {
+                if (ActiveContent == value)
+                    return;
+
+                if (value != null)
+                {
+                    if (!DisplayingContents.Contains(value))
+                        throw (new InvalidOperationException(Strings.DockPane_ActiveContent_InvalidValue));
+                }
+                else
+                {
+                    if (DisplayingContents.Count != 0)
+                        throw (new InvalidOperationException(Strings.DockPane_ActiveContent_InvalidValue));
+                }
+
+                IDockContent oldValue = m_activeContent;
+
+                if (DockPanel.ActiveAutoHideContent == oldValue)
+                    DockPanel.ActiveAutoHideContent = null;
+
+                m_activeContent = value;
+
+                if (DockPanel.DocumentStyle == DocumentStyle.DockingMdi && DockState == DockState.Document)
+                {
+                    if (m_activeContent != null)
+                        m_activeContent.DockHandler.Form.BringToFront();
+                }
+                else
+                {
+                    if (m_activeContent != null)
+                        m_activeContent.DockHandler.SetVisible();
+                    if (oldValue != null && DisplayingContents.Contains(oldValue))
+                        oldValue.DockHandler.SetVisible();
+                    if (IsActivated && m_activeContent != null)
+                        m_activeContent.DockHandler.Activate();
+                }
+
+                if (FloatWindow != null)
+                    FloatWindow.SetText();
+
+                if (DockPanel.DocumentStyle == DocumentStyle.DockingMdi &&
+                    DockState == DockState.Document)
+                    RefreshChanges(false);  // delayed layout to reduce screen flicker
+                else
+                    RefreshChanges();
+
+                if (m_activeContent != null)
+                    TabStripControl.EnsureTabVisible(m_activeContent);
+            }
+        }
+
+        private bool m_allowDockDragAndDrop = true;
+        public virtual bool AllowDockDragAndDrop
+        {
+            get { return m_allowDockDragAndDrop; }
+            set { m_allowDockDragAndDrop = value; }
+        }
+
+        private IDisposable m_autoHidePane = null;
+        internal IDisposable AutoHidePane
+        {
+            get { return m_autoHidePane; }
+            set { m_autoHidePane = value; }
+        }
+
+        private object m_autoHideTabs = null;
+        internal object AutoHideTabs
+        {
+            get { return m_autoHideTabs; }
+            set { m_autoHideTabs = value; }
+        }
+
+        private object TabPageContextMenu
+        {
+            get
+            {
+                IDockContent content = ActiveContent;
+
+                if (content == null)
+                    return null;
+
+                if (content.DockHandler.TabPageContextMenuStrip != null)
+                    return content.DockHandler.TabPageContextMenuStrip;
+                else if (content.DockHandler.TabPageContextMenu != null)
+                    return content.DockHandler.TabPageContextMenu;
+                else
+                    return null;
+            }
+        }
+
+        internal bool HasTabPageContextMenu
+        {
+            get { return TabPageContextMenu != null; }
+        }
+
+        internal void ShowTabPageContextMenu(Control control, Point position)
+        {
+            object menu = TabPageContextMenu;
+
+            if (menu == null)
+                return;
+
+            ContextMenuStrip contextMenuStrip = menu as ContextMenuStrip;
+            if (contextMenuStrip != null)
+            {
+                contextMenuStrip.Show(control, position);
+                return;
+            }
+
+            ContextMenu contextMenu = menu as ContextMenu;
+            if (contextMenu != null)
+                contextMenu.Show(this, position);
+        }
+
+        private Rectangle CaptionRectangle
+        {
+            get
+            {
+                if (!HasCaption)
+                    return Rectangle.Empty;
+
+                Rectangle rectWindow = DisplayingRectangle;
+                int x, y, width;
+                x = rectWindow.X;
+                y = rectWindow.Y;
+                width = rectWindow.Width;
+                int height = CaptionControl.MeasureHeight();
+
+                return new Rectangle(x, y, width, height);
+            }
+        }
+
+        internal Rectangle ContentRectangle
+        {
+            get
+            {
+                Rectangle rectWindow = DisplayingRectangle;
+                Rectangle rectCaption = CaptionRectangle;
+                Rectangle rectTabStrip = TabStripRectangle;
+
+                int x = rectWindow.X;
+
+                int y = rectWindow.Y + (rectCaption.IsEmpty ? 0 : rectCaption.Height);
+                if (DockState == DockState.Document && DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Top)
+                    y += rectTabStrip.Height;
+
+                int width = rectWindow.Width;
+                int height = rectWindow.Height - rectCaption.Height - rectTabStrip.Height;
+
+                return new Rectangle(x, y, width, height);
+            }
+        }
+
+        internal Rectangle TabStripRectangle
+        {
+            get
+            {
+                if (Appearance == AppearanceStyle.ToolWindow)
+                    return TabStripRectangle_ToolWindow;
+                else
+                    return TabStripRectangle_Document;
+            }
+        }
+
+        private Rectangle TabStripRectangle_ToolWindow
+        {
+            get
+            {
+                if (DisplayingContents.Count <= 1 || IsAutoHide)
+                    return Rectangle.Empty;
+
+                Rectangle rectWindow = DisplayingRectangle;
+
+                int width = rectWindow.Width;
+                int height = TabStripControl.MeasureHeight();
+                int x = rectWindow.X;
+                int y = rectWindow.Bottom - height;
+                Rectangle rectCaption = CaptionRectangle;
+                if (rectCaption.Contains(x, y))
+                    y = rectCaption.Y + rectCaption.Height;
+
+                return new Rectangle(x, y, width, height);
+            }
+        }
+
+        private Rectangle TabStripRectangle_Document
+        {
+            get
+            {
+                if (DisplayingContents.Count == 0)
+                    return Rectangle.Empty;
+
+                if (DisplayingContents.Count == 1 && DockPanel.DocumentStyle == DocumentStyle.DockingSdi)
+                    return Rectangle.Empty;
+
+                Rectangle rectWindow = DisplayingRectangle;
+                int x = rectWindow.X;
+                int width = rectWindow.Width;
+                int height = TabStripControl.MeasureHeight();
+
+                int y = 0;
+                if (DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    y = rectWindow.Height - height;
+                else
+                    y = rectWindow.Y;
+
+                return new Rectangle(x, y, width, height);
+            }
+        }
+
+        public virtual string CaptionText
+        {
+            get { return ActiveContent == null ? string.Empty : ActiveContent.DockHandler.TabText; }
+        }
+
+        private DockContentCollection m_contents;
+        public DockContentCollection Contents
+        {
+            get { return m_contents; }
+        }
+
+        private DockContentCollection m_displayingContents;
+        public DockContentCollection DisplayingContents
+        {
+            get { return m_displayingContents; }
+        }
+
+        private DockPanel m_dockPanel;
+        public DockPanel DockPanel
+        {
+            get { return m_dockPanel; }
+        }
+
+        private bool HasCaption
+        {
+            get
+            {
+                if (DockState == DockState.Document ||
+                    DockState == DockState.Hidden ||
+                    DockState == DockState.Unknown ||
+                    (DockState == DockState.Float && FloatWindow.VisibleNestedPanes.Count <= 1))
+                    return false;
+                else
+                    return true;
+            }
+        }
+
+        private bool m_isActivated = false;
+        public bool IsActivated
+        {
+            get { return m_isActivated; }
+        }
+        internal void SetIsActivated(bool value)
+        {
+            if (m_isActivated == value)
+                return;
+
+            m_isActivated = value;
+            if (DockState != DockState.Document)
+                RefreshChanges(false);
+            OnIsActivatedChanged(EventArgs.Empty);
+        }
+
+        private bool m_isActiveDocumentPane = false;
+        public bool IsActiveDocumentPane
+        {
+            get { return m_isActiveDocumentPane; }
+        }
+        internal void SetIsActiveDocumentPane(bool value)
+        {
+            if (m_isActiveDocumentPane == value)
+                return;
+
+            m_isActiveDocumentPane = value;
+            if (DockState == DockState.Document)
+                RefreshChanges();
+            OnIsActiveDocumentPaneChanged(EventArgs.Empty);
+        }
+
+        public bool IsDockStateValid(DockState dockState)
+        {
+            foreach (IDockContent content in Contents)
+                if (!content.DockHandler.IsDockStateValid(dockState))
+                    return false;
+
+            return true;
+        }
+
+        public bool IsAutoHide
+        {
+            get { return DockHelper.IsDockStateAutoHide(DockState); }
+        }
+
+        public AppearanceStyle Appearance
+        {
+            get { return (DockState == DockState.Document) ? AppearanceStyle.Document : AppearanceStyle.ToolWindow; }
+        }
+
+        internal Rectangle DisplayingRectangle
+        {
+            get { return ClientRectangle; }
+        }
+
+        public void Activate()
+        {
+            if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel.ActiveAutoHideContent != ActiveContent)
+                DockPanel.ActiveAutoHideContent = ActiveContent;
+            else if (!IsActivated && ActiveContent != null)
+                ActiveContent.DockHandler.Activate();
+        }
+
+        internal void AddContent(IDockContent content)
+        {
+            if (Contents.Contains(content))
+                return;
+
+            Contents.Add(content);
+        }
+
+        internal void Close()
+        {
+            Dispose();
+        }
+
+        public void CloseActiveContent()
+        {
+            CloseContent(ActiveContent);
+        }
+
+        internal void CloseContent(IDockContent content)
+        {
+            DockPanel dockPanel = DockPanel;
+
+            if (content == null)
+                return;
+
+            if (!content.DockHandler.CloseButton)
+                return;
+
+            dockPanel.SuspendLayout(true);
+
+            try
+            {
+                if (content.DockHandler.HideOnClose)
+                {
+                    content.DockHandler.Hide();
+                    NestedDockingStatus.NestedPanes.SwitchPaneWithFirstChild(this);
+                }
+                else
+                    content.DockHandler.Close();
+            }
+            finally
+            {
+                dockPanel.ResumeLayout(true, true);
+            }
+        }
+
+        private HitTestResult GetHitTest(Point ptMouse)
+        {
+            Point ptMouseClient = PointToClient(ptMouse);
+
+            Rectangle rectCaption = CaptionRectangle;
+            if (rectCaption.Contains(ptMouseClient))
+                return new HitTestResult(HitTestArea.Caption, -1);
+
+            Rectangle rectContent = ContentRectangle;
+            if (rectContent.Contains(ptMouseClient))
+                return new HitTestResult(HitTestArea.Content, -1);
+
+            Rectangle rectTabStrip = TabStripRectangle;
+            if (rectTabStrip.Contains(ptMouseClient))
+                return new HitTestResult(HitTestArea.TabStrip, TabStripControl.HitTest(TabStripControl.PointToClient(ptMouse)));
+
+            return new HitTestResult(HitTestArea.None, -1);
+        }
+
+        private bool m_isHidden = true;
+        public bool IsHidden
+        {
+            get { return m_isHidden; }
+        }
+        private void SetIsHidden(bool value)
+        {
+            if (m_isHidden == value)
+                return;
+
+            m_isHidden = value;
+            if (DockHelper.IsDockStateAutoHide(DockState))
+            {
+                DockPanel.RefreshAutoHideStrip();
+                DockPanel.PerformLayout();
+            }
+            else if (NestedPanesContainer != null)
+                ((Control)NestedPanesContainer).PerformLayout();
+        }
+
+        protected override void OnLayout(LayoutEventArgs levent)
+        {
+            SetIsHidden(DisplayingContents.Count == 0);
+            if (!IsHidden)
+            {
+                CaptionControl.Bounds = CaptionRectangle;
+                TabStripControl.Bounds = TabStripRectangle;
+
+                SetContentBounds();
+
+                foreach (IDockContent content in Contents)
+                {
+                    if (DisplayingContents.Contains(content))
+                        if (content.DockHandler.FlagClipWindow && content.DockHandler.Form.Visible)
+                            content.DockHandler.FlagClipWindow = false;
+                }
+            }
+
+            base.OnLayout(levent);
+        }
+
+        internal void SetContentBounds()
+        {
+            Rectangle rectContent = ContentRectangle;
+            if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
+                rectContent = DockPanel.RectangleToMdiClient(RectangleToScreen(rectContent));
+
+            Rectangle rectInactive = new Rectangle(-rectContent.Width, rectContent.Y, rectContent.Width, rectContent.Height);
+            foreach (IDockContent content in Contents)
+                if (content.DockHandler.Pane == this)
+                {
+                    if (content == ActiveContent)
+                        content.DockHandler.Form.Bounds = rectContent;
+                    else
+                        content.DockHandler.Form.Bounds = rectInactive;
+                }
+        }
+
+        internal void RefreshChanges()
+        {
+            RefreshChanges(true);
+        }
+
+        private void RefreshChanges(bool performLayout)
+        {
+            if (IsDisposed)
+                return;
+
+            CaptionControl.RefreshChanges();
+            TabStripControl.RefreshChanges();
+            if (DockState == DockState.Float && FloatWindow != null)
+                FloatWindow.RefreshChanges();
+            if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel != null)
+            {
+                DockPanel.RefreshAutoHideStrip();
+                DockPanel.PerformLayout();
+            }
+
+            if (performLayout)
+                PerformLayout();
+        }
+
+        internal void RemoveContent(IDockContent content)
+        {
+            if (!Contents.Contains(content))
+                return;
+
+            Contents.Remove(content);
+        }
+
+        public void SetContentIndex(IDockContent content, int index)
+        {
+            int oldIndex = Contents.IndexOf(content);
+            if (oldIndex == -1)
+                throw (new ArgumentException(Strings.DockPane_SetContentIndex_InvalidContent));
+
+            if (index < 0 || index > Contents.Count - 1)
+                if (index != -1)
+                    throw (new ArgumentOutOfRangeException(Strings.DockPane_SetContentIndex_InvalidIndex));
+
+            if (oldIndex == index)
+                return;
+            if (oldIndex == Contents.Count - 1 && index == -1)
+                return;
+
+            Contents.Remove(content);
+            if (index == -1)
+                Contents.Add(content);
+            else if (oldIndex < index)
+                Contents.AddAt(content, index - 1);
+            else
+                Contents.AddAt(content, index);
+
+            RefreshChanges();
+        }
+
+        private void SetParent()
+        {
+            if (DockState == DockState.Unknown || DockState == DockState.Hidden)
+            {
+                SetParent(null);
+                Splitter.Parent = null;
+            }
+            else if (DockState == DockState.Float)
+            {
+                SetParent(FloatWindow);
+                Splitter.Parent = FloatWindow;
+            }
+            else if (DockHelper.IsDockStateAutoHide(DockState))
+            {
+                SetParent(DockPanel.AutoHideControl);
+                Splitter.Parent = null;
+            }
+            else
+            {
+                SetParent(DockPanel.DockWindows[DockState]);
+                Splitter.Parent = Parent;
+            }
+        }
+
+        private void SetParent(Control value)
+        {
+            if (Parent == value)
+                return;
+
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            // Workaround of .Net Framework bug:
+            // Change the parent of a control with focus may result in the first
+            // MDI child form get activated. 
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            IDockContent contentFocused = GetFocusedContent();
+            if (contentFocused != null)
+                DockPanel.SaveFocus();
+
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+            Parent = value;
+
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            // Workaround of .Net Framework bug:
+            // Change the parent of a control with focus may result in the first
+            // MDI child form get activated. 
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            if (contentFocused != null)
+                contentFocused.DockHandler.Activate();
+            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+        }
+
+        public new void Show()
+        {
+            Activate();
+        }
+
+        internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline)
+        {
+            if (!dragSource.CanDockTo(this))
+                return;
+
+            Point ptMouse = Control.MousePosition;
+
+            HitTestResult hitTestResult = GetHitTest(ptMouse);
+            if (hitTestResult.HitArea == HitTestArea.Caption)
+                dockOutline.Show(this, -1);
+            else if (hitTestResult.HitArea == HitTestArea.TabStrip && hitTestResult.Index != -1)
+                dockOutline.Show(this, hitTestResult.Index);
+        }
+
+        internal void ValidateActiveContent()
+        {
+            if (ActiveContent == null)
+            {
+                if (DisplayingContents.Count != 0)
+                    ActiveContent = DisplayingContents[0];
+                return;
+            }
+
+            if (DisplayingContents.IndexOf(ActiveContent) >= 0)
+                return;
+
+            IDockContent prevVisible = null;
+            for (int i = Contents.IndexOf(ActiveContent) - 1; i >= 0; i--)
+                if (Contents[i].DockHandler.DockState == DockState)
+                {
+                    prevVisible = Contents[i];
+                    break;
+                }
+
+            IDockContent nextVisible = null;
+            for (int i = Contents.IndexOf(ActiveContent) + 1; i < Contents.Count; i++)
+                if (Contents[i].DockHandler.DockState == DockState)
+                {
+                    nextVisible = Contents[i];
+                    break;
+                }
+
+            if (prevVisible != null)
+                ActiveContent = prevVisible;
+            else if (nextVisible != null)
+                ActiveContent = nextVisible;
+            else
+                ActiveContent = null;
+        }
+
+        private static readonly object DockStateChangedEvent = new object();
+        public event EventHandler DockStateChanged
+        {
+            add { Events.AddHandler(DockStateChangedEvent, value); }
+            remove { Events.RemoveHandler(DockStateChangedEvent, value); }
+        }
+        protected virtual void OnDockStateChanged(EventArgs e)
+        {
+            EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
+            if (handler != null)
+                handler(this, e);
+        }
+
+        private static readonly object IsActivatedChangedEvent = new object();
+        public event EventHandler IsActivatedChanged
+        {
+            add { Events.AddHandler(IsActivatedChangedEvent, value); }
+            remove { Events.RemoveHandler(IsActivatedChangedEvent, value); }
+        }
+        protected virtual void OnIsActivatedChanged(EventArgs e)
+        {
+            EventHandler handler = (EventHandler)Events[IsActivatedChangedEvent];
+            if (handler != null)
+                handler(this, e);
+        }
+
+        private static readonly object IsActiveDocumentPaneChangedEvent = new object();
+        public event EventHandler IsActiveDocumentPaneChanged
+        {
+            add { Events.AddHandler(IsActiveDocumentPaneChangedEvent, value); }
+            remove { Events.RemoveHandler(IsActiveDocumentPaneChangedEvent, value); }
+        }
+        protected virtual void OnIsActiveDocumentPaneChanged(EventArgs e)
+        {
+            EventHandler handler = (EventHandler)Events[IsActiveDocumentPaneChangedEvent];
+            if (handler != null)
+                handler(this, e);
+        }
+
+        public DockWindow DockWindow
+        {
+            get { return (m_nestedDockingStatus.NestedPanes == null) ? null : m_nestedDockingStatus.NestedPanes.Container as DockWindow; }
+            set
+            {
+                DockWindow oldValue = DockWindow;
+                if (oldValue == value)
+                    return;
+
+                DockTo(value);
+            }
+        }
+
+        public FloatWindow FloatWindow
+        {
+            get { return (m_nestedDockingStatus.NestedPanes == null) ? null : m_nestedDockingStatus.NestedPanes.Container as FloatWindow; }
+            set
+            {
+                FloatWindow oldValue = FloatWindow;
+                if (oldValue == value)
+                    return;
+
+                DockTo(value);
+            }
+        }
+
+        private NestedDockingStatus m_nestedDockingStatus;
+        public NestedDockingStatus NestedDockingStatus
+        {
+            get { return m_nestedDockingStatus; }
+        }
+
+        private bool m_isFloat;
+        public bool IsFloat
+        {
+            get { return m_isFloat; }
+        }
+
+        public INestedPanesContainer NestedPanesContainer
+        {
+            get
+            {
+                if (NestedDockingStatus.NestedPanes == null)
+                    return null;
+                else
+                    return NestedDockingStatus.NestedPanes.Container;
+            }
+        }
+
+        private DockState m_dockState = DockState.Unknown;
+        public DockState DockState
+        {
+            get { return m_dockState; }
+            set
+            {
+                SetDockState(value);
+            }
+        }
+
+        public DockPane SetDockState(DockState value)
+        {
+            if (value == DockState.Unknown || value == DockState.Hidden)
+                throw new InvalidOperationException(Strings.DockPane_SetDockState_InvalidState);
+
+            if ((value == DockState.Float) == this.IsFloat)
+            {
+                InternalSetDockState(value);
+                return this;
+            }
+
+            if (DisplayingContents.Count == 0)
+                return null;
+
+            IDockContent firstContent = null;
+            for (int i = 0; i < DisplayingContents.Count; i++)
+            {
+                IDockContent content = DisplayingContents[i];
+                if (content.DockHandler.IsDockStateValid(value))
+                {
+                    firstContent = content;
+                    break;
+                }
+            }
+            if (firstContent == null)
+                return null;
+
+            firstContent.DockHandler.DockState = value;
+            DockPane pane = firstContent.DockHandler.Pane;
+            DockPanel.SuspendLayout(true);
+            for (int i = 0; i < DisplayingContents.Count; i++)
+            {
+                IDockContent content = DisplayingContents[i];
+                if (content.DockHandler.IsDockStateValid(value))
+                    content.DockHandler.Pane = pane;
+            }
+            DockPanel.ResumeLayout(true, true);
+            return pane;
+        }
+
+        private void InternalSetDockState(DockState value)
+        {
+            if (m_dockState == value)
+                return;
+
+            DockState oldDockState = m_dockState;
+            INestedPanesContainer oldContainer = NestedPanesContainer;
+
+            m_dockState = value;
+
+            SuspendRefreshStateChange();
+
+            IDockContent contentFocused = GetFocusedContent();
+            if (contentFocused != null)
+                DockPanel.SaveFocus();
+
+            if (!IsFloat)
+                DockWindow = DockPanel.DockWindows[DockState];
+            else if (FloatWindow == null)
+                FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this);
+
+            if (contentFocused != null)
+                if (!Win32Helper.IsRunningOnMono())
+                DockPanel.ContentFocusManager.Activate(contentFocused);
+
+            ResumeRefreshStateChange(oldContainer, oldDockState);
+        }
+
+        private int m_countRefreshStateChange = 0;
+        private void SuspendRefreshStateChange()
+        {
+            m_countRefreshStateChange++;
+            DockPanel.SuspendLayout(true);
+        }
+
+        private void ResumeRefreshStateChange()
+        {
+            m_countRefreshStateChange--;
+            System.Diagnostics.Debug.Assert(m_countRefreshStateChange >= 0);
+            DockPanel.ResumeLayout(true, true);
+        }
+
+        private bool IsRefreshStateChangeSuspended
+        {
+            get { return m_countRefreshStateChange != 0; }
+        }
+
+        private void ResumeRefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
+        {
+            ResumeRefreshStateChange();
+            RefreshStateChange(oldContainer, oldDockState);
+        }
+
+        private void RefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
+        {
+            lock (this)
+            {
+                if (IsRefreshStateChangeSuspended)
+                    return;
+
+                SuspendRefreshStateChange();
+            }
+
+            DockPanel.SuspendLayout(true);
+
+            IDockContent contentFocused = GetFocusedContent();
+            if (contentFocused != null)
+                DockPanel.SaveFocus();
+            SetParent();
+
+            if (ActiveContent != null)
+                ActiveContent.DockHandler.SetDockState(ActiveContent.DockHandler.IsHidden, DockState, ActiveContent.DockHandler.Pane);
+            foreach (IDockContent content in Contents)
+            {
+                if (content.DockHandler.Pane == this)
+                    content.DockHandler.SetDockState(content.DockHandler.IsHidden, DockState, content.DockHandler.Pane);
+            }
+
+            if (oldContainer != null)
+            {
+                Control oldContainerControl = (Control)oldContainer;
+                if (oldContainer.DockState == oldDockState && !oldContainerControl.IsDisposed)
+                    oldContainerControl.PerformLayout();
+            }
+            if (DockHelper.IsDockStateAutoHide(oldDockState))
+                DockPanel.RefreshActiveAutoHideContent();
+
+            if (NestedPanesContainer.DockState == DockState)
+                ((Control)NestedPanesContainer).PerformLayout();
+            if (DockHelper.IsDockStateAutoHide(DockState))
+                DockPanel.RefreshActiveAutoHideContent();
+
+            if (DockHelper.IsDockStateAutoHide(oldDockState) ||
+                DockHelper.IsDockStateAutoHide(DockState))
+            {
+                DockPanel.RefreshAutoHideStrip();
+                DockPanel.PerformLayout();
+            }
+
+            ResumeRefreshStateChange();
+
+            if (contentFocused != null)
+                contentFocused.DockHandler.Activate();
+
+            DockPanel.ResumeLayout(true, true);
+
+            if (oldDockState != DockState)
+                OnDockStateChanged(EventArgs.Empty);
+        }
+
+        private IDockContent GetFocusedContent()
+        {
+            IDockContent contentFocused = null;
+            foreach (IDockContent content in Contents)
+            {
+                if (content.DockHandler.Form.ContainsFocus)
+                {
+                    contentFocused = content;
+                    break;
+                }
+            }
+
+            return contentFocused;
+        }
+
+        public DockPane DockTo(INestedPanesContainer container)
+        {
+            if (container == null)
+                throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);
+
+            DockAlignment alignment;
+            if (container.DockState == DockState.DockLeft || container.DockState == DockState.DockRight)
+                alignment = DockAlignment.Bottom;
+            else
+                alignment = DockAlignment.Right;
+
+            return DockTo(container, container.NestedPanes.GetDefaultPreviousPane(this), alignment, 0.5);
+        }
+
+        public DockPane DockTo(INestedPanesContainer container, DockPane previousPane, DockAlignment alignment, double proportion)
+        {
+            if (container == null)
+                throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);
+
+            if (container.IsFloat == this.IsFloat)
+            {
+                InternalAddToDockList(container, previousPane, alignment, proportion);
+                return this;
+            }
+
+            IDockContent firstContent = GetFirstContent(container.DockState);
+            if (firstContent == null)
+                return null;
+
+            DockPane pane;
+            DockPanel.DummyContent.DockPanel = DockPanel;
+            if (container.IsFloat)
+                pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, (FloatWindow)container, true);
+            else
+                pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, container.DockState, true);
+
+            pane.DockTo(container, previousPane, alignment, proportion);
+            SetVisibleContentsToPane(pane);
+            DockPanel.DummyContent.DockPanel = null;
+
+            return pane;
+        }
+
+        private void SetVisibleContentsToPane(DockPane pane)
+        {
+            SetVisibleContentsToPane(pane, ActiveContent);
+        }
+
+        private void SetVisibleContentsToPane(DockPane pane, IDockContent activeContent)
+        {
+            for (int i = 0; i < DisplayingContents.Count; i++)
+            {
+                IDockContent content = DisplayingContents[i];
+                if (content.DockHandler.IsDockStateValid(pane.DockState))
+                {
+                    content.DockHandler.Pane = pane;
+                    i--;
+                }
+            }
+
+            if (activeContent.DockHandler.Pane == pane)
+                pane.ActiveContent = activeContent;
+        }
+
+        private void InternalAddToDockList(INestedPanesContainer container, DockPane prevPane, DockAlignment alignment, double proportion)
+        {
+            if ((container.DockState == DockState.Float) != IsFloat)
+                throw new InvalidOperationException(Strings.DockPane_DockTo_InvalidContainer);
+
+            int count = container.NestedPanes.Count;
+            if (container.NestedPanes.Contains(this))
+                count--;
+            if (prevPane == null && count > 0)
+                throw new InvalidOperationException(Strings.DockPane_DockTo_NullPrevPane);
+
+            if (prevPane != null && !container.NestedPanes.Contains(prevPane))
+                throw new InvalidOperationException(Strings.DockPane_DockTo_NoPrevPane);
+
+            if (prevPane == this)
+                throw new InvalidOperationException(Strings.DockPane_DockTo_SelfPrevPane);
+
+            INestedPanesContainer oldContainer = NestedPanesContainer;
+            DockState oldDockState = DockState;
+            container.NestedPanes.Add(this);
+            NestedDockingStatus.SetStatus(container.NestedPanes, prevPane, alignment, proportion);
+
+            if (DockHelper.IsDockWindowState(DockState))
+                m_dockState = container.DockState;
+
+            RefreshStateChange(oldContainer, oldDockState);
+        }
+
+        public void SetNestedDockingProportion(double proportion)
+        {
+            NestedDockingStatus.SetStatus(NestedDockingStatus.NestedPanes, NestedDockingStatus.PreviousPane, NestedDockingStatus.Alignment, proportion);
+            if (NestedPanesContainer != null)
+                ((Control)NestedPanesContainer).PerformLayout();
+        }
+
+        public DockPane Float()
+        {
+            DockPanel.SuspendLayout(true);
+
+            IDockContent activeContent = ActiveContent;
+
+            DockPane floatPane = GetFloatPaneFromContents();
+            if (floatPane == null)
+            {
+                IDockContent firstContent = GetFirstContent(DockState.Float);
+                if (firstContent == null)
+                {
+                    DockPanel.ResumeLayout(true, true);
+                    return null;
+                }
+                floatPane = DockPanel.DockPaneFactory.CreateDockPane(firstContent, DockState.Float, true);
+            }
+            SetVisibleContentsToPane(floatPane, activeContent);
+
+            DockPanel.ResumeLayout(true, true);
+            return floatPane;
+        }
+
+        private DockPane GetFloatPaneFromContents()
+        {
+            DockPane floatPane = null;
+            for (int i = 0; i < DisplayingContents.Count; i++)
+            {
+                IDockContent content = DisplayingContents[i];
+                if (!content.DockHandler.IsDockStateValid(DockState.Float))
+                    continue;
+
+                if (floatPane != null && content.DockHandler.FloatPane != floatPane)
+                    return null;
+                else
+                    floatPane = content.DockHandler.FloatPane;
+            }
+
+            return floatPane;
+        }
+
+        private IDockContent GetFirstContent(DockState dockState)
+        {
+            for (int i = 0; i < DisplayingContents.Count; i++)
+            {
+                IDockContent content = DisplayingContents[i];
+                if (content.DockHandler.IsDockStateValid(dockState))
+                    return content;
+            }
+            return null;
+        }
+
+        public void RestoreToPanel()
+        {
+            DockPanel.SuspendLayout(true);
+
+            IDockContent activeContent = DockPanel.ActiveContent;
+
+            for (int i = DisplayingContents.Count - 1; i >= 0; i--)
+            {
+                IDockContent content = DisplayingContents[i];
+                if (content.DockHandler.CheckDockState(false) != DockState.Unknown)
+                    content.DockHandler.IsFloat = false;
+            }
+
+            DockPanel.ResumeLayout(true, true);
+        }
+
+        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+        protected override void WndProc(ref Message m)
+        {
+            if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE)
+                Activate();
+
+            base.WndProc(ref m);
+        }
+
+        #region IDockDragSource Members
+
+        #region IDragSource Members
+
+        Control IDragSource.DragControl
+        {
+            get { return this; }
+        }
+
+        #endregion
+
+        bool IDockDragSource.IsDockStateValid(DockState dockState)
+        {
+            return IsDockStateValid(dockState);
+        }
+
+        bool IDockDragSource.CanDockTo(DockPane pane)
+        {
+            if (!IsDockStateValid(pane.DockState))
+                return false;
+
+            if (pane == this)
+                return false;
+
+            return true;
+        }
+
+        Rectangle IDockDragSource.BeginDrag(Point ptMouse)
+        {
+            Point location = PointToScreen(new Point(0, 0));
+            Size size;
+
+            DockPane floatPane = ActiveContent.DockHandler.FloatPane;
+            if (DockState == DockState.Float || floatPane == null || floatPane.FloatWindow.NestedPanes.Count != 1)
+                size = DockPanel.DefaultFloatWindowSize;
+            else
+                size = floatPane.FloatWindow.Size;
+
+            if (ptMouse.X > location.X + size.Width)
+                location.X += ptMouse.X - (location.X + size.Width) + Measures.SplitterSize;
+
+            return new Rectangle(location, size);
+        }
+
+        public void FloatAt(Rectangle floatWindowBounds)
+        {
+            if (FloatWindow == null || FloatWindow.NestedPanes.Count != 1)
+                FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
+            else
+                FloatWindow.Bounds = floatWindowBounds;
+
+            DockState = DockState.Float;
+
+            NestedDockingStatus.NestedPanes.Remove(this);
+        }
+
+        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
+        {
+            if (dockStyle == DockStyle.Fill)
+            {
+                IDockContent activeContent = ActiveContent;
+                for (int i = Contents.Count - 1; i >= 0; i--)
+                {
+                    IDockContent c = Contents[i];
+                    if (c.DockHandler.DockState == DockState)
+                    {
+                        c.DockHandler.Pane = pane;
+                        if (contentIndex != -1)
+                            pane.SetContentIndex(c, contentIndex);
+                    }
+                }
+                pane.ActiveContent = activeContent;
+            }
+            else
+            {
+                if (dockStyle == DockStyle.Left)
+                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Left, 0.5);
+                else if (dockStyle == DockStyle.Right)
+                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Right, 0.5);
+                else if (dockStyle == DockStyle.Top)
+                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Top, 0.5);
+                else if (dockStyle == DockStyle.Bottom)
+                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Bottom, 0.5);
+
+                DockState = pane.DockState;
+            }
+        }
+
+        public void DockTo(DockPanel panel, DockStyle dockStyle)
+        {
+            if (panel != DockPanel)
+                throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
+
+            if (dockStyle == DockStyle.Top)
+                DockState = DockState.DockTop;
+            else if (dockStyle == DockStyle.Bottom)
+                DockState = DockState.DockBottom;
+            else if (dockStyle == DockStyle.Left)
+                DockState = DockState.DockLeft;
+            else if (dockStyle == DockStyle.Right)
+                DockState = DockState.DockRight;
+            else if (dockStyle == DockStyle.Fill)
+                DockState = DockState.Document;
+        }
+
+        #endregion
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCaptionBase.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCaptionBase.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCaptionBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,100 @@
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public abstract class DockPaneCaptionBase : Control
+	{
+		protected internal DockPaneCaptionBase(DockPane pane)
+		{
+			m_dockPane = pane;
+
+			SetStyle(ControlStyles.OptimizedDoubleBuffer |
+                ControlStyles.ResizeRedraw |
+                ControlStyles.UserPaint |
+                ControlStyles.AllPaintingInWmPaint, true);
+			SetStyle(ControlStyles.Selectable, false);
+		}
+
+		private DockPane m_dockPane;
+		protected DockPane DockPane
+		{
+			get	{	return m_dockPane;	}
+		}
+
+		protected DockPane.AppearanceStyle Appearance
+		{
+			get	{	return DockPane.Appearance;	}
+		}
+
+        protected bool HasTabPageContextMenu
+        {
+            get { return DockPane.HasTabPageContextMenu; }
+        }
+
+        protected void ShowTabPageContextMenu(Point position)
+        {
+            DockPane.ShowTabPageContextMenu(this, position);
+        }
+
+        protected override void OnMouseUp(MouseEventArgs e)
+        {
+            base.OnMouseUp(e);
+
+            if (e.Button == MouseButtons.Right)
+                ShowTabPageContextMenu(new Point(e.X, e.Y));
+        }
+
+        protected override void OnMouseDown(MouseEventArgs e)
+        {
+            base.OnMouseDown(e);
+
+            if (e.Button == MouseButtons.Left &&
+			    DockPane.DockPanel.AllowEndUserDocking &&
+                DockPane.AllowDockDragAndDrop &&
+				!DockHelper.IsDockStateAutoHide(DockPane.DockState) &&
+                DockPane.ActiveContent != null)
+				DockPane.DockPanel.BeginDrag(DockPane);
+        }
+
+        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]         
+        protected override void WndProc(ref Message m)
+        {
+            if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
+            {
+                if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
+                {
+                    DockPane.DockPanel.ActiveAutoHideContent = null;
+                    return;
+                }
+
+                if (DockPane.IsFloat)
+                    DockPane.RestoreToPanel();
+                else
+                    DockPane.Float();
+            }
+            base.WndProc(ref m);
+        }
+
+		internal void RefreshChanges()
+		{
+            if (IsDisposed)
+                return;
+
+			OnRefreshChanges();
+		}
+
+        protected virtual void OnRightToLeftLayoutChanged()
+        {
+        }
+
+		protected virtual void OnRefreshChanges()
+		{
+		}
+
+		protected internal abstract int MeasureHeight();
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCollection.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCollection.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneCollection.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public class DockPaneCollection : ReadOnlyCollection<DockPane>
+	{
+        internal DockPaneCollection()
+            : base(new List<DockPane>())
+        {
+        }
+
+		internal int Add(DockPane pane)
+		{
+			if (Items.Contains(pane))
+				return Items.IndexOf(pane);
+
+			Items.Add(pane);
+            return Count - 1;
+		}
+
+		internal void AddAt(DockPane pane, int index)
+		{
+			if (index < 0 || index > Items.Count - 1)
+				return;
+			
+			if (Contains(pane))
+				return;
+
+			Items.Insert(index, pane);
+		}
+
+		internal void Dispose()
+		{
+			for (int i=Count - 1; i>=0; i--)
+				this[i].Close();
+		}
+
+		internal void Remove(DockPane pane)
+		{
+			Items.Remove(pane);
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneStripBase.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneStripBase.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPaneStripBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,263 @@
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Permissions;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public abstract class DockPaneStripBase : Control
+	{
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]        
+        protected internal class Tab : IDisposable
+        {
+            private IDockContent m_content;
+
+            public Tab(IDockContent content)
+            {
+                m_content = content;
+            }
+
+            ~Tab()
+            {
+                Dispose(false);
+            }
+
+            public IDockContent Content
+            {
+                get { return m_content; }
+            }
+
+            public Form ContentForm
+            {
+                get { return m_content as Form; }
+            }
+
+            public void Dispose()
+            {
+                Dispose(true);
+                GC.SuppressFinalize(this);
+            }
+
+            protected virtual void Dispose(bool disposing)
+            {
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]        
+        protected sealed class TabCollection : IEnumerable<Tab>
+        {
+            #region IEnumerable Members
+            IEnumerator<Tab> IEnumerable<Tab>.GetEnumerator()
+            {
+                for (int i = 0; i < Count; i++)
+                    yield return this[i];
+            }
+
+            IEnumerator IEnumerable.GetEnumerator()
+            {
+                for (int i = 0; i < Count; i++)
+                    yield return this[i];
+            }
+            #endregion
+
+            internal TabCollection(DockPane pane)
+            {
+                m_dockPane = pane;
+            }
+
+            private DockPane m_dockPane;
+            public DockPane DockPane
+            {
+                get { return m_dockPane; }
+            }
+
+            public int Count
+            {
+                get { return DockPane.DisplayingContents.Count; }
+            }
+
+            public Tab this[int index]
+            {
+                get
+                {
+                    IDockContent content = DockPane.DisplayingContents[index];
+                    if (content == null)
+                        throw (new ArgumentOutOfRangeException("index"));
+                    return content.DockHandler.GetTab(DockPane.TabStripControl);
+                }
+            }
+
+            public bool Contains(Tab tab)
+            {
+                return (IndexOf(tab) != -1);
+            }
+
+            public bool Contains(IDockContent content)
+            {
+                return (IndexOf(content) != -1);
+            }
+
+            public int IndexOf(Tab tab)
+            {
+                if (tab == null)
+                    return -1;
+
+                return DockPane.DisplayingContents.IndexOf(tab.Content);
+            }
+
+            public int IndexOf(IDockContent content)
+            {
+                return DockPane.DisplayingContents.IndexOf(content);
+            }
+        }
+
+		protected DockPaneStripBase(DockPane pane)
+		{
+			m_dockPane = pane;
+
+			SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+			SetStyle(ControlStyles.Selectable, false);
+            AllowDrop = true;
+		}
+
+		private DockPane m_dockPane;
+		protected DockPane DockPane
+		{
+			get	{	return m_dockPane;	}
+		}
+
+		protected DockPane.AppearanceStyle Appearance
+		{
+			get	{	return DockPane.Appearance;	}
+		}
+
+        private TabCollection m_tabs = null;
+		protected TabCollection Tabs
+		{
+			get
+            {
+                if (m_tabs == null)
+                    m_tabs = new TabCollection(DockPane);
+
+                return m_tabs;
+            }
+		}
+
+		internal void RefreshChanges()
+		{
+            if (IsDisposed)
+                return;
+
+			OnRefreshChanges();
+		}
+
+		protected virtual void OnRefreshChanges()
+		{
+		}
+
+		protected internal abstract int MeasureHeight();
+
+		protected internal abstract void EnsureTabVisible(IDockContent content);
+
+		protected int HitTest()
+		{
+			return HitTest(PointToClient(Control.MousePosition));
+		}
+
+		protected internal abstract int HitTest(Point point);
+
+		protected internal abstract GraphicsPath GetOutline(int index);
+
+        protected internal virtual Tab CreateTab(IDockContent content)
+        {
+            return new Tab(content);
+        }
+
+        protected override void OnMouseDown(MouseEventArgs e)
+        {
+            base.OnMouseDown(e);
+
+            int index = HitTest();
+            if (index != -1)
+            {
+                IDockContent content = Tabs[index].Content;
+                if (DockPane.ActiveContent != content)
+                    DockPane.ActiveContent = content;
+            }
+
+            if (e.Button == MouseButtons.Left)
+            {
+                if (DockPane.DockPanel.AllowEndUserDocking && DockPane.AllowDockDragAndDrop && DockPane.ActiveContent.DockHandler.AllowEndUserDocking)
+                    DockPane.DockPanel.BeginDrag(DockPane.ActiveContent.DockHandler);
+            }
+        }
+
+        protected bool HasTabPageContextMenu
+        {
+            get { return DockPane.HasTabPageContextMenu; }
+        }
+
+        protected void ShowTabPageContextMenu(Point position)
+        {
+            DockPane.ShowTabPageContextMenu(this, position);
+        }
+
+        protected override void OnMouseUp(MouseEventArgs e)
+        {
+            base.OnMouseUp(e);
+
+            if (e.Button == MouseButtons.Right)
+                ShowTabPageContextMenu(new Point(e.X, e.Y));
+            else if ((e.Button == MouseButtons.Middle) && (DockPane.Appearance == Docking.DockPane.AppearanceStyle.Document))
+            {
+                // Get the content located under the click (if there is one)
+                int index = HitTest();
+                if (index != -1)
+                {
+                    // Close the specified content.
+                    IDockContent content = Tabs[index].Content;
+                    DockPane.CloseContent(content);
+                }
+            }
+        }
+
+        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+		protected override void WndProc(ref Message m)
+		{
+			if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
+			{
+				base.WndProc(ref m);
+
+				int index = HitTest();
+				if (DockPane.DockPanel.AllowEndUserDocking && index != -1)
+				{
+					IDockContent content = Tabs[index].Content;
+                    if (content.DockHandler.CheckDockState(!content.DockHandler.IsFloat) != DockState.Unknown)
+					    content.DockHandler.IsFloat = !content.DockHandler.IsFloat;	
+				}
+
+				return;
+			}
+
+			base.WndProc(ref m);
+			return;
+		}
+
+        protected override void OnDragOver(DragEventArgs drgevent)
+        {
+            base.OnDragOver(drgevent);
+
+            int index = HitTest();
+            if (index != -1)
+            {
+                IDockContent content = Tabs[index].Content;
+                if (DockPane.ActiveContent != content)
+                    DockPane.ActiveContent = content;
+            }
+        }
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.AutoHideWindow.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.AutoHideWindow.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.AutoHideWindow.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,613 @@
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Runtime.InteropServices;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    partial class DockPanel
+    {
+        private class AutoHideWindowControl : Panel, ISplitterDragSource
+        {
+            private class SplitterControl : SplitterBase
+            {
+                public SplitterControl(AutoHideWindowControl autoHideWindow)
+                {
+                    m_autoHideWindow = autoHideWindow;
+                }
+
+                private AutoHideWindowControl m_autoHideWindow;
+                private AutoHideWindowControl AutoHideWindow
+                {
+                    get { return m_autoHideWindow; }
+                }
+
+                protected override int SplitterSize
+                {
+                    get { return Measures.SplitterSize; }
+                }
+
+                protected override void StartDrag()
+                {
+        			AutoHideWindow.DockPanel.BeginDrag(AutoHideWindow, AutoHideWindow.RectangleToScreen(Bounds));
+                }
+            }
+
+            #region consts
+            private const int ANIMATE_TIME = 100;	// in mini-seconds
+            #endregion
+
+            private Timer m_timerMouseTrack;
+            private SplitterControl m_splitter;
+
+            public AutoHideWindowControl(DockPanel dockPanel)
+            {
+                m_dockPanel = dockPanel;
+
+                m_timerMouseTrack = new Timer();
+                m_timerMouseTrack.Tick += new EventHandler(TimerMouseTrack_Tick);
+
+                Visible = false;
+                m_splitter = new SplitterControl(this);
+                Controls.Add(m_splitter);
+            }
+
+            protected override void Dispose(bool disposing)
+            {
+                if (disposing)
+                {
+                    m_timerMouseTrack.Dispose();
+                }
+                base.Dispose(disposing);
+            }
+
+            private DockPanel m_dockPanel = null;
+            public DockPanel DockPanel
+            {
+                get { return m_dockPanel; }
+            }
+
+            private DockPane m_activePane = null;
+            public DockPane ActivePane
+            {
+                get { return m_activePane; }
+            }
+            private void SetActivePane()
+            {
+                DockPane value = (ActiveContent == null ? null : ActiveContent.DockHandler.Pane);
+
+                if (value == m_activePane)
+                    return;
+
+                m_activePane = value;
+            }
+
+            private IDockContent m_activeContent = null;
+            public IDockContent ActiveContent
+            {
+                get { return m_activeContent; }
+                set
+                {
+                    if (value == m_activeContent)
+                        return;
+
+                    if (value != null)
+                    {
+                        if (!DockHelper.IsDockStateAutoHide(value.DockHandler.DockState) || value.DockHandler.DockPanel != DockPanel)
+                            throw (new InvalidOperationException(Strings.DockPanel_ActiveAutoHideContent_InvalidValue));
+                    }
+
+                    DockPanel.SuspendLayout();
+
+                    if (m_activeContent != null)
+                    {
+                        if (m_activeContent.DockHandler.Form.ContainsFocus)
+                            if (!Win32Helper.IsRunningOnMono())
+                            DockPanel.ContentFocusManager.GiveUpFocus(m_activeContent);
+                        AnimateWindow(false);
+                    }
+
+                    m_activeContent = value;
+                    SetActivePane();
+                    if (ActivePane != null)
+                        ActivePane.ActiveContent = m_activeContent;
+
+                    if (m_activeContent != null)
+                        AnimateWindow(true);
+
+                    DockPanel.ResumeLayout();
+                    DockPanel.RefreshAutoHideStrip();
+
+                    SetTimerMouseTrack();
+                }
+            }
+
+            public DockState DockState
+            {
+                get { return ActiveContent == null ? DockState.Unknown : ActiveContent.DockHandler.DockState; }
+            }
+
+            private bool m_flagAnimate = true;
+            private bool FlagAnimate
+            {
+                get { return m_flagAnimate; }
+                set { m_flagAnimate = value; }
+            }
+
+            private bool m_flagDragging = false;
+            internal bool FlagDragging
+            {
+                get { return m_flagDragging; }
+                set
+                {
+                    if (m_flagDragging == value)
+                        return;
+
+                    m_flagDragging = value;
+                    SetTimerMouseTrack();
+                }
+            }
+
+            private void AnimateWindow(bool show)
+            {
+                if (!FlagAnimate && Visible != show)
+                {
+                    Visible = show;
+                    return;
+                }
+
+                Parent.SuspendLayout();
+
+                Rectangle rectSource = GetRectangle(!show);
+                Rectangle rectTarget = GetRectangle(show);
+                int dxLoc, dyLoc;
+                int dWidth, dHeight;
+                dxLoc = dyLoc = dWidth = dHeight = 0;
+                if (DockState == DockState.DockTopAutoHide)
+                    dHeight = show ? 1 : -1;
+                else if (DockState == DockState.DockLeftAutoHide)
+                    dWidth = show ? 1 : -1;
+                else if (DockState == DockState.DockRightAutoHide)
+                {
+                    dxLoc = show ? -1 : 1;
+                    dWidth = show ? 1 : -1;
+                }
+                else if (DockState == DockState.DockBottomAutoHide)
+                {
+                    dyLoc = (show ? -1 : 1);
+                    dHeight = (show ? 1 : -1);
+                }
+
+                if (show)
+                {
+                    Bounds = DockPanel.GetAutoHideWindowBounds(new Rectangle(-rectTarget.Width, -rectTarget.Height, rectTarget.Width, rectTarget.Height));
+                    if (Visible == false)
+                        Visible = true;
+                    PerformLayout();
+                }
+
+                SuspendLayout();
+
+                LayoutAnimateWindow(rectSource);
+                if (Visible == false)
+                    Visible = true;
+
+                int speedFactor = 1;
+                int totalPixels = (rectSource.Width != rectTarget.Width) ?
+                    Math.Abs(rectSource.Width - rectTarget.Width) :
+                    Math.Abs(rectSource.Height - rectTarget.Height);
+                int remainPixels = totalPixels;
+                DateTime startingTime = DateTime.Now;
+                while (rectSource != rectTarget)
+                {
+                    DateTime startPerMove = DateTime.Now;
+
+                    rectSource.X += dxLoc * speedFactor;
+                    rectSource.Y += dyLoc * speedFactor;
+                    rectSource.Width += dWidth * speedFactor;
+                    rectSource.Height += dHeight * speedFactor;
+                    if (Math.Sign(rectTarget.X - rectSource.X) != Math.Sign(dxLoc))
+                        rectSource.X = rectTarget.X;
+                    if (Math.Sign(rectTarget.Y - rectSource.Y) != Math.Sign(dyLoc))
+                        rectSource.Y = rectTarget.Y;
+                    if (Math.Sign(rectTarget.Width - rectSource.Width) != Math.Sign(dWidth))
+                        rectSource.Width = rectTarget.Width;
+                    if (Math.Sign(rectTarget.Height - rectSource.Height) != Math.Sign(dHeight))
+                        rectSource.Height = rectTarget.Height;
+
+                    LayoutAnimateWindow(rectSource);
+                    if (Parent != null)
+                        Parent.Update();
+
+                    remainPixels -= speedFactor;
+
+                    while (true)
+                    {
+                        TimeSpan time = new TimeSpan(0, 0, 0, 0, ANIMATE_TIME);
+                        TimeSpan elapsedPerMove = DateTime.Now - startPerMove;
+                        TimeSpan elapsedTime = DateTime.Now - startingTime;
+                        if (((int)((time - elapsedTime).TotalMilliseconds)) <= 0)
+                        {
+                            speedFactor = remainPixels;
+                            break;
+                        }
+                        else
+                            speedFactor = remainPixels * (int)elapsedPerMove.TotalMilliseconds / (int)((time - elapsedTime).TotalMilliseconds);
+                        if (speedFactor >= 1)
+                            break;
+                    }
+                }
+                ResumeLayout();
+                Parent.ResumeLayout();
+            }
+
+            private void LayoutAnimateWindow(Rectangle rect)
+            {
+                Bounds = DockPanel.GetAutoHideWindowBounds(rect);
+
+                Rectangle rectClient = ClientRectangle;
+
+                if (DockState == DockState.DockLeftAutoHide)
+                    ActivePane.Location = new Point(rectClient.Right - 2 - Measures.SplitterSize - ActivePane.Width, ActivePane.Location.Y);
+                else if (DockState == DockState.DockTopAutoHide)
+                    ActivePane.Location = new Point(ActivePane.Location.X, rectClient.Bottom - 2 - Measures.SplitterSize - ActivePane.Height);
+            }
+
+            private Rectangle GetRectangle(bool show)
+            {
+                if (DockState == DockState.Unknown)
+                    return Rectangle.Empty;
+
+                Rectangle rect = DockPanel.AutoHideWindowRectangle;
+
+                if (show)
+                    return rect;
+
+                if (DockState == DockState.DockLeftAutoHide)
+                    rect.Width = 0;
+                else if (DockState == DockState.DockRightAutoHide)
+                {
+                    rect.X += rect.Width;
+                    rect.Width = 0;
+                }
+                else if (DockState == DockState.DockTopAutoHide)
+                    rect.Height = 0;
+                else
+                {
+                    rect.Y += rect.Height;
+                    rect.Height = 0;
+                }
+
+                return rect;
+            }
+
+            private void SetTimerMouseTrack()
+            {
+                if (ActivePane == null || ActivePane.IsActivated || FlagDragging)
+                {
+                    m_timerMouseTrack.Enabled = false;
+                    return;
+                }
+
+                // start the timer
+                int hovertime = SystemInformation.MouseHoverTime ;
+
+                // assign a default value 400 in case of setting Timer.Interval invalid value exception
+                if (hovertime <= 0)
+                    hovertime = 400;
+
+                m_timerMouseTrack.Interval = 2 * (int)hovertime;
+                m_timerMouseTrack.Enabled = true;
+            }
+
+            protected virtual Rectangle DisplayingRectangle
+            {
+                get
+                {
+                    Rectangle rect = ClientRectangle;
+
+                    // exclude the border and the splitter
+                    if (DockState == DockState.DockBottomAutoHide)
+                    {
+                        rect.Y += 2 + Measures.SplitterSize;
+                        rect.Height -= 2 + Measures.SplitterSize;
+                    }
+                    else if (DockState == DockState.DockRightAutoHide)
+                    {
+                        rect.X += 2 + Measures.SplitterSize;
+                        rect.Width -= 2 + Measures.SplitterSize;
+                    }
+                    else if (DockState == DockState.DockTopAutoHide)
+                        rect.Height -= 2 + Measures.SplitterSize;
+                    else if (DockState == DockState.DockLeftAutoHide)
+                        rect.Width -= 2 + Measures.SplitterSize;
+
+                    return rect;
+                }
+            }
+
+            protected override void OnLayout(LayoutEventArgs levent)
+            {
+                DockPadding.All = 0;
+                if (DockState == DockState.DockLeftAutoHide)
+                {
+                    DockPadding.Right = 2;
+                    m_splitter.Dock = DockStyle.Right;
+                }
+                else if (DockState == DockState.DockRightAutoHide)
+                {
+                    DockPadding.Left = 2;
+                    m_splitter.Dock = DockStyle.Left;
+                }
+                else if (DockState == DockState.DockTopAutoHide)
+                {
+                    DockPadding.Bottom = 2;
+                    m_splitter.Dock = DockStyle.Bottom;
+                }
+                else if (DockState == DockState.DockBottomAutoHide)
+                {
+                    DockPadding.Top = 2;
+                    m_splitter.Dock = DockStyle.Top;
+                }
+
+                Rectangle rectDisplaying = DisplayingRectangle;
+                Rectangle rectHidden = new Rectangle(-rectDisplaying.Width, rectDisplaying.Y, rectDisplaying.Width, rectDisplaying.Height);
+                foreach (Control c in Controls)
+                {
+                    DockPane pane = c as DockPane;
+                    if (pane == null)
+                        continue;
+                    
+                    
+                    if (pane == ActivePane)
+                        pane.Bounds = rectDisplaying;
+                    else
+                        pane.Bounds = rectHidden;
+                }
+
+                base.OnLayout(levent);
+            }
+
+            protected override void OnPaint(PaintEventArgs e)
+            {
+                // Draw the border
+                Graphics g = e.Graphics;
+
+                if (DockState == DockState.DockBottomAutoHide)
+                    g.DrawLine(SystemPens.ControlLightLight, 0, 1, ClientRectangle.Right, 1);
+                else if (DockState == DockState.DockRightAutoHide)
+                    g.DrawLine(SystemPens.ControlLightLight, 1, 0, 1, ClientRectangle.Bottom);
+                else if (DockState == DockState.DockTopAutoHide)
+                {
+                    g.DrawLine(SystemPens.ControlDark, 0, ClientRectangle.Height - 2, ClientRectangle.Right, ClientRectangle.Height - 2);
+                    g.DrawLine(SystemPens.ControlDarkDark, 0, ClientRectangle.Height - 1, ClientRectangle.Right, ClientRectangle.Height - 1);
+                }
+                else if (DockState == DockState.DockLeftAutoHide)
+                {
+                    g.DrawLine(SystemPens.ControlDark, ClientRectangle.Width - 2, 0, ClientRectangle.Width - 2, ClientRectangle.Bottom);
+                    g.DrawLine(SystemPens.ControlDarkDark, ClientRectangle.Width - 1, 0, ClientRectangle.Width - 1, ClientRectangle.Bottom);
+                }
+
+                base.OnPaint(e);
+            }
+
+            public void RefreshActiveContent()
+            {
+                if (ActiveContent == null)
+                    return;
+
+                if (!DockHelper.IsDockStateAutoHide(ActiveContent.DockHandler.DockState))
+                {
+                    FlagAnimate = false;
+                    ActiveContent = null;
+                    FlagAnimate = true;
+                }
+            }
+
+            public void RefreshActivePane()
+            {
+                SetTimerMouseTrack();
+            }
+
+            private void TimerMouseTrack_Tick(object sender, EventArgs e)
+            {
+                if (IsDisposed)
+                    return;
+
+                if (ActivePane == null || ActivePane.IsActivated)
+                {
+                    m_timerMouseTrack.Enabled = false;
+                    return;
+                }
+
+                DockPane pane = ActivePane;
+                Point ptMouseInAutoHideWindow = PointToClient(Control.MousePosition);
+                Point ptMouseInDockPanel = DockPanel.PointToClient(Control.MousePosition);
+
+                Rectangle rectTabStrip = DockPanel.GetTabStripRectangle(pane.DockState);
+
+                if (!ClientRectangle.Contains(ptMouseInAutoHideWindow) && !rectTabStrip.Contains(ptMouseInDockPanel))
+                {
+                    ActiveContent = null;
+                    m_timerMouseTrack.Enabled = false;
+                }
+            }
+
+            #region ISplitterDragSource Members
+
+            void ISplitterDragSource.BeginDrag(Rectangle rectSplitter)
+            {
+                FlagDragging = true;
+            }
+
+            void ISplitterDragSource.EndDrag()
+            {
+                FlagDragging = false;
+            }
+
+            bool ISplitterDragSource.IsVertical
+            {
+                get { return (DockState == DockState.DockLeftAutoHide || DockState == DockState.DockRightAutoHide); }
+            }
+
+            Rectangle ISplitterDragSource.DragLimitBounds
+            {
+                get
+                {
+                    Rectangle rectLimit = DockPanel.DockArea;
+
+                    if ((this as ISplitterDragSource).IsVertical)
+                    {
+                        rectLimit.X += MeasurePane.MinSize;
+                        rectLimit.Width -= 2 * MeasurePane.MinSize;
+                    }
+                    else
+                    {
+                        rectLimit.Y += MeasurePane.MinSize;
+                        rectLimit.Height -= 2 * MeasurePane.MinSize;
+                    }
+
+                    return DockPanel.RectangleToScreen(rectLimit);
+                }
+            }
+
+            void ISplitterDragSource.MoveSplitter(int offset)
+            {
+                Rectangle rectDockArea = DockPanel.DockArea;
+                IDockContent content = ActiveContent;
+                if (DockState == DockState.DockLeftAutoHide && rectDockArea.Width > 0)
+                {
+                    if (content.DockHandler.AutoHidePortion < 1)
+                        content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Width;
+                    else
+                        content.DockHandler.AutoHidePortion = Width + offset;
+                }
+                else if (DockState == DockState.DockRightAutoHide && rectDockArea.Width > 0)
+                {
+                    if (content.DockHandler.AutoHidePortion < 1)
+                        content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Width;
+                    else
+                        content.DockHandler.AutoHidePortion = Width - offset;
+                }
+                else if (DockState == DockState.DockBottomAutoHide && rectDockArea.Height > 0)
+                {
+                    if (content.DockHandler.AutoHidePortion < 1)
+                        content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Height;
+                    else
+                        content.DockHandler.AutoHidePortion = Height - offset;
+                }
+                else if (DockState == DockState.DockTopAutoHide && rectDockArea.Height > 0)
+                {
+                    if (content.DockHandler.AutoHidePortion < 1)
+                        content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Height;
+                    else
+                        content.DockHandler.AutoHidePortion = Height + offset;
+                }
+            }
+
+            #region IDragSource Members
+
+            Control IDragSource.DragControl
+            {
+                get { return this; }
+            }
+
+            #endregion
+
+            #endregion
+        }
+
+        private AutoHideWindowControl AutoHideWindow
+        {
+            get { return m_autoHideWindow; }
+        }
+
+        internal Control AutoHideControl
+        {
+            get { return m_autoHideWindow; }
+        }
+
+        internal void RefreshActiveAutoHideContent()
+        {
+            AutoHideWindow.RefreshActiveContent();
+        }
+
+        internal Rectangle AutoHideWindowRectangle
+        {
+            get
+            {
+                DockState state = AutoHideWindow.DockState;
+                Rectangle rectDockArea = DockArea;
+                if (ActiveAutoHideContent == null)
+                    return Rectangle.Empty;
+
+                if (Parent == null)
+                    return Rectangle.Empty;
+
+                Rectangle rect = Rectangle.Empty;
+                double autoHideSize = ActiveAutoHideContent.DockHandler.AutoHidePortion;
+                if (state == DockState.DockLeftAutoHide)
+                {
+                    if (autoHideSize < 1)
+                        autoHideSize = rectDockArea.Width * autoHideSize;
+                    if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
+                        autoHideSize = rectDockArea.Width - MeasurePane.MinSize;
+                    rect.X = rectDockArea.X;
+                    rect.Y = rectDockArea.Y;
+                    rect.Width = (int)autoHideSize;
+                    rect.Height = rectDockArea.Height;
+                }
+                else if (state == DockState.DockRightAutoHide)
+                {
+                    if (autoHideSize < 1)
+                        autoHideSize = rectDockArea.Width * autoHideSize;
+                    if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
+                        autoHideSize = rectDockArea.Width - MeasurePane.MinSize;
+                    rect.X = rectDockArea.X + rectDockArea.Width - (int)autoHideSize;
+                    rect.Y = rectDockArea.Y;
+                    rect.Width = (int)autoHideSize;
+                    rect.Height = rectDockArea.Height;
+                }
+                else if (state == DockState.DockTopAutoHide)
+                {
+                    if (autoHideSize < 1)
+                        autoHideSize = rectDockArea.Height * autoHideSize;
+                    if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
+                        autoHideSize = rectDockArea.Height - MeasurePane.MinSize;
+                    rect.X = rectDockArea.X;
+                    rect.Y = rectDockArea.Y;
+                    rect.Width = rectDockArea.Width;
+                    rect.Height = (int)autoHideSize;
+                }
+                else if (state == DockState.DockBottomAutoHide)
+                {
+                    if (autoHideSize < 1)
+                        autoHideSize = rectDockArea.Height * autoHideSize;
+                    if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
+                        autoHideSize = rectDockArea.Height - MeasurePane.MinSize;
+                    rect.X = rectDockArea.X;
+                    rect.Y = rectDockArea.Y + rectDockArea.Height - (int)autoHideSize;
+                    rect.Width = rectDockArea.Width;
+                    rect.Height = (int)autoHideSize;
+                }
+
+                return rect;
+            }
+        }
+
+        internal Rectangle GetAutoHideWindowBounds(Rectangle rectAutoHideWindow)
+        {
+            if (DocumentStyle == DocumentStyle.SystemMdi ||
+                DocumentStyle == DocumentStyle.DockingMdi)
+                return (Parent == null) ? Rectangle.Empty : Parent.RectangleToClient(RectangleToScreen(rectAutoHideWindow));
+            else
+                return rectAutoHideWindow;
+        }
+
+        internal void RefreshAutoHideStrip()
+        {
+            AutoHideStripControl.RefreshChanges();
+        }
+
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DockDragHandler.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DockDragHandler.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DockDragHandler.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,814 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.ComponentModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    partial class DockPanel
+    {
+        private sealed class DockDragHandler : DragHandler
+        {
+            private class DockIndicator : DragForm
+            {
+                #region IHitTest
+                private interface IHitTest
+                {
+                    DockStyle HitTest(Point pt);
+                    DockStyle Status { get;	set;	}
+                }
+                #endregion
+
+                #region PanelIndicator
+                private class PanelIndicator : PictureBox, IHitTest
+                {
+                    private static Image _imagePanelLeft = Resources.DockIndicator_PanelLeft;
+                    private static Image _imagePanelRight = Resources.DockIndicator_PanelRight;
+                    private static Image _imagePanelTop = Resources.DockIndicator_PanelTop;
+                    private static Image _imagePanelBottom = Resources.DockIndicator_PanelBottom;
+                    private static Image _imagePanelFill = Resources.DockIndicator_PanelFill;
+                    private static Image _imagePanelLeftActive = Resources.DockIndicator_PanelLeft_Active;
+                    private static Image _imagePanelRightActive = Resources.DockIndicator_PanelRight_Active;
+                    private static Image _imagePanelTopActive = Resources.DockIndicator_PanelTop_Active;
+                    private static Image _imagePanelBottomActive = Resources.DockIndicator_PanelBottom_Active;
+                    private static Image _imagePanelFillActive = Resources.DockIndicator_PanelFill_Active;
+
+                    public PanelIndicator(DockStyle dockStyle)
+                    {
+                        m_dockStyle = dockStyle;
+                        SizeMode = PictureBoxSizeMode.AutoSize;
+                        Image = ImageInactive;
+                    }
+
+                    private DockStyle m_dockStyle;
+                    private DockStyle DockStyle
+                    {
+                        get { return m_dockStyle; }
+                    }
+
+                    private DockStyle m_status;
+                    public DockStyle Status
+                    {
+                        get { return m_status; }
+                        set
+                        {
+                            if (value != DockStyle && value != DockStyle.None)
+                                throw new InvalidEnumArgumentException();
+
+                            if (m_status == value)
+                                return;
+
+                            m_status = value;
+                            IsActivated = (m_status != DockStyle.None);
+                        }
+                    }
+
+                    private Image ImageInactive
+                    {
+                        get
+                        {
+                            if (DockStyle == DockStyle.Left)
+                                return _imagePanelLeft;
+                            else if (DockStyle == DockStyle.Right)
+                                return _imagePanelRight;
+                            else if (DockStyle == DockStyle.Top)
+                                return _imagePanelTop;
+                            else if (DockStyle == DockStyle.Bottom)
+                                return _imagePanelBottom;
+                            else if (DockStyle == DockStyle.Fill)
+                                return _imagePanelFill;
+                            else
+                                return null;
+                        }
+                    }
+
+                    private Image ImageActive
+                    {
+                        get
+                        {
+                            if (DockStyle == DockStyle.Left)
+                                return _imagePanelLeftActive;
+                            else if (DockStyle == DockStyle.Right)
+                                return _imagePanelRightActive;
+                            else if (DockStyle == DockStyle.Top)
+                                return _imagePanelTopActive;
+                            else if (DockStyle == DockStyle.Bottom)
+                                return _imagePanelBottomActive;
+                            else if (DockStyle == DockStyle.Fill)
+                                return _imagePanelFillActive;
+                            else
+                                return null;
+                        }
+                    }
+
+                    private bool m_isActivated = false;
+                    private bool IsActivated
+                    {
+                        get { return m_isActivated; }
+                        set
+                        {
+                            m_isActivated = value;
+                            Image = IsActivated ? ImageActive : ImageInactive;
+                        }
+                    }
+
+                    public DockStyle HitTest(Point pt)
+                    {
+                        return this.Visible && ClientRectangle.Contains(PointToClient(pt)) ? DockStyle : DockStyle.None;
+                    }
+                }
+                #endregion PanelIndicator
+
+                #region PaneIndicator
+                private class PaneIndicator : PictureBox, IHitTest
+                {
+                    private struct HotSpotIndex
+                    {
+                        public HotSpotIndex(int x, int y, DockStyle dockStyle)
+                        {
+                            m_x = x;
+                            m_y = y;
+                            m_dockStyle = dockStyle;
+                        }
+
+                        private int m_x;
+                        public int X
+                        {
+                            get { return m_x; }
+                        }
+
+                        private int m_y;
+                        public int Y
+                        {
+                            get { return m_y; }
+                        }
+
+                        private DockStyle m_dockStyle;
+                        public DockStyle DockStyle
+                        {
+                            get { return m_dockStyle; }
+                        }
+                    }
+
+                    private static Bitmap _bitmapPaneDiamond = Resources.DockIndicator_PaneDiamond;
+                    private static Bitmap _bitmapPaneDiamondLeft = Resources.DockIndicator_PaneDiamond_Left;
+                    private static Bitmap _bitmapPaneDiamondRight = Resources.DockIndicator_PaneDiamond_Right;
+                    private static Bitmap _bitmapPaneDiamondTop = Resources.DockIndicator_PaneDiamond_Top;
+                    private static Bitmap _bitmapPaneDiamondBottom = Resources.DockIndicator_PaneDiamond_Bottom;
+                    private static Bitmap _bitmapPaneDiamondFill = Resources.DockIndicator_PaneDiamond_Fill;
+                    private static Bitmap _bitmapPaneDiamondHotSpot = Resources.DockIndicator_PaneDiamond_HotSpot;
+                    private static Bitmap _bitmapPaneDiamondHotSpotIndex = Resources.DockIndicator_PaneDiamond_HotSpotIndex;
+                    private static HotSpotIndex[] _hotSpots = new HotSpotIndex[]
+			{
+				new HotSpotIndex(1, 0, DockStyle.Top),
+				new HotSpotIndex(0, 1, DockStyle.Left),
+				new HotSpotIndex(1, 1, DockStyle.Fill),
+				new HotSpotIndex(2, 1, DockStyle.Right),
+				new HotSpotIndex(1, 2, DockStyle.Bottom)
+			};
+                    private static GraphicsPath _displayingGraphicsPath = DrawHelper.CalculateGraphicsPathFromBitmap(_bitmapPaneDiamond);
+
+                    public PaneIndicator()
+                    {
+                        SizeMode = PictureBoxSizeMode.AutoSize;
+                        Image = _bitmapPaneDiamond;
+                        Region = new Region(DisplayingGraphicsPath);
+                    }
+
+                    public static GraphicsPath DisplayingGraphicsPath
+                    {
+                        get { return _displayingGraphicsPath; }
+                    }
+
+                    public DockStyle HitTest(Point pt)
+                    {
+                        if (!Visible)
+                            return DockStyle.None;
+
+                        pt = PointToClient(pt);
+                        if (!ClientRectangle.Contains(pt))
+                            return DockStyle.None;
+
+                        for (int i = _hotSpots.GetLowerBound(0); i <= _hotSpots.GetUpperBound(0); i++)
+                        {
+                            if (_bitmapPaneDiamondHotSpot.GetPixel(pt.X, pt.Y) == _bitmapPaneDiamondHotSpotIndex.GetPixel(_hotSpots[i].X, _hotSpots[i].Y))
+                                return _hotSpots[i].DockStyle;
+                        }
+
+                        return DockStyle.None;
+                    }
+
+                    private DockStyle m_status = DockStyle.None;
+                    public DockStyle Status
+                    {
+                        get { return m_status; }
+                        set
+                        {
+                            m_status = value;
+                            if (m_status == DockStyle.None)
+                                Image = _bitmapPaneDiamond;
+                            else if (m_status == DockStyle.Left)
+                                Image = _bitmapPaneDiamondLeft;
+                            else if (m_status == DockStyle.Right)
+                                Image = _bitmapPaneDiamondRight;
+                            else if (m_status == DockStyle.Top)
+                                Image = _bitmapPaneDiamondTop;
+                            else if (m_status == DockStyle.Bottom)
+                                Image = _bitmapPaneDiamondBottom;
+                            else if (m_status == DockStyle.Fill)
+                                Image = _bitmapPaneDiamondFill;
+                        }
+                    }
+                }
+                #endregion PaneIndicator
+
+                #region consts
+                private int _PanelIndicatorMargin = 10;
+                #endregion
+
+                private DockDragHandler m_dragHandler;
+
+                public DockIndicator(DockDragHandler dragHandler)
+                {
+                    m_dragHandler = dragHandler;
+                    Controls.AddRange(new Control[] {
+			            PaneDiamond,
+			            PanelLeft,
+			            PanelRight,
+			            PanelTop,
+			            PanelBottom,
+			            PanelFill
+			            });
+                    Region = new Region(Rectangle.Empty);
+                }
+
+                private PaneIndicator m_paneDiamond = null;
+                private PaneIndicator PaneDiamond
+                {
+                    get
+                    {
+                        if (m_paneDiamond == null)
+                            m_paneDiamond = new PaneIndicator();
+
+                        return m_paneDiamond;
+                    }
+                }
+
+                private PanelIndicator m_panelLeft = null;
+                private PanelIndicator PanelLeft
+                {
+                    get
+                    {
+                        if (m_panelLeft == null)
+                            m_panelLeft = new PanelIndicator(DockStyle.Left);
+
+                        return m_panelLeft;
+                    }
+                }
+
+                private PanelIndicator m_panelRight = null;
+                private PanelIndicator PanelRight
+                {
+                    get
+                    {
+                        if (m_panelRight == null)
+                            m_panelRight = new PanelIndicator(DockStyle.Right);
+
+                        return m_panelRight;
+                    }
+                }
+
+                private PanelIndicator m_panelTop = null;
+                private PanelIndicator PanelTop
+                {
+                    get
+                    {
+                        if (m_panelTop == null)
+                            m_panelTop = new PanelIndicator(DockStyle.Top);
+
+                        return m_panelTop;
+                    }
+                }
+
+                private PanelIndicator m_panelBottom = null;
+                private PanelIndicator PanelBottom
+                {
+                    get
+                    {
+                        if (m_panelBottom == null)
+                            m_panelBottom = new PanelIndicator(DockStyle.Bottom);
+
+                        return m_panelBottom;
+                    }
+                }
+
+                private PanelIndicator m_panelFill = null;
+                private PanelIndicator PanelFill
+                {
+                    get
+                    {
+                        if (m_panelFill == null)
+                            m_panelFill = new PanelIndicator(DockStyle.Fill);
+
+                        return m_panelFill;
+                    }
+                }
+
+                private bool m_fullPanelEdge = false;
+                public bool FullPanelEdge
+                {
+                    get { return m_fullPanelEdge; }
+                    set
+                    {
+                        if (m_fullPanelEdge == value)
+                            return;
+
+                        m_fullPanelEdge = value;
+                        RefreshChanges();
+                    }
+                }
+
+                public DockDragHandler DragHandler
+                {
+                    get { return m_dragHandler; }
+                }
+
+                public DockPanel DockPanel
+                {
+                    get { return DragHandler.DockPanel; }
+                }
+
+                private DockPane m_dockPane = null;
+                public DockPane DockPane
+                {
+                    get { return m_dockPane; }
+                    internal set
+                    {
+                        if (m_dockPane == value)
+                            return;
+
+                        DockPane oldDisplayingPane = DisplayingPane;
+                        m_dockPane = value;
+                        if (oldDisplayingPane != DisplayingPane)
+                            RefreshChanges();
+                    }
+                }
+
+                private IHitTest m_hitTest = null;
+                private IHitTest HitTestResult
+                {
+                    get { return m_hitTest; }
+                    set
+                    {
+                        if (m_hitTest == value)
+                            return;
+
+                        if (m_hitTest != null)
+                            m_hitTest.Status = DockStyle.None;
+
+                        m_hitTest = value;
+                    }
+                }
+
+                private DockPane DisplayingPane
+                {
+                    get { return ShouldPaneDiamondVisible() ? DockPane : null; }
+                }
+
+                private void RefreshChanges()
+                {
+                    Region region = new Region(Rectangle.Empty);
+                    Rectangle rectDockArea = FullPanelEdge ? DockPanel.DockArea : DockPanel.DocumentWindowBounds;
+
+                    rectDockArea = RectangleToClient(DockPanel.RectangleToScreen(rectDockArea));
+                    if (ShouldPanelIndicatorVisible(DockState.DockLeft))
+                    {
+                        PanelLeft.Location = new Point(rectDockArea.X + _PanelIndicatorMargin, rectDockArea.Y + (rectDockArea.Height - PanelRight.Height) / 2);
+                        PanelLeft.Visible = true;
+                        region.Union(PanelLeft.Bounds);
+                    }
+                    else
+                        PanelLeft.Visible = false;
+
+                    if (ShouldPanelIndicatorVisible(DockState.DockRight))
+                    {
+                        PanelRight.Location = new Point(rectDockArea.X + rectDockArea.Width - PanelRight.Width - _PanelIndicatorMargin, rectDockArea.Y + (rectDockArea.Height - PanelRight.Height) / 2);
+                        PanelRight.Visible = true;
+                        region.Union(PanelRight.Bounds);
+                    }
+                    else
+                        PanelRight.Visible = false;
+
+                    if (ShouldPanelIndicatorVisible(DockState.DockTop))
+                    {
+                        PanelTop.Location = new Point(rectDockArea.X + (rectDockArea.Width - PanelTop.Width) / 2, rectDockArea.Y + _PanelIndicatorMargin);
+                        PanelTop.Visible = true;
+                        region.Union(PanelTop.Bounds);
+                    }
+                    else
+                        PanelTop.Visible = false;
+
+                    if (ShouldPanelIndicatorVisible(DockState.DockBottom))
+                    {
+                        PanelBottom.Location = new Point(rectDockArea.X + (rectDockArea.Width - PanelBottom.Width) / 2, rectDockArea.Y + rectDockArea.Height - PanelBottom.Height - _PanelIndicatorMargin);
+                        PanelBottom.Visible = true;
+                        region.Union(PanelBottom.Bounds);
+                    }
+                    else
+                        PanelBottom.Visible = false;
+
+                    if (ShouldPanelIndicatorVisible(DockState.Document))
+                    {
+                        Rectangle rectDocumentWindow = RectangleToClient(DockPanel.RectangleToScreen(DockPanel.DocumentWindowBounds));
+                        PanelFill.Location = new Point(rectDocumentWindow.X + (rectDocumentWindow.Width - PanelFill.Width) / 2, rectDocumentWindow.Y + (rectDocumentWindow.Height - PanelFill.Height) / 2);
+                        PanelFill.Visible = true;
+                        region.Union(PanelFill.Bounds);
+                    }
+                    else
+                        PanelFill.Visible = false;
+
+                    if (ShouldPaneDiamondVisible())
+                    {
+                        Rectangle rect = RectangleToClient(DockPane.RectangleToScreen(DockPane.ClientRectangle));
+                        PaneDiamond.Location = new Point(rect.Left + (rect.Width - PaneDiamond.Width) / 2, rect.Top + (rect.Height - PaneDiamond.Height) / 2);
+                        PaneDiamond.Visible = true;
+                        using (GraphicsPath graphicsPath = PaneIndicator.DisplayingGraphicsPath.Clone() as GraphicsPath)
+                        {
+                            Point[] pts = new Point[]
+						{
+							new Point(PaneDiamond.Left, PaneDiamond.Top),
+							new Point(PaneDiamond.Right, PaneDiamond.Top),
+							new Point(PaneDiamond.Left, PaneDiamond.Bottom)
+						};
+                            using (Matrix matrix = new Matrix(PaneDiamond.ClientRectangle, pts))
+                            {
+                                graphicsPath.Transform(matrix);
+                            }
+                            region.Union(graphicsPath);
+                        }
+                    }
+                    else
+                        PaneDiamond.Visible = false;
+
+                    Region = region;
+                }
+
+                private bool ShouldPanelIndicatorVisible(DockState dockState)
+                {
+                    if (!Visible)
+                        return false;
+
+                    if (DockPanel.DockWindows[dockState].Visible)
+                        return false;
+
+                    return DragHandler.DragSource.IsDockStateValid(dockState);
+                }
+
+                private bool ShouldPaneDiamondVisible()
+                {
+                    if (DockPane == null)
+                        return false;
+
+                    if (!DockPanel.AllowEndUserNestedDocking)
+                        return false;
+
+                    return DragHandler.DragSource.CanDockTo(DockPane);
+                }
+
+                public override void Show(bool bActivate)
+                {
+                    base.Show(bActivate);
+                    Bounds = SystemInformation.VirtualScreen;
+                    RefreshChanges();
+                }
+
+                public void TestDrop()
+                {
+                    Point pt = Control.MousePosition;
+                    DockPane = DockHelper.PaneAtPoint(pt, DockPanel);
+
+                    if (TestDrop(PanelLeft, pt) != DockStyle.None)
+                        HitTestResult = PanelLeft;
+                    else if (TestDrop(PanelRight, pt) != DockStyle.None)
+                        HitTestResult = PanelRight;
+                    else if (TestDrop(PanelTop, pt) != DockStyle.None)
+                        HitTestResult = PanelTop;
+                    else if (TestDrop(PanelBottom, pt) != DockStyle.None)
+                        HitTestResult = PanelBottom;
+                    else if (TestDrop(PanelFill, pt) != DockStyle.None)
+                        HitTestResult = PanelFill;
+                    else if (TestDrop(PaneDiamond, pt) != DockStyle.None)
+                        HitTestResult = PaneDiamond;
+                    else
+                        HitTestResult = null;
+
+                    if (HitTestResult != null)
+                    {
+                        if (HitTestResult is PaneIndicator)
+                            DragHandler.Outline.Show(DockPane, HitTestResult.Status);
+                        else
+                            DragHandler.Outline.Show(DockPanel, HitTestResult.Status, FullPanelEdge);
+                    }
+                }
+
+                private static DockStyle TestDrop(IHitTest hitTest, Point pt)
+                {
+                    return hitTest.Status = hitTest.HitTest(pt);
+                }
+            }
+
+            private class DockOutline : DockOutlineBase
+            {
+                public DockOutline()
+                {
+                    m_dragForm = new DragForm();
+                    SetDragForm(Rectangle.Empty);
+                    DragForm.BackColor = SystemColors.ActiveCaption;
+                    DragForm.Opacity = 0.5;
+                    DragForm.Show(false);
+                }
+
+                DragForm m_dragForm;
+                private DragForm DragForm
+                {
+                    get { return m_dragForm; }
+                }
+
+                protected override void OnShow()
+                {
+                    CalculateRegion();
+                }
+
+                protected override void OnClose()
+                {
+                    DragForm.Close();
+                }
+
+                private void CalculateRegion()
+                {
+                    if (SameAsOldValue)
+                        return;
+
+                    if (!FloatWindowBounds.IsEmpty)
+                        SetOutline(FloatWindowBounds);
+                    else if (DockTo is DockPanel)
+                        SetOutline(DockTo as DockPanel, Dock, (ContentIndex != 0));
+                    else if (DockTo is DockPane)
+                        SetOutline(DockTo as DockPane, Dock, ContentIndex);
+                    else
+                        SetOutline();
+                }
+
+                private void SetOutline()
+                {
+                    SetDragForm(Rectangle.Empty);
+                }
+
+                private void SetOutline(Rectangle floatWindowBounds)
+                {
+                    SetDragForm(floatWindowBounds);
+                }
+
+                private void SetOutline(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
+                {
+                    Rectangle rect = fullPanelEdge ? dockPanel.DockArea : dockPanel.DocumentWindowBounds;
+                    rect.Location = dockPanel.PointToScreen(rect.Location);
+                    if (dock == DockStyle.Top)
+                    {
+                        int height = dockPanel.GetDockWindowSize(DockState.DockTop);
+                        rect = new Rectangle(rect.X, rect.Y, rect.Width, height);
+                    }
+                    else if (dock == DockStyle.Bottom)
+                    {
+                        int height = dockPanel.GetDockWindowSize(DockState.DockBottom);
+                        rect = new Rectangle(rect.X, rect.Bottom - height, rect.Width, height);
+                    }
+                    else if (dock == DockStyle.Left)
+                    {
+                        int width = dockPanel.GetDockWindowSize(DockState.DockLeft);
+                        rect = new Rectangle(rect.X, rect.Y, width, rect.Height);
+                    }
+                    else if (dock == DockStyle.Right)
+                    {
+                        int width = dockPanel.GetDockWindowSize(DockState.DockRight);
+                        rect = new Rectangle(rect.Right - width, rect.Y, width, rect.Height);
+                    }
+                    else if (dock == DockStyle.Fill)
+                    {
+                        rect = dockPanel.DocumentWindowBounds;
+                        rect.Location = dockPanel.PointToScreen(rect.Location);
+                    }
+
+                    SetDragForm(rect);
+                }
+
+                private void SetOutline(DockPane pane, DockStyle dock, int contentIndex)
+                {
+                    if (dock != DockStyle.Fill)
+                    {
+                        Rectangle rect = pane.DisplayingRectangle;
+                        if (dock == DockStyle.Right)
+                            rect.X += rect.Width / 2;
+                        if (dock == DockStyle.Bottom)
+                            rect.Y += rect.Height / 2;
+                        if (dock == DockStyle.Left || dock == DockStyle.Right)
+                            rect.Width -= rect.Width / 2;
+                        if (dock == DockStyle.Top || dock == DockStyle.Bottom)
+                            rect.Height -= rect.Height / 2;
+                        rect.Location = pane.PointToScreen(rect.Location);
+
+                        SetDragForm(rect);
+                    }
+                    else if (contentIndex == -1)
+                    {
+                        Rectangle rect = pane.DisplayingRectangle;
+                        rect.Location = pane.PointToScreen(rect.Location);
+                        SetDragForm(rect);
+                    }
+                    else
+                    {
+                        using (GraphicsPath path = pane.TabStripControl.GetOutline(contentIndex))
+                        {
+                            RectangleF rectF = path.GetBounds();
+                            Rectangle rect = new Rectangle((int)rectF.X, (int)rectF.Y, (int)rectF.Width, (int)rectF.Height);
+                            using (Matrix matrix = new Matrix(rect, new Point[] { new Point(0, 0), new Point(rect.Width, 0), new Point(0, rect.Height) }))
+                            {
+                                path.Transform(matrix);
+                            }
+                            Region region = new Region(path);
+                            SetDragForm(rect, region);
+                        }
+                    }
+                }
+
+                private void SetDragForm(Rectangle rect)
+                {
+                    DragForm.Bounds = rect;
+                    if (rect == Rectangle.Empty)
+                        DragForm.Region = new Region(Rectangle.Empty);
+                    else if (DragForm.Region != null)
+                        DragForm.Region = null;
+                }
+
+                private void SetDragForm(Rectangle rect, Region region)
+                {
+                    DragForm.Bounds = rect;
+                    DragForm.Region = region;
+                }
+            }
+
+            public DockDragHandler(DockPanel panel)
+                : base(panel)
+            {
+            }
+
+            public new IDockDragSource DragSource
+            {
+                get { return base.DragSource as IDockDragSource; }
+                set { base.DragSource = value; }
+            }
+
+            private DockOutlineBase m_outline;
+            public DockOutlineBase Outline
+            {
+                get { return m_outline; }
+                private set { m_outline = value; }
+            }
+
+            private DockIndicator m_indicator;
+            private DockIndicator Indicator
+            {
+                get { return m_indicator; }
+                set { m_indicator = value; }
+            }
+
+            private Rectangle m_floatOutlineBounds;
+            private Rectangle FloatOutlineBounds
+            {
+                get { return m_floatOutlineBounds; }
+                set { m_floatOutlineBounds = value; }
+            }
+
+            public void BeginDrag(IDockDragSource dragSource)
+            {
+                DragSource = dragSource;
+
+                if (!BeginDrag())
+                {
+                    DragSource = null;
+                    return;
+                }
+
+                Outline = new DockOutline();
+                Indicator = new DockIndicator(this);
+                Indicator.Show(false);
+
+                FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition);
+            }
+
+            protected override void OnDragging()
+            {
+                TestDrop();
+            }
+
+            protected override void OnEndDrag(bool abort)
+            {
+                DockPanel.SuspendLayout(true);
+
+                Outline.Close();
+                Indicator.Close();
+
+                EndDrag(abort);
+
+                // Queue a request to layout all children controls
+                DockPanel.PerformMdiClientLayout();
+
+                DockPanel.ResumeLayout(true, true);
+
+                DragSource = null;
+            }
+
+            private void TestDrop()
+            {
+                Outline.FlagTestDrop = false;
+
+                Indicator.FullPanelEdge = ((Control.ModifierKeys & Keys.Shift) != 0);
+
+                if ((Control.ModifierKeys & Keys.Control) == 0)
+                {
+                    Indicator.TestDrop();
+
+                    if (!Outline.FlagTestDrop)
+                    {
+                        DockPane pane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel);
+                        if (pane != null && DragSource.IsDockStateValid(pane.DockState))
+                            pane.TestDrop(DragSource, Outline);
+                    }
+
+                    if (!Outline.FlagTestDrop && DragSource.IsDockStateValid(DockState.Float))
+                    {
+                        FloatWindow floatWindow = DockHelper.FloatWindowAtPoint(Control.MousePosition, DockPanel);
+                        if (floatWindow != null)
+                            floatWindow.TestDrop(DragSource, Outline);
+                    }
+                }
+                else
+                    Indicator.DockPane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel);
+
+                if (!Outline.FlagTestDrop)
+                {
+                    if (DragSource.IsDockStateValid(DockState.Float))
+                    {
+                        Rectangle rect = FloatOutlineBounds;
+                        rect.Offset(Control.MousePosition.X - StartMousePosition.X, Control.MousePosition.Y - StartMousePosition.Y);
+                        Outline.Show(rect);
+                    }
+                }
+
+                if (!Outline.FlagTestDrop)
+                {
+                    Cursor.Current = Cursors.No;
+                    Outline.Show();
+                }
+                else
+                    Cursor.Current = DragControl.Cursor;
+            }
+
+            private void EndDrag(bool abort)
+            {
+                if (abort)
+                    return;
+
+                if (!Outline.FloatWindowBounds.IsEmpty)
+                    DragSource.FloatAt(Outline.FloatWindowBounds);
+                else if (Outline.DockTo is DockPane)
+                {
+                    DockPane pane = Outline.DockTo as DockPane;
+                    DragSource.DockTo(pane, Outline.Dock, Outline.ContentIndex);
+                }
+                else if (Outline.DockTo is DockPanel)
+                {
+                    DockPanel panel = Outline.DockTo as DockPanel;
+                    panel.UpdateDockWindowZOrder(Outline.Dock, Outline.FlagFullEdge);
+                    DragSource.DockTo(panel, Outline.Dock);
+                }
+            }
+        }
+
+        private DockDragHandler m_dockDragHandler = null;
+        private DockDragHandler GetDockDragHandler()
+        {
+            if (m_dockDragHandler == null)
+                m_dockDragHandler = new DockDragHandler(this);
+            return m_dockDragHandler;
+        }
+
+        internal void BeginDrag(IDockDragSource dragSource)
+        {
+            GetDockDragHandler().BeginDrag(dragSource);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DragHandler.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DragHandler.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.DragHandler.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,136 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.ComponentModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    partial class DockPanel
+    {
+        /// <summary>
+        /// DragHandlerBase is the base class for drag handlers. The derived class should:
+        ///   1. Define its public method BeginDrag. From within this public BeginDrag method,
+        ///      DragHandlerBase.BeginDrag should be called to initialize the mouse capture
+        ///      and message filtering.
+        ///   2. Override the OnDragging and OnEndDrag methods.
+        /// </summary>
+        private abstract class DragHandlerBase : NativeWindow, IMessageFilter
+        {
+            protected DragHandlerBase()
+            {
+            }
+
+            protected abstract Control DragControl
+            {
+                get;
+            }
+
+            private Point m_startMousePosition = Point.Empty;
+            protected Point StartMousePosition
+            {
+                get { return m_startMousePosition; }
+                private set { m_startMousePosition = value; }
+            }
+
+            protected bool BeginDrag()
+            {
+                // Avoid re-entrance;
+                lock (this)
+                {
+                    if (DragControl == null)
+                        return false;
+
+                    StartMousePosition = Control.MousePosition;
+
+                    if (!Win32Helper.IsRunningOnMono())
+                    if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition))
+                        return false;
+
+                    DragControl.FindForm().Capture = true;
+                    AssignHandle(DragControl.FindForm().Handle);
+                    Application.AddMessageFilter(this);
+                    return true;
+                }
+            }
+
+            protected abstract void OnDragging();
+
+            protected abstract void OnEndDrag(bool abort);
+
+            private void EndDrag(bool abort)
+            {
+                ReleaseHandle();
+                Application.RemoveMessageFilter(this);
+                DragControl.FindForm().Capture = false;
+
+                OnEndDrag(abort);
+            }
+
+            bool IMessageFilter.PreFilterMessage(ref Message m)
+            {
+                if (m.Msg == (int)Win32.Msgs.WM_MOUSEMOVE)
+                    OnDragging();
+                else if (m.Msg == (int)Win32.Msgs.WM_LBUTTONUP)
+                    EndDrag(false);
+                else if (m.Msg == (int)Win32.Msgs.WM_CAPTURECHANGED)
+                    EndDrag(true);
+                else if (m.Msg == (int)Win32.Msgs.WM_KEYDOWN && (int)m.WParam == (int)Keys.Escape)
+                    EndDrag(true);
+
+                return OnPreFilterMessage(ref m);
+            }
+
+            protected virtual bool OnPreFilterMessage(ref Message m)
+            {
+                return false;
+            }
+
+            protected sealed override void WndProc(ref Message m)
+            {
+                if (m.Msg == (int)Win32.Msgs.WM_CANCELMODE || m.Msg == (int)Win32.Msgs.WM_CAPTURECHANGED)
+                    EndDrag(true);
+
+                base.WndProc(ref m);
+            }
+        }
+
+        private abstract class DragHandler : DragHandlerBase
+        {
+            private DockPanel m_dockPanel;
+
+            protected DragHandler(DockPanel dockPanel)
+            {
+                m_dockPanel = dockPanel;
+            }
+
+            public DockPanel DockPanel
+            {
+                get { return m_dockPanel; }
+            }
+
+            private IDragSource m_dragSource;
+            protected IDragSource DragSource
+            {
+                get { return m_dragSource; }
+                set { m_dragSource = value; }
+            }
+
+            protected sealed override Control DragControl
+            {
+                get { return DragSource == null ? null : DragSource.DragControl; }
+            }
+
+            protected sealed override bool OnPreFilterMessage(ref Message m)
+            {
+                if ((m.Msg == (int)Win32.Msgs.WM_KEYDOWN || m.Msg == (int)Win32.Msgs.WM_KEYUP) &&
+                    ((int)m.WParam == (int)Keys.ControlKey || (int)m.WParam == (int)Keys.ShiftKey))
+                    OnDragging();
+
+                return base.OnPreFilterMessage(ref m);
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.FocusManager.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.FocusManager.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.FocusManager.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,577 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    internal interface IContentFocusManager
+    {
+        void Activate(IDockContent content);
+        void GiveUpFocus(IDockContent content);
+        void AddToList(IDockContent content);
+        void RemoveFromList(IDockContent content);
+    }
+
+    partial class DockPanel
+    {
+        private interface IFocusManager
+        {
+            void SuspendFocusTracking();
+            void ResumeFocusTracking();
+            bool IsFocusTrackingSuspended { get; }
+            IDockContent ActiveContent { get; }
+            DockPane ActivePane { get; }
+            IDockContent ActiveDocument { get; }
+            DockPane ActiveDocumentPane { get; }
+        }
+
+        private class FocusManagerImpl : Component, IContentFocusManager, IFocusManager
+        {
+            private class HookEventArgs : EventArgs
+            {
+                [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+                public int HookCode;
+                [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+                public IntPtr wParam;
+                public IntPtr lParam;
+            }
+
+            private class LocalWindowsHook : IDisposable
+            {
+                // Internal properties
+                private IntPtr m_hHook = IntPtr.Zero;
+                private NativeMethods.HookProc m_filterFunc = null;
+                private Win32.HookType m_hookType;
+
+                // Event delegate
+                public delegate void HookEventHandler(object sender, HookEventArgs e);
+
+                // Event: HookInvoked 
+                public event HookEventHandler HookInvoked;
+                protected void OnHookInvoked(HookEventArgs e)
+                {
+                    if (HookInvoked != null)
+                        HookInvoked(this, e);
+                }
+
+                public LocalWindowsHook(Win32.HookType hook)
+                {
+                    m_hookType = hook;
+                    m_filterFunc = new NativeMethods.HookProc(this.CoreHookProc);
+                }
+
+                // Default filter function
+                public IntPtr CoreHookProc(int code, IntPtr wParam, IntPtr lParam)
+                {
+                    if (code < 0)
+                        return NativeMethods.CallNextHookEx(m_hHook, code, wParam, lParam);
+
+                    // Let clients determine what to do
+                    HookEventArgs e = new HookEventArgs();
+                    e.HookCode = code;
+                    e.wParam = wParam;
+                    e.lParam = lParam;
+                    OnHookInvoked(e);
+
+                    // Yield to the next hook in the chain
+                    return NativeMethods.CallNextHookEx(m_hHook, code, wParam, lParam);
+                }
+
+                // Install the hook
+                public void Install()
+                {
+                    if (m_hHook != IntPtr.Zero)
+                        Uninstall();
+
+                    int threadId = NativeMethods.GetCurrentThreadId();
+                    m_hHook = NativeMethods.SetWindowsHookEx(m_hookType, m_filterFunc, IntPtr.Zero, threadId);
+                }
+
+                // Uninstall the hook
+                public void Uninstall()
+                {
+                    if (m_hHook != IntPtr.Zero)
+                    {
+                        NativeMethods.UnhookWindowsHookEx(m_hHook);
+                        m_hHook = IntPtr.Zero;
+                    }
+                }
+
+                ~LocalWindowsHook()
+                {
+                    Dispose(false);
+                }
+
+                public void Dispose()
+                {
+                    Dispose(true);
+                    GC.SuppressFinalize(this);
+                }
+
+                protected virtual void Dispose(bool disposing)
+                {
+                    Uninstall();
+                }
+            }
+
+            private LocalWindowsHook m_localWindowsHook;
+            private LocalWindowsHook.HookEventHandler m_hookEventHandler;
+
+            public FocusManagerImpl(DockPanel dockPanel)
+            {
+                m_dockPanel = dockPanel;
+
+                if (Win32Helper.IsRunningOnMono())
+                    return;
+
+                m_localWindowsHook = new LocalWindowsHook(Win32.HookType.WH_CALLWNDPROCRET);
+                m_hookEventHandler = new LocalWindowsHook.HookEventHandler(HookEventHandler);
+                m_localWindowsHook.HookInvoked += m_hookEventHandler;
+                m_localWindowsHook.Install();
+            }
+
+            private DockPanel m_dockPanel;
+            public DockPanel DockPanel
+            {
+                get { return m_dockPanel; }
+            }
+
+            private bool m_disposed = false;
+            protected override void Dispose(bool disposing)
+            {
+                lock (this)
+                {
+                    if (!m_disposed && disposing)
+                    {
+                        if (!Win32Helper.IsRunningOnMono())
+                        m_localWindowsHook.Dispose();
+                        m_disposed = true;
+                    }
+
+                    base.Dispose(disposing);
+                }
+            }
+
+            private IDockContent m_contentActivating = null;
+            private IDockContent ContentActivating
+            {
+                get { return m_contentActivating; }
+                set { m_contentActivating = value; }
+            }
+
+            public void Activate(IDockContent content)
+            {
+                if (IsFocusTrackingSuspended)
+                {
+                    ContentActivating = content;
+                    return;
+                }
+
+                if (content == null)
+                    return;
+                DockContentHandler handler = content.DockHandler;
+                if (handler.Form.IsDisposed)
+                    return; // Should not reach here, but better than throwing an exception
+                if (ContentContains(content, handler.ActiveWindowHandle))
+                    if (!Win32Helper.IsRunningOnMono())
+                    NativeMethods.SetFocus(handler.ActiveWindowHandle);
+                if (!handler.Form.ContainsFocus)
+                {
+                    if (!handler.Form.SelectNextControl(handler.Form.ActiveControl, true, true, true, true))
+                        // Since DockContent Form is not selectalbe, use Win32 SetFocus instead
+                        if (!Win32Helper.IsRunningOnMono())
+                        NativeMethods.SetFocus(handler.Form.Handle);
+                }
+            }
+
+            private List<IDockContent> m_listContent = new List<IDockContent>();
+            private List<IDockContent> ListContent
+            {
+                get { return m_listContent; }
+            }
+            public void AddToList(IDockContent content)
+            {
+                if (ListContent.Contains(content) || IsInActiveList(content))
+                    return;
+
+                ListContent.Add(content);
+            }
+
+            public void RemoveFromList(IDockContent content)
+            {
+                if (IsInActiveList(content))
+                    RemoveFromActiveList(content);
+                if (ListContent.Contains(content))
+                    ListContent.Remove(content);
+            }
+
+            private IDockContent m_lastActiveContent = null;
+            private IDockContent LastActiveContent
+            {
+                get { return m_lastActiveContent; }
+                set { m_lastActiveContent = value; }
+            }
+
+            private bool IsInActiveList(IDockContent content)
+            {
+                return !(content.DockHandler.NextActive == null && LastActiveContent != content);
+            }
+
+            private void AddLastToActiveList(IDockContent content)
+            {
+                IDockContent last = LastActiveContent;
+                if (last == content)
+                    return;
+
+                DockContentHandler handler = content.DockHandler;
+
+                if (IsInActiveList(content))
+                    RemoveFromActiveList(content);
+
+                handler.PreviousActive = last;
+                handler.NextActive = null;
+                LastActiveContent = content;
+                if (last != null)
+                    last.DockHandler.NextActive = LastActiveContent;
+            }
+
+            private void RemoveFromActiveList(IDockContent content)
+            {
+                if (LastActiveContent == content)
+                    LastActiveContent = content.DockHandler.PreviousActive;
+
+                IDockContent prev = content.DockHandler.PreviousActive;
+                IDockContent next = content.DockHandler.NextActive;
+                if (prev != null)
+                    prev.DockHandler.NextActive = next;
+                if (next != null)
+                    next.DockHandler.PreviousActive = prev;
+
+                content.DockHandler.PreviousActive = null;
+                content.DockHandler.NextActive = null;
+            }
+
+            public void GiveUpFocus(IDockContent content)
+            {
+                DockContentHandler handler = content.DockHandler;
+                if (!handler.Form.ContainsFocus)
+                    return;
+
+                if (IsFocusTrackingSuspended)
+                    DockPanel.DummyControl.Focus();
+
+                if (LastActiveContent == content)
+                {
+                    IDockContent prev = handler.PreviousActive;
+                    if (prev != null)
+                        Activate(prev);
+                    else if (ListContent.Count > 0)
+                        Activate(ListContent[ListContent.Count - 1]);
+                }
+                else if (LastActiveContent != null)
+                    Activate(LastActiveContent);
+                else if (ListContent.Count > 0)
+                    Activate(ListContent[ListContent.Count - 1]);
+            }
+
+            private static bool ContentContains(IDockContent content, IntPtr hWnd)
+            {
+                Control control = Control.FromChildHandle(hWnd);
+                for (Control parent = control; parent != null; parent = parent.Parent)
+                    if (parent == content.DockHandler.Form)
+                        return true;
+
+                return false;
+            }
+
+            private int m_countSuspendFocusTracking = 0;
+            public void SuspendFocusTracking()
+            {
+                m_countSuspendFocusTracking++;
+                if (!Win32Helper.IsRunningOnMono())
+                m_localWindowsHook.HookInvoked -= m_hookEventHandler;
+            }
+
+            public void ResumeFocusTracking()
+            {
+                if (m_countSuspendFocusTracking > 0)
+                    m_countSuspendFocusTracking--;
+
+                if (m_countSuspendFocusTracking == 0)
+                {
+                    if (ContentActivating != null)
+                    {
+                        Activate(ContentActivating);
+                        ContentActivating = null;
+                    }
+                    if (!Win32Helper.IsRunningOnMono())
+                    m_localWindowsHook.HookInvoked += m_hookEventHandler;
+                    if (!InRefreshActiveWindow)
+                        RefreshActiveWindow();
+                }
+            }
+
+            public bool IsFocusTrackingSuspended
+            {
+                get { return m_countSuspendFocusTracking != 0; }
+            }
+
+            // Windows hook event handler
+            private void HookEventHandler(object sender, HookEventArgs e)
+            {
+                Win32.Msgs msg = (Win32.Msgs)Marshal.ReadInt32(e.lParam, IntPtr.Size * 3);
+
+                if (msg == Win32.Msgs.WM_KILLFOCUS)
+                {
+                    IntPtr wParam = Marshal.ReadIntPtr(e.lParam, IntPtr.Size * 2);
+                    DockPane pane = GetPaneFromHandle(wParam);
+                    if (pane == null)
+                        RefreshActiveWindow();
+                }
+                else if (msg == Win32.Msgs.WM_SETFOCUS)
+                    RefreshActiveWindow();
+            }
+
+            private DockPane GetPaneFromHandle(IntPtr hWnd)
+            {
+                Control control = Control.FromChildHandle(hWnd);
+
+                IDockContent content = null;
+                DockPane pane = null;
+                for (; control != null; control = control.Parent)
+                {
+                    content = control as IDockContent;
+                    if (content != null)
+                        content.DockHandler.ActiveWindowHandle = hWnd;
+
+                    if (content != null && content.DockHandler.DockPanel == DockPanel)
+                        return content.DockHandler.Pane;
+
+                    pane = control as DockPane;
+                    if (pane != null && pane.DockPanel == DockPanel)
+                        break;
+                }
+
+                return pane;
+            }
+
+            private bool m_inRefreshActiveWindow = false;
+            private bool InRefreshActiveWindow
+            {
+                get { return m_inRefreshActiveWindow; }
+            }
+
+            private void RefreshActiveWindow()
+            {
+                SuspendFocusTracking();
+                m_inRefreshActiveWindow = true;
+
+                DockPane oldActivePane = ActivePane;
+                IDockContent oldActiveContent = ActiveContent;
+                IDockContent oldActiveDocument = ActiveDocument;
+
+                SetActivePane();
+                SetActiveContent();
+                SetActiveDocumentPane();
+                SetActiveDocument();
+                DockPanel.AutoHideWindow.RefreshActivePane();
+
+                ResumeFocusTracking();
+                m_inRefreshActiveWindow = false;
+
+                if (oldActiveContent != ActiveContent)
+                    DockPanel.OnActiveContentChanged(EventArgs.Empty);
+                if (oldActiveDocument != ActiveDocument)
+                    DockPanel.OnActiveDocumentChanged(EventArgs.Empty);
+                if (oldActivePane != ActivePane)
+                    DockPanel.OnActivePaneChanged(EventArgs.Empty);
+            }
+
+            private DockPane m_activePane = null;
+            public DockPane ActivePane
+            {
+                get { return m_activePane; }
+            }
+
+            private void SetActivePane()
+            {
+                DockPane value = Win32Helper.IsRunningOnMono() ? null : GetPaneFromHandle(NativeMethods.GetFocus());
+                if (m_activePane == value)
+                    return;
+
+                if (m_activePane != null)
+                    m_activePane.SetIsActivated(false);
+
+                m_activePane = value;
+
+                if (m_activePane != null)
+                    m_activePane.SetIsActivated(true);
+            }
+
+            private IDockContent m_activeContent = null;
+            public IDockContent ActiveContent
+            {
+                get { return m_activeContent; }
+            }
+
+            internal void SetActiveContent()
+            {
+                IDockContent value = ActivePane == null ? null : ActivePane.ActiveContent;
+
+                if (m_activeContent == value)
+                    return;
+
+                if (m_activeContent != null)
+                    m_activeContent.DockHandler.IsActivated = false;
+
+                m_activeContent = value;
+
+                if (m_activeContent != null)
+                {
+                    m_activeContent.DockHandler.IsActivated = true;
+                    if (!DockHelper.IsDockStateAutoHide((m_activeContent.DockHandler.DockState)))
+                        AddLastToActiveList(m_activeContent);
+                }
+            }
+
+            private DockPane m_activeDocumentPane = null;
+            public DockPane ActiveDocumentPane
+            {
+                get { return m_activeDocumentPane; }
+            }
+
+            private void SetActiveDocumentPane()
+            {
+                DockPane value = null;
+
+                if (ActivePane != null && ActivePane.DockState == DockState.Document)
+                    value = ActivePane;
+
+                if (value == null && DockPanel.DockWindows != null)
+                {
+                    if (ActiveDocumentPane == null)
+                        value = DockPanel.DockWindows[DockState.Document].DefaultPane;
+                    else if (ActiveDocumentPane.DockPanel != DockPanel || ActiveDocumentPane.DockState != DockState.Document)
+                        value = DockPanel.DockWindows[DockState.Document].DefaultPane;
+                    else
+                        value = ActiveDocumentPane;
+                }
+
+                if (m_activeDocumentPane == value)
+                    return;
+
+                if (m_activeDocumentPane != null)
+                    m_activeDocumentPane.SetIsActiveDocumentPane(false);
+
+                m_activeDocumentPane = value;
+
+                if (m_activeDocumentPane != null)
+                    m_activeDocumentPane.SetIsActiveDocumentPane(true);
+            }
+
+            private IDockContent m_activeDocument = null;
+            public IDockContent ActiveDocument
+            {
+                get { return m_activeDocument; }
+            }
+
+            private void SetActiveDocument()
+            {
+                IDockContent value = ActiveDocumentPane == null ? null : ActiveDocumentPane.ActiveContent;
+
+                if (m_activeDocument == value)
+                    return;
+
+                m_activeDocument = value;
+            }
+        }
+
+        private IFocusManager FocusManager
+        {
+            get { return m_focusManager; }
+        }
+
+        internal IContentFocusManager ContentFocusManager
+        {
+            get { return m_focusManager; }
+        }
+
+        internal void SaveFocus()
+        {
+            DummyControl.Focus();
+        }
+
+        [Browsable(false)]
+        public IDockContent ActiveContent
+        {
+            get { return FocusManager.ActiveContent; }
+        }
+
+        [Browsable(false)]
+        public DockPane ActivePane
+        {
+            get { return FocusManager.ActivePane; }
+        }
+
+        [Browsable(false)]
+        public IDockContent ActiveDocument
+        {
+            get { return FocusManager.ActiveDocument; }
+        }
+
+        [Browsable(false)]
+        public DockPane ActiveDocumentPane
+        {
+            get { return FocusManager.ActiveDocumentPane; }
+        }
+
+        private static readonly object ActiveDocumentChangedEvent = new object();
+        [LocalizedCategory("Category_PropertyChanged")]
+        [LocalizedDescription("DockPanel_ActiveDocumentChanged_Description")]
+        public event EventHandler ActiveDocumentChanged
+        {
+            add { Events.AddHandler(ActiveDocumentChangedEvent, value); }
+            remove { Events.RemoveHandler(ActiveDocumentChangedEvent, value); }
+        }
+        protected virtual void OnActiveDocumentChanged(EventArgs e)
+        {
+            EventHandler handler = (EventHandler)Events[ActiveDocumentChangedEvent];
+            if (handler != null)
+                handler(this, e);
+        }
+
+        private static readonly object ActiveContentChangedEvent = new object();
+        [LocalizedCategory("Category_PropertyChanged")]
+        [LocalizedDescription("DockPanel_ActiveContentChanged_Description")]
+        public event EventHandler ActiveContentChanged
+        {
+            add { Events.AddHandler(ActiveContentChangedEvent, value); }
+            remove { Events.RemoveHandler(ActiveContentChangedEvent, value); }
+        }
+        protected void OnActiveContentChanged(EventArgs e)
+        {
+            EventHandler handler = (EventHandler)Events[ActiveContentChangedEvent];
+            if (handler != null)
+                handler(this, e);
+        }
+
+        private static readonly object ActivePaneChangedEvent = new object();
+        [LocalizedCategory("Category_PropertyChanged")]
+        [LocalizedDescription("DockPanel_ActivePaneChanged_Description")]
+        public event EventHandler ActivePaneChanged
+        {
+            add { Events.AddHandler(ActivePaneChangedEvent, value); }
+            remove { Events.RemoveHandler(ActivePaneChangedEvent, value); }
+        }
+        protected virtual void OnActivePaneChanged(EventArgs e)
+        {
+            EventHandler handler = (EventHandler)Events[ActivePaneChangedEvent];
+            if (handler != null)
+                handler(this, e);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.MdiClientController.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.MdiClientController.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.MdiClientController.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,434 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.ComponentModel;
+using System.ComponentModel.Design;
+using System.Runtime.InteropServices;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    partial class DockPanel
+    {
+        //  This class comes from Jacob Slusser's MdiClientController class:
+        //  http://www.codeproject.com/cs/miscctrl/mdiclientcontroller.asp
+        private class MdiClientController : NativeWindow, IComponent, IDisposable
+        {
+            private bool m_autoScroll = true;
+            private BorderStyle m_borderStyle = BorderStyle.Fixed3D;
+            private MdiClient m_mdiClient = null;
+            private Form m_parentForm = null;
+            private ISite m_site = null;
+
+            public MdiClientController()
+            {
+            }
+
+            public void Dispose()
+            {
+                Dispose(true);
+                GC.SuppressFinalize(this);
+            }
+
+            protected virtual void Dispose(bool disposing)
+            {
+                if (disposing)
+                {
+                    lock (this)
+                    {
+                        if (Site != null && Site.Container != null)
+                            Site.Container.Remove(this);
+
+                        if (Disposed != null)
+                            Disposed(this, EventArgs.Empty);
+                    }
+                }
+            }
+
+            public bool AutoScroll
+            {
+                get { return m_autoScroll; }
+                set
+                {
+                    // By default the MdiClient control scrolls. It can appear though that
+                    // there are no scrollbars by turning them off when the non-client
+                    // area is calculated. I decided to expose this method following
+                    // the .NET vernacular of an AutoScroll property.
+                    m_autoScroll = value;
+                    if (MdiClient != null)
+                        UpdateStyles();
+                }
+            }
+
+            public BorderStyle BorderStyle
+            {
+                set
+                {
+                    // Error-check the enum.
+                    if (!Enum.IsDefined(typeof(BorderStyle), value))
+                        throw new InvalidEnumArgumentException();
+
+                    m_borderStyle = value;
+
+                    if (MdiClient == null)
+                        return;
+
+                    // This property can actually be visible in design-mode,
+                    // but to keep it consistent with the others,
+                    // prevent this from being show at design-time.
+                    if (Site != null && Site.DesignMode)
+                        return;
+
+                    // There is no BorderStyle property exposed by the MdiClient class,
+                    // but this can be controlled by Win32 functions. A Win32 ExStyle
+                    // of WS_EX_CLIENTEDGE is equivalent to a Fixed3D border and a
+                    // Style of WS_BORDER is equivalent to a FixedSingle border.
+
+                    // This code is inspired Jason Dori's article:
+                    // "Adding designable borders to user controls".
+                    // http://www.codeproject.com/cs/miscctrl/CsAddingBorders.asp
+
+                    if (!Win32Helper.IsRunningOnMono())
+                    {
+                    // Get styles using Win32 calls
+                    int style = NativeMethods.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE);
+                    int exStyle = NativeMethods.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE);
+
+                    // Add or remove style flags as necessary.
+                    switch (m_borderStyle)
+                    {
+                        case BorderStyle.Fixed3D:
+                            exStyle |= (int)Win32.WindowExStyles.WS_EX_CLIENTEDGE;
+                            style &= ~((int)Win32.WindowStyles.WS_BORDER);
+                            break;
+
+                        case BorderStyle.FixedSingle:
+                            exStyle &= ~((int)Win32.WindowExStyles.WS_EX_CLIENTEDGE);
+                            style |= (int)Win32.WindowStyles.WS_BORDER;
+                            break;
+
+                        case BorderStyle.None:
+                            style &= ~((int)Win32.WindowStyles.WS_BORDER);
+                            exStyle &= ~((int)Win32.WindowExStyles.WS_EX_CLIENTEDGE);
+                            break;
+                    }
+
+                    // Set the styles using Win32 calls
+                    NativeMethods.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE, style);
+                    NativeMethods.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE, exStyle);
+                    }
+                    // Cause an update of the non-client area.
+                    UpdateStyles();
+                }
+            }
+
+            public MdiClient MdiClient
+            {
+                get { return m_mdiClient; }
+            }
+
+            [Browsable(false)]
+            public Form ParentForm
+            {
+                get { return m_parentForm; }
+                set
+                {
+                    // If the ParentForm has previously been set,
+                    // unwire events connected to the old parent.
+                    if (m_parentForm != null)
+                    {
+                        m_parentForm.HandleCreated -= new EventHandler(ParentFormHandleCreated);
+                        m_parentForm.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
+                    }
+
+                    m_parentForm = value;
+
+                    if (m_parentForm == null)
+                        return;
+
+                    // If the parent form has not been created yet,
+                    // wait to initialize the MDI client until it is.
+                    if (m_parentForm.IsHandleCreated)
+                    {
+                        InitializeMdiClient();
+                        RefreshProperties();
+                    }
+                    else
+                        m_parentForm.HandleCreated += new EventHandler(ParentFormHandleCreated);
+
+                    m_parentForm.MdiChildActivate += new EventHandler(ParentFormMdiChildActivate);
+                }
+            }
+
+            public ISite Site
+            {
+                get { return m_site; }
+                set
+                {
+                    m_site = value;
+
+                    if (m_site == null)
+                        return;
+
+                    // If the component is dropped onto a form during design-time,
+                    // set the ParentForm property.
+                    IDesignerHost host = (value.GetService(typeof(IDesignerHost)) as IDesignerHost);
+                    if (host != null)
+                    {
+                        Form parent = host.RootComponent as Form;
+                        if (parent != null)
+                            ParentForm = parent;
+                    }
+                }
+            }
+
+            public void RenewMdiClient()
+            {
+                // Reinitialize the MdiClient and its properties.
+                InitializeMdiClient();
+                RefreshProperties();
+            }
+
+            public event EventHandler Disposed;
+
+            public event EventHandler HandleAssigned;
+
+            public event EventHandler MdiChildActivate;
+
+            public event LayoutEventHandler Layout;
+
+            protected virtual void OnHandleAssigned(EventArgs e)
+            {
+                // Raise the HandleAssigned event.
+                if (HandleAssigned != null)
+                    HandleAssigned(this, e);
+            }
+
+            protected virtual void OnMdiChildActivate(EventArgs e)
+            {
+                // Raise the MdiChildActivate event
+                if (MdiChildActivate != null)
+                    MdiChildActivate(this, e);
+            }
+
+            protected virtual void OnLayout(LayoutEventArgs e)
+            {
+                // Raise the Layout event
+                if (Layout != null)
+                    Layout(this, e);
+            }
+
+            public event PaintEventHandler Paint;
+
+            protected virtual void OnPaint(PaintEventArgs e)
+            {
+                // Raise the Paint event.
+                if (Paint != null)
+                    Paint(this, e);
+            }
+
+            protected override void WndProc(ref Message m)
+            {
+                switch (m.Msg)
+                {
+                    case (int)Win32.Msgs.WM_NCCALCSIZE:
+                        // If AutoScroll is set to false, hide the scrollbars when the control
+                        // calculates its non-client area.
+                        if (!AutoScroll)
+                            if (!Win32Helper.IsRunningOnMono())
+                            NativeMethods.ShowScrollBar(m.HWnd, (int)Win32.ScrollBars.SB_BOTH, 0 /*false*/);
+                        break;
+                }
+
+                base.WndProc(ref m);
+            }
+
+            private void ParentFormHandleCreated(object sender, EventArgs e)
+            {
+                // The form has been created, unwire the event, and initialize the MdiClient.
+                this.m_parentForm.HandleCreated -= new EventHandler(ParentFormHandleCreated);
+                InitializeMdiClient();
+                RefreshProperties();
+            }
+
+            private void ParentFormMdiChildActivate(object sender, EventArgs e)
+            {
+                OnMdiChildActivate(e);
+            }
+
+            private void MdiClientLayout(object sender, LayoutEventArgs e)
+            {
+                OnLayout(e);
+            }
+
+            private void MdiClientHandleDestroyed(object sender, EventArgs e)
+            {
+                // If the MdiClient handle has been released, drop the reference and
+                // release the handle.
+                if (m_mdiClient != null)
+                {
+                    m_mdiClient.HandleDestroyed -= new EventHandler(MdiClientHandleDestroyed);
+                    m_mdiClient = null;
+                }
+
+                ReleaseHandle();
+            }
+
+            private void InitializeMdiClient()
+            {
+                // If the mdiClient has previously been set, unwire events connected
+                // to the old MDI.
+                if (MdiClient != null)
+                {
+                    MdiClient.HandleDestroyed -= new EventHandler(MdiClientHandleDestroyed);
+                    MdiClient.Layout -= new LayoutEventHandler(MdiClientLayout);
+                }
+
+                if (ParentForm == null)
+                    return;
+
+                // Get the MdiClient from the parent form.
+                foreach (Control control in ParentForm.Controls)
+                {
+                    // If the form is an MDI container, it will contain an MdiClient control
+                    // just as it would any other control.
+
+                    m_mdiClient = control as MdiClient;
+                    if (m_mdiClient == null)
+                        continue;
+
+                    // Assign the MdiClient Handle to the NativeWindow.
+                    ReleaseHandle();
+                    AssignHandle(MdiClient.Handle);
+
+                    // Raise the HandleAssigned event.
+                    OnHandleAssigned(EventArgs.Empty);
+
+                    // Monitor the MdiClient for when its handle is destroyed.
+                    MdiClient.HandleDestroyed += new EventHandler(MdiClientHandleDestroyed);
+                    MdiClient.Layout += new LayoutEventHandler(MdiClientLayout);
+
+                    break;
+                }
+            }
+
+            private void RefreshProperties()
+            {
+                // Refresh all the properties
+                BorderStyle = m_borderStyle;
+                AutoScroll = m_autoScroll;
+            }
+
+            private void UpdateStyles()
+            {
+                // To show style changes, the non-client area must be repainted. Using the
+                // control's Invalidate method does not affect the non-client area.
+                // Instead use a Win32 call to signal the style has changed.
+                if (!Win32Helper.IsRunningOnMono())
+                NativeMethods.SetWindowPos(MdiClient.Handle, IntPtr.Zero, 0, 0, 0, 0,
+                    Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
+                    Win32.FlagsSetWindowPos.SWP_NOMOVE |
+                    Win32.FlagsSetWindowPos.SWP_NOSIZE |
+                    Win32.FlagsSetWindowPos.SWP_NOZORDER |
+                    Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
+                    Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
+            }
+        }
+
+        private MdiClientController m_mdiClientController = null;
+        private MdiClientController GetMdiClientController()
+        {
+            if (m_mdiClientController == null)
+            {
+                m_mdiClientController = new MdiClientController();
+                m_mdiClientController.HandleAssigned += new EventHandler(MdiClientHandleAssigned);
+                m_mdiClientController.MdiChildActivate += new EventHandler(ParentFormMdiChildActivate);
+                m_mdiClientController.Layout += new LayoutEventHandler(MdiClient_Layout);
+            }
+
+            return m_mdiClientController;
+        }
+
+        private void ParentFormMdiChildActivate(object sender, EventArgs e)
+        {
+            if (GetMdiClientController().ParentForm == null)
+                return;
+
+            IDockContent content = GetMdiClientController().ParentForm.ActiveMdiChild as IDockContent;
+            if (content == null)
+                return;
+
+            if (content.DockHandler.DockPanel == this && content.DockHandler.Pane != null)
+                content.DockHandler.Pane.ActiveContent = content;
+        }
+
+        private bool MdiClientExists
+        {
+            get { return GetMdiClientController().MdiClient != null; }
+        }
+
+        private void SetMdiClientBounds(Rectangle bounds)
+        {
+            GetMdiClientController().MdiClient.Bounds = bounds;
+        }
+
+        private void SuspendMdiClientLayout()
+        {
+            if (GetMdiClientController().MdiClient != null)
+                GetMdiClientController().MdiClient.SuspendLayout();
+        }
+
+        private void ResumeMdiClientLayout(bool perform)
+        {
+            if (GetMdiClientController().MdiClient != null)
+                GetMdiClientController().MdiClient.ResumeLayout(perform);
+        }
+
+        private void PerformMdiClientLayout()
+        {
+            if (GetMdiClientController().MdiClient != null)
+                GetMdiClientController().MdiClient.PerformLayout();
+        }
+
+        // Called when:
+        // 1. DockPanel.DocumentStyle changed
+        // 2. DockPanel.Visible changed
+        // 3. MdiClientController.Handle assigned
+        private void SetMdiClient()
+        {
+            MdiClientController controller = GetMdiClientController();
+
+            if (this.DocumentStyle == DocumentStyle.DockingMdi)
+            {
+                controller.AutoScroll = false;
+                controller.BorderStyle = BorderStyle.None;
+                if (MdiClientExists)
+                    controller.MdiClient.Dock = DockStyle.Fill;
+            }
+            else if (DocumentStyle == DocumentStyle.DockingSdi || DocumentStyle == DocumentStyle.DockingWindow)
+            {
+                controller.AutoScroll = true;
+                controller.BorderStyle = BorderStyle.Fixed3D;
+                if (MdiClientExists)
+                    controller.MdiClient.Dock = DockStyle.Fill;
+            }
+            else if (this.DocumentStyle == DocumentStyle.SystemMdi)
+            {
+                controller.AutoScroll = true;
+                controller.BorderStyle = BorderStyle.Fixed3D;
+                if (controller.MdiClient != null)
+                {
+                    controller.MdiClient.Dock = DockStyle.None;
+                    controller.MdiClient.Bounds = SystemMdiClientBounds;
+                }
+            }
+        }
+
+        internal Rectangle RectangleToMdiClient(Rectangle rect)
+        {
+            if (MdiClientExists)
+                return GetMdiClientController().MdiClient.RectangleToClient(rect);
+            else
+                return Rectangle.Empty;
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.Persistor.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.Persistor.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.Persistor.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,784 @@
+using System;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Drawing;
+using WeifenLuo.WinFormsUI.Docking;
+using System.IO;
+using System.Text;
+using System.Xml;
+using System.Globalization;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    partial class DockPanel
+    {
+        private static class Persistor
+        {
+            private const string ConfigFileVersion = "1.0";
+            private static string[] CompatibleConfigFileVersions = new string[] { };
+
+            private class DummyContent : DockContent
+            {
+            }
+
+            private struct DockPanelStruct
+            {
+                private double m_dockLeftPortion;
+                public double DockLeftPortion
+                {
+                    get { return m_dockLeftPortion; }
+                    set { m_dockLeftPortion = value; }
+                }
+
+                private double m_dockRightPortion;
+                public double DockRightPortion
+                {
+                    get { return m_dockRightPortion; }
+                    set { m_dockRightPortion = value; }
+                }
+
+                private double m_dockTopPortion;
+                public double DockTopPortion
+                {
+                    get { return m_dockTopPortion; }
+                    set { m_dockTopPortion = value; }
+                }
+
+                private double m_dockBottomPortion;
+                public double DockBottomPortion
+                {
+                    get { return m_dockBottomPortion; }
+                    set { m_dockBottomPortion = value; }
+                }
+
+                private int m_indexActiveDocumentPane;
+                public int IndexActiveDocumentPane
+                {
+                    get { return m_indexActiveDocumentPane; }
+                    set { m_indexActiveDocumentPane = value; }
+                }
+
+                private int m_indexActivePane;
+                public int IndexActivePane
+                {
+                    get { return m_indexActivePane; }
+                    set { m_indexActivePane = value; }
+                }
+            }
+
+            private struct ContentStruct
+            {
+                private string m_persistString;
+                public string PersistString
+                {
+                    get { return m_persistString; }
+                    set { m_persistString = value; }
+                }
+
+                private double m_autoHidePortion;
+                public double AutoHidePortion
+                {
+                    get { return m_autoHidePortion; }
+                    set { m_autoHidePortion = value; }
+                }
+
+                private bool m_isHidden;
+                public bool IsHidden
+                {
+                    get { return m_isHidden; }
+                    set { m_isHidden = value; }
+                }
+
+                private bool m_isFloat;
+                public bool IsFloat
+                {
+                    get { return m_isFloat; }
+                    set { m_isFloat = value; }
+                }
+            }
+
+            private struct PaneStruct
+            {
+                private DockState m_dockState;
+                public DockState DockState
+                {
+                    get { return m_dockState; }
+                    set { m_dockState = value; }
+                }
+
+                private int m_indexActiveContent;
+                public int IndexActiveContent
+                {
+                    get { return m_indexActiveContent; }
+                    set { m_indexActiveContent = value; }
+                }
+
+                private int[] m_indexContents;
+                public int[] IndexContents
+                {
+                    get { return m_indexContents; }
+                    set { m_indexContents = value; }
+                }
+
+                private int m_zOrderIndex;
+                public int ZOrderIndex
+                {
+                    get { return m_zOrderIndex; }
+                    set { m_zOrderIndex = value; }
+                }
+            }
+
+            private struct NestedPane
+            {
+                private int m_indexPane;
+                public int IndexPane
+                {
+                    get { return m_indexPane; }
+                    set { m_indexPane = value; }
+                }
+
+                private int m_indexPrevPane;
+                public int IndexPrevPane
+                {
+                    get { return m_indexPrevPane; }
+                    set { m_indexPrevPane = value; }
+                }
+
+                private DockAlignment m_alignment;
+                public DockAlignment Alignment
+                {
+                    get { return m_alignment; }
+                    set { m_alignment = value; }
+                }
+
+                private double m_proportion;
+                public double Proportion
+                {
+                    get { return m_proportion; }
+                    set { m_proportion = value; }
+                }
+            }
+
+            private struct DockWindowStruct
+            {
+                private DockState m_dockState;
+                public DockState DockState
+                {
+                    get { return m_dockState; }
+                    set { m_dockState = value; }
+                }
+
+                private int m_zOrderIndex;
+                public int ZOrderIndex
+                {
+                    get { return m_zOrderIndex; }
+                    set { m_zOrderIndex = value; }
+                }
+
+                private NestedPane[] m_nestedPanes;
+                public NestedPane[] NestedPanes
+                {
+                    get { return m_nestedPanes; }
+                    set { m_nestedPanes = value; }
+                }
+            }
+
+            private struct FloatWindowStruct
+            {
+                private Rectangle m_bounds;
+                public Rectangle Bounds
+                {
+                    get { return m_bounds; }
+                    set { m_bounds = value; }
+                }
+
+                private int m_zOrderIndex;
+                public int ZOrderIndex
+                {
+                    get { return m_zOrderIndex; }
+                    set { m_zOrderIndex = value; }
+                }
+
+                private NestedPane[] m_nestedPanes;
+                public NestedPane[] NestedPanes
+                {
+                    get { return m_nestedPanes; }
+                    set { m_nestedPanes = value; }
+                }
+            }
+
+            public static void SaveAsXml(DockPanel dockPanel, string fileName)
+            {
+                SaveAsXml(dockPanel, fileName, Encoding.Unicode);
+            }
+
+            public static void SaveAsXml(DockPanel dockPanel, string fileName, Encoding encoding)
+            {
+                FileStream fs = new FileStream(fileName, FileMode.Create);
+                try
+                {
+                    SaveAsXml(dockPanel, fs, encoding);
+                }
+                finally
+                {
+                    fs.Close();
+                }
+            }
+
+            public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding)
+            {
+                SaveAsXml(dockPanel, stream, encoding, false);
+            }
+
+            public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding, bool upstream)
+            {
+                XmlTextWriter xmlOut = new XmlTextWriter(stream, encoding);
+
+                // Use indenting for readability
+                xmlOut.Formatting = Formatting.Indented;
+
+                if (!upstream)
+                    xmlOut.WriteStartDocument();
+
+                // Always begin file with identification and warning
+                xmlOut.WriteComment(Strings.DockPanel_Persistor_XmlFileComment1);
+                xmlOut.WriteComment(Strings.DockPanel_Persistor_XmlFileComment2);
+
+                // Associate a version number with the root element so that future version of the code
+                // will be able to be backwards compatible or at least recognise out of date versions
+                xmlOut.WriteStartElement("DockPanel");
+                xmlOut.WriteAttributeString("FormatVersion", ConfigFileVersion);
+                xmlOut.WriteAttributeString("DockLeftPortion", dockPanel.DockLeftPortion.ToString(CultureInfo.InvariantCulture));
+                xmlOut.WriteAttributeString("DockRightPortion", dockPanel.DockRightPortion.ToString(CultureInfo.InvariantCulture));
+                xmlOut.WriteAttributeString("DockTopPortion", dockPanel.DockTopPortion.ToString(CultureInfo.InvariantCulture));
+                xmlOut.WriteAttributeString("DockBottomPortion", dockPanel.DockBottomPortion.ToString(CultureInfo.InvariantCulture));
+                if (!Win32Helper.IsRunningOnMono())
+                {
+                    xmlOut.WriteAttributeString("ActiveDocumentPane", dockPanel.Panes.IndexOf(dockPanel.ActiveDocumentPane).ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteAttributeString("ActivePane", dockPanel.Panes.IndexOf(dockPanel.ActivePane).ToString(CultureInfo.InvariantCulture));
+                }
+
+                // Contents
+                xmlOut.WriteStartElement("Contents");
+                xmlOut.WriteAttributeString("Count", dockPanel.Contents.Count.ToString(CultureInfo.InvariantCulture));
+                foreach (IDockContent content in dockPanel.Contents)
+                {
+                    xmlOut.WriteStartElement("Content");
+                    xmlOut.WriteAttributeString("ID", dockPanel.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteAttributeString("PersistString", content.DockHandler.PersistString);
+                    xmlOut.WriteAttributeString("AutoHidePortion", content.DockHandler.AutoHidePortion.ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteAttributeString("IsHidden", content.DockHandler.IsHidden.ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteAttributeString("IsFloat", content.DockHandler.IsFloat.ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteEndElement();
+                }
+                xmlOut.WriteEndElement();
+
+                // Panes
+                xmlOut.WriteStartElement("Panes");
+                xmlOut.WriteAttributeString("Count", dockPanel.Panes.Count.ToString(CultureInfo.InvariantCulture));
+                foreach (DockPane pane in dockPanel.Panes)
+                {
+                    xmlOut.WriteStartElement("Pane");
+                    xmlOut.WriteAttributeString("ID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteAttributeString("DockState", pane.DockState.ToString());
+                    xmlOut.WriteAttributeString("ActiveContent", dockPanel.Contents.IndexOf(pane.ActiveContent).ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteStartElement("Contents");
+                    xmlOut.WriteAttributeString("Count", pane.Contents.Count.ToString(CultureInfo.InvariantCulture));
+                    foreach (IDockContent content in pane.Contents)
+                    {
+                        xmlOut.WriteStartElement("Content");
+                        xmlOut.WriteAttributeString("ID", pane.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteAttributeString("RefID", dockPanel.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteEndElement();
+                    }
+                    xmlOut.WriteEndElement();
+                    xmlOut.WriteEndElement();
+                }
+                xmlOut.WriteEndElement();
+
+                // DockWindows
+                xmlOut.WriteStartElement("DockWindows");
+                int dockWindowId = 0;
+                foreach (DockWindow dw in dockPanel.DockWindows)
+                {
+                    xmlOut.WriteStartElement("DockWindow");
+                    xmlOut.WriteAttributeString("ID", dockWindowId.ToString(CultureInfo.InvariantCulture));
+                    dockWindowId++;
+                    xmlOut.WriteAttributeString("DockState", dw.DockState.ToString());
+                    xmlOut.WriteAttributeString("ZOrderIndex", dockPanel.Controls.IndexOf(dw).ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteStartElement("NestedPanes");
+                    xmlOut.WriteAttributeString("Count", dw.NestedPanes.Count.ToString(CultureInfo.InvariantCulture));
+                    foreach (DockPane pane in dw.NestedPanes)
+                    {
+                        xmlOut.WriteStartElement("Pane");
+                        xmlOut.WriteAttributeString("ID", dw.NestedPanes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteAttributeString("RefID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+                        NestedDockingStatus status = pane.NestedDockingStatus;
+                        xmlOut.WriteAttributeString("PrevPane", dockPanel.Panes.IndexOf(status.PreviousPane).ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteAttributeString("Alignment", status.Alignment.ToString());
+                        xmlOut.WriteAttributeString("Proportion", status.Proportion.ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteEndElement();
+                    }
+                    xmlOut.WriteEndElement();
+                    xmlOut.WriteEndElement();
+                }
+                xmlOut.WriteEndElement();
+
+                // FloatWindows
+                RectangleConverter rectConverter = new RectangleConverter();
+                xmlOut.WriteStartElement("FloatWindows");
+                xmlOut.WriteAttributeString("Count", dockPanel.FloatWindows.Count.ToString(CultureInfo.InvariantCulture));
+                foreach (FloatWindow fw in dockPanel.FloatWindows)
+                {
+                    xmlOut.WriteStartElement("FloatWindow");
+                    xmlOut.WriteAttributeString("ID", dockPanel.FloatWindows.IndexOf(fw).ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteAttributeString("Bounds", rectConverter.ConvertToInvariantString(fw.Bounds));
+                    xmlOut.WriteAttributeString("ZOrderIndex", fw.DockPanel.FloatWindows.IndexOf(fw).ToString(CultureInfo.InvariantCulture));
+                    xmlOut.WriteStartElement("NestedPanes");
+                    xmlOut.WriteAttributeString("Count", fw.NestedPanes.Count.ToString(CultureInfo.InvariantCulture));
+                    foreach (DockPane pane in fw.NestedPanes)
+                    {
+                        xmlOut.WriteStartElement("Pane");
+                        xmlOut.WriteAttributeString("ID", fw.NestedPanes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteAttributeString("RefID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+                        NestedDockingStatus status = pane.NestedDockingStatus;
+                        xmlOut.WriteAttributeString("PrevPane", dockPanel.Panes.IndexOf(status.PreviousPane).ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteAttributeString("Alignment", status.Alignment.ToString());
+                        xmlOut.WriteAttributeString("Proportion", status.Proportion.ToString(CultureInfo.InvariantCulture));
+                        xmlOut.WriteEndElement();
+                    }
+                    xmlOut.WriteEndElement();
+                    xmlOut.WriteEndElement();
+                }
+                xmlOut.WriteEndElement();	//	</FloatWindows>
+
+                xmlOut.WriteEndElement();
+
+                if (!upstream)
+                {
+                    xmlOut.WriteEndDocument();
+                    xmlOut.Close();
+                }
+                else
+                    xmlOut.Flush();
+            }
+
+            public static void LoadFromXml(DockPanel dockPanel, string fileName, DeserializeDockContent deserializeContent)
+            {
+                FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
+                try
+                {
+                    LoadFromXml(dockPanel, fs, deserializeContent);
+                }
+                finally
+                {
+                    fs.Close();
+                }
+            }
+
+            public static void LoadFromXml(DockPanel dockPanel, Stream stream, DeserializeDockContent deserializeContent)
+            {
+                LoadFromXml(dockPanel, stream, deserializeContent, true);
+            }
+
+            private static ContentStruct[] LoadContents(XmlTextReader xmlIn)
+            {
+                int countOfContents = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+                ContentStruct[] contents = new ContentStruct[countOfContents];
+                MoveToNextElement(xmlIn);
+                for (int i = 0; i < countOfContents; i++)
+                {
+                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+                    if (xmlIn.Name != "Content" || id != i)
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+                    contents[i].PersistString = xmlIn.GetAttribute("PersistString");
+                    contents[i].AutoHidePortion = Convert.ToDouble(xmlIn.GetAttribute("AutoHidePortion"), CultureInfo.InvariantCulture);
+                    contents[i].IsHidden = Convert.ToBoolean(xmlIn.GetAttribute("IsHidden"), CultureInfo.InvariantCulture);
+                    contents[i].IsFloat = Convert.ToBoolean(xmlIn.GetAttribute("IsFloat"), CultureInfo.InvariantCulture);
+                    MoveToNextElement(xmlIn);
+                }
+
+                return contents;
+            }
+
+            private static PaneStruct[] LoadPanes(XmlTextReader xmlIn)
+            {
+                EnumConverter dockStateConverter = new EnumConverter(typeof(DockState));
+                int countOfPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+                PaneStruct[] panes = new PaneStruct[countOfPanes];
+                MoveToNextElement(xmlIn);
+                for (int i = 0; i < countOfPanes; i++)
+                {
+                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+                    if (xmlIn.Name != "Pane" || id != i)
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+                    panes[i].DockState = (DockState)dockStateConverter.ConvertFrom(xmlIn.GetAttribute("DockState"));
+                    panes[i].IndexActiveContent = Convert.ToInt32(xmlIn.GetAttribute("ActiveContent"), CultureInfo.InvariantCulture);
+                    panes[i].ZOrderIndex = -1;
+
+                    MoveToNextElement(xmlIn);
+                    if (xmlIn.Name != "Contents")
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                    int countOfPaneContents = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+                    panes[i].IndexContents = new int[countOfPaneContents];
+                    MoveToNextElement(xmlIn);
+                    for (int j = 0; j < countOfPaneContents; j++)
+                    {
+                        int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+                        if (xmlIn.Name != "Content" || id2 != j)
+                            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+                        panes[i].IndexContents[j] = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
+                        MoveToNextElement(xmlIn);
+                    }
+                }
+
+                return panes;
+            }
+
+            private static DockWindowStruct[] LoadDockWindows(XmlTextReader xmlIn, DockPanel dockPanel)
+            {
+                EnumConverter dockStateConverter = new EnumConverter(typeof(DockState));
+                EnumConverter dockAlignmentConverter = new EnumConverter(typeof(DockAlignment));
+                int countOfDockWindows = dockPanel.DockWindows.Count;
+                DockWindowStruct[] dockWindows = new DockWindowStruct[countOfDockWindows];
+                MoveToNextElement(xmlIn);
+                for (int i = 0; i < countOfDockWindows; i++)
+                {
+                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+                    if (xmlIn.Name != "DockWindow" || id != i)
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+                    dockWindows[i].DockState = (DockState)dockStateConverter.ConvertFrom(xmlIn.GetAttribute("DockState"));
+                    dockWindows[i].ZOrderIndex = Convert.ToInt32(xmlIn.GetAttribute("ZOrderIndex"), CultureInfo.InvariantCulture);
+                    MoveToNextElement(xmlIn);
+                    if (xmlIn.Name != "DockList" && xmlIn.Name != "NestedPanes")
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                    int countOfNestedPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+                    dockWindows[i].NestedPanes = new NestedPane[countOfNestedPanes];
+                    MoveToNextElement(xmlIn);
+                    for (int j = 0; j < countOfNestedPanes; j++)
+                    {
+                        int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+                        if (xmlIn.Name != "Pane" || id2 != j)
+                            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                        dockWindows[i].NestedPanes[j].IndexPane = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
+                        dockWindows[i].NestedPanes[j].IndexPrevPane = Convert.ToInt32(xmlIn.GetAttribute("PrevPane"), CultureInfo.InvariantCulture);
+                        dockWindows[i].NestedPanes[j].Alignment = (DockAlignment)dockAlignmentConverter.ConvertFrom(xmlIn.GetAttribute("Alignment"));
+                        dockWindows[i].NestedPanes[j].Proportion = Convert.ToDouble(xmlIn.GetAttribute("Proportion"), CultureInfo.InvariantCulture);
+                        MoveToNextElement(xmlIn);
+                    }
+                }
+
+                return dockWindows;
+            }
+
+            private static FloatWindowStruct[] LoadFloatWindows(XmlTextReader xmlIn)
+            {
+                EnumConverter dockAlignmentConverter = new EnumConverter(typeof(DockAlignment));
+                RectangleConverter rectConverter = new RectangleConverter();
+                int countOfFloatWindows = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+                FloatWindowStruct[] floatWindows = new FloatWindowStruct[countOfFloatWindows];
+                MoveToNextElement(xmlIn);
+                for (int i = 0; i < countOfFloatWindows; i++)
+                {
+                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+                    if (xmlIn.Name != "FloatWindow" || id != i)
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+                    floatWindows[i].Bounds = (Rectangle)rectConverter.ConvertFromInvariantString(xmlIn.GetAttribute("Bounds"));
+                    floatWindows[i].ZOrderIndex = Convert.ToInt32(xmlIn.GetAttribute("ZOrderIndex"), CultureInfo.InvariantCulture);
+                    MoveToNextElement(xmlIn);
+                    if (xmlIn.Name != "DockList" && xmlIn.Name != "NestedPanes")
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                    int countOfNestedPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+                    floatWindows[i].NestedPanes = new NestedPane[countOfNestedPanes];
+                    MoveToNextElement(xmlIn);
+                    for (int j = 0; j < countOfNestedPanes; j++)
+                    {
+                        int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+                        if (xmlIn.Name != "Pane" || id2 != j)
+                            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                        floatWindows[i].NestedPanes[j].IndexPane = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
+                        floatWindows[i].NestedPanes[j].IndexPrevPane = Convert.ToInt32(xmlIn.GetAttribute("PrevPane"), CultureInfo.InvariantCulture);
+                        floatWindows[i].NestedPanes[j].Alignment = (DockAlignment)dockAlignmentConverter.ConvertFrom(xmlIn.GetAttribute("Alignment"));
+                        floatWindows[i].NestedPanes[j].Proportion = Convert.ToDouble(xmlIn.GetAttribute("Proportion"), CultureInfo.InvariantCulture);
+                        MoveToNextElement(xmlIn);
+                    }
+                }
+
+                return floatWindows;
+            }
+
+            public static void LoadFromXml(DockPanel dockPanel, Stream stream, DeserializeDockContent deserializeContent, bool closeStream)
+            {
+
+                if (dockPanel.Contents.Count != 0)
+                    throw new InvalidOperationException(Strings.DockPanel_LoadFromXml_AlreadyInitialized);
+
+                XmlTextReader xmlIn = new XmlTextReader(stream);
+                xmlIn.WhitespaceHandling = WhitespaceHandling.None;
+                xmlIn.MoveToContent();
+
+                while (!xmlIn.Name.Equals("DockPanel"))
+                {
+                    if (!MoveToNextElement(xmlIn))
+                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                }
+
+                string formatVersion = xmlIn.GetAttribute("FormatVersion");
+                if (!IsFormatVersionValid(formatVersion))
+                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidFormatVersion);
+
+                DockPanelStruct dockPanelStruct = new DockPanelStruct();
+                dockPanelStruct.DockLeftPortion = Convert.ToDouble(xmlIn.GetAttribute("DockLeftPortion"), CultureInfo.InvariantCulture);
+                dockPanelStruct.DockRightPortion = Convert.ToDouble(xmlIn.GetAttribute("DockRightPortion"), CultureInfo.InvariantCulture);
+                dockPanelStruct.DockTopPortion = Convert.ToDouble(xmlIn.GetAttribute("DockTopPortion"), CultureInfo.InvariantCulture);
+                dockPanelStruct.DockBottomPortion = Convert.ToDouble(xmlIn.GetAttribute("DockBottomPortion"), CultureInfo.InvariantCulture);
+                dockPanelStruct.IndexActiveDocumentPane = Convert.ToInt32(xmlIn.GetAttribute("ActiveDocumentPane"), CultureInfo.InvariantCulture);
+                dockPanelStruct.IndexActivePane = Convert.ToInt32(xmlIn.GetAttribute("ActivePane"), CultureInfo.InvariantCulture);
+
+                // Load Contents
+                MoveToNextElement(xmlIn);
+                if (xmlIn.Name != "Contents")
+                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                ContentStruct[] contents = LoadContents(xmlIn);
+
+                // Load Panes
+                if (xmlIn.Name != "Panes")
+                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                PaneStruct[] panes = LoadPanes(xmlIn);
+
+                // Load DockWindows
+                if (xmlIn.Name != "DockWindows")
+                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                DockWindowStruct[] dockWindows = LoadDockWindows(xmlIn, dockPanel);
+
+                // Load FloatWindows
+                if (xmlIn.Name != "FloatWindows")
+                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+                FloatWindowStruct[] floatWindows = LoadFloatWindows(xmlIn);
+
+                if (closeStream)
+                    xmlIn.Close();
+
+                dockPanel.SuspendLayout(true);
+
+                dockPanel.DockLeftPortion = dockPanelStruct.DockLeftPortion;
+                dockPanel.DockRightPortion = dockPanelStruct.DockRightPortion;
+                dockPanel.DockTopPortion = dockPanelStruct.DockTopPortion;
+                dockPanel.DockBottomPortion = dockPanelStruct.DockBottomPortion;
+
+                // Set DockWindow ZOrders
+                int prevMaxDockWindowZOrder = int.MaxValue;
+                for (int i = 0; i < dockWindows.Length; i++)
+                {
+                    int maxDockWindowZOrder = -1;
+                    int index = -1;
+                    for (int j = 0; j < dockWindows.Length; j++)
+                    {
+                        if (dockWindows[j].ZOrderIndex > maxDockWindowZOrder && dockWindows[j].ZOrderIndex < prevMaxDockWindowZOrder)
+                        {
+                            maxDockWindowZOrder = dockWindows[j].ZOrderIndex;
+                            index = j;
+                        }
+                    }
+
+                    dockPanel.DockWindows[dockWindows[index].DockState].BringToFront();
+                    prevMaxDockWindowZOrder = maxDockWindowZOrder;
+                }
+
+                // Create Contents
+                for (int i = 0; i < contents.Length; i++)
+                {
+                    IDockContent content = deserializeContent(contents[i].PersistString);
+                    if (content == null)
+                        content = new DummyContent();
+                    content.DockHandler.DockPanel = dockPanel;
+                    content.DockHandler.AutoHidePortion = contents[i].AutoHidePortion;
+                    content.DockHandler.IsHidden = true;
+                    content.DockHandler.IsFloat = contents[i].IsFloat;
+                }
+
+                // Create panes
+                for (int i = 0; i < panes.Length; i++)
+                {
+                    DockPane pane = null;
+                    for (int j = 0; j < panes[i].IndexContents.Length; j++)
+                    {
+                        IDockContent content = dockPanel.Contents[panes[i].IndexContents[j]];
+                        if (j == 0)
+                            pane = dockPanel.DockPaneFactory.CreateDockPane(content, panes[i].DockState, false);
+                        else if (panes[i].DockState == DockState.Float)
+                            content.DockHandler.FloatPane = pane;
+                        else
+                            content.DockHandler.PanelPane = pane;
+                    }
+                }
+
+                // Assign Panes to DockWindows
+                for (int i = 0; i < dockWindows.Length; i++)
+                {
+                    for (int j = 0; j < dockWindows[i].NestedPanes.Length; j++)
+                    {
+                        DockWindow dw = dockPanel.DockWindows[dockWindows[i].DockState];
+                        int indexPane = dockWindows[i].NestedPanes[j].IndexPane;
+                        DockPane pane = dockPanel.Panes[indexPane];
+                        int indexPrevPane = dockWindows[i].NestedPanes[j].IndexPrevPane;
+                        DockPane prevPane = (indexPrevPane == -1) ? dw.NestedPanes.GetDefaultPreviousPane(pane) : dockPanel.Panes[indexPrevPane];
+                        DockAlignment alignment = dockWindows[i].NestedPanes[j].Alignment;
+                        double proportion = dockWindows[i].NestedPanes[j].Proportion;
+                        pane.DockTo(dw, prevPane, alignment, proportion);
+                        if (panes[indexPane].DockState == dw.DockState)
+                            panes[indexPane].ZOrderIndex = dockWindows[i].ZOrderIndex;
+                    }
+                }
+
+                // Create float windows
+                for (int i = 0; i < floatWindows.Length; i++)
+                {
+                    FloatWindow fw = null;
+                    for (int j = 0; j < floatWindows[i].NestedPanes.Length; j++)
+                    {
+                        int indexPane = floatWindows[i].NestedPanes[j].IndexPane;
+                        DockPane pane = dockPanel.Panes[indexPane];
+                        if (j == 0)
+                            fw = dockPanel.FloatWindowFactory.CreateFloatWindow(dockPanel, pane, floatWindows[i].Bounds);
+                        else
+                        {
+                            int indexPrevPane = floatWindows[i].NestedPanes[j].IndexPrevPane;
+                            DockPane prevPane = indexPrevPane == -1 ? null : dockPanel.Panes[indexPrevPane];
+                            DockAlignment alignment = floatWindows[i].NestedPanes[j].Alignment;
+                            double proportion = floatWindows[i].NestedPanes[j].Proportion;
+                            pane.DockTo(fw, prevPane, alignment, proportion);
+                        }
+
+                        if (panes[indexPane].DockState == fw.DockState)
+                            panes[indexPane].ZOrderIndex = floatWindows[i].ZOrderIndex;
+                    }
+                }
+
+                // sort IDockContent by its Pane's ZOrder
+                int[] sortedContents = null;
+                if (contents.Length > 0)
+                {
+                    sortedContents = new int[contents.Length];
+                    for (int i = 0; i < contents.Length; i++)
+                        sortedContents[i] = i;
+
+                    int lastDocument = contents.Length;
+                    for (int i = 0; i < contents.Length - 1; i++)
+                    {
+                        for (int j = i + 1; j < contents.Length; j++)
+                        {
+                            DockPane pane1 = dockPanel.Contents[sortedContents[i]].DockHandler.Pane;
+                            int ZOrderIndex1 = pane1 == null ? 0 : panes[dockPanel.Panes.IndexOf(pane1)].ZOrderIndex;
+                            DockPane pane2 = dockPanel.Contents[sortedContents[j]].DockHandler.Pane;
+                            int ZOrderIndex2 = pane2 == null ? 0 : panes[dockPanel.Panes.IndexOf(pane2)].ZOrderIndex;
+                            if (ZOrderIndex1 > ZOrderIndex2)
+                            {
+                                int temp = sortedContents[i];
+                                sortedContents[i] = sortedContents[j];
+                                sortedContents[j] = temp;
+                            }
+                        }
+                    }
+                }
+
+                // show non-document IDockContent first to avoid screen flickers
+                for (int i = 0; i < contents.Length; i++)
+                {
+                    IDockContent content = dockPanel.Contents[sortedContents[i]];
+                    if (content.DockHandler.Pane != null && content.DockHandler.Pane.DockState != DockState.Document)
+                        content.DockHandler.IsHidden = contents[sortedContents[i]].IsHidden;
+                }
+
+                // after all non-document IDockContent, show document IDockContent
+                for (int i = 0; i < contents.Length; i++)
+                {
+                    IDockContent content = dockPanel.Contents[sortedContents[i]];
+                    if (content.DockHandler.Pane != null && content.DockHandler.Pane.DockState == DockState.Document)
+                        content.DockHandler.IsHidden = contents[sortedContents[i]].IsHidden;
+                }
+
+                for (int i = 0; i < panes.Length; i++)
+                    dockPanel.Panes[i].ActiveContent = panes[i].IndexActiveContent == -1 ? null : dockPanel.Contents[panes[i].IndexActiveContent];
+
+                if (dockPanelStruct.IndexActiveDocumentPane != -1)
+                    dockPanel.Panes[dockPanelStruct.IndexActiveDocumentPane].Activate();
+
+                if (dockPanelStruct.IndexActivePane != -1)
+                    dockPanel.Panes[dockPanelStruct.IndexActivePane].Activate();
+
+                for (int i = dockPanel.Contents.Count - 1; i >= 0; i--)
+                    if (dockPanel.Contents[i] is DummyContent)
+                        dockPanel.Contents[i].DockHandler.Form.Close();
+
+                dockPanel.ResumeLayout(true, true);
+            }
+
+            private static bool MoveToNextElement(XmlTextReader xmlIn)
+            {
+                if (!xmlIn.Read())
+                    return false;
+
+                while (xmlIn.NodeType == XmlNodeType.EndElement)
+                {
+                    if (!xmlIn.Read())
+                        return false;
+                }
+
+                return true;
+            }
+
+            private static bool IsFormatVersionValid(string formatVersion)
+            {
+                if (formatVersion == ConfigFileVersion)
+                    return true;
+
+                foreach (string s in CompatibleConfigFileVersions)
+                    if (s == formatVersion)
+                        return true;
+
+                return false;
+            }
+        }
+
+        public void SaveAsXml(string fileName)
+        {
+            Persistor.SaveAsXml(this, fileName);
+        }
+
+        public void SaveAsXml(string fileName, Encoding encoding)
+        {
+            Persistor.SaveAsXml(this, fileName, encoding);
+        }
+
+        public void SaveAsXml(Stream stream, Encoding encoding)
+        {
+            Persistor.SaveAsXml(this, stream, encoding);
+        }
+
+        public void SaveAsXml(Stream stream, Encoding encoding, bool upstream)
+        {
+            Persistor.SaveAsXml(this, stream, encoding, upstream);
+        }
+
+        public void LoadFromXml(string fileName, DeserializeDockContent deserializeContent)
+        {
+            Persistor.LoadFromXml(this, fileName, deserializeContent);
+        }
+
+        public void LoadFromXml(Stream stream, DeserializeDockContent deserializeContent)
+        {
+            Persistor.LoadFromXml(this, stream, deserializeContent);
+        }
+
+        public void LoadFromXml(Stream stream, DeserializeDockContent deserializeContent, bool closeStream)
+        {
+            Persistor.LoadFromXml(this, stream, deserializeContent, closeStream);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.SplitterDragHandler.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.SplitterDragHandler.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.SplitterDragHandler.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,165 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.ComponentModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    partial class DockPanel
+    {
+        private sealed class SplitterDragHandler : DragHandler
+        {
+            private class SplitterOutline
+            {
+                public SplitterOutline()
+                {
+                    m_dragForm = new DragForm();
+                    SetDragForm(Rectangle.Empty);
+                    DragForm.BackColor = Color.Black;
+                    DragForm.Opacity = 0.7;
+                    DragForm.Show(false);
+                }
+
+                DragForm m_dragForm;
+                private DragForm DragForm
+                {
+                    get { return m_dragForm; }
+                }
+
+                public void Show(Rectangle rect)
+                {
+                    SetDragForm(rect);
+                }
+
+                public void Close()
+                {
+                    DragForm.Close();
+                }
+
+                private void SetDragForm(Rectangle rect)
+                {
+                    DragForm.Bounds = rect;
+                    if (rect == Rectangle.Empty)
+                        DragForm.Region = new Region(Rectangle.Empty);
+                    else if (DragForm.Region != null)
+                        DragForm.Region = null;
+                }
+            }
+
+            public SplitterDragHandler(DockPanel dockPanel)
+                : base(dockPanel)
+            {
+            }
+
+            public new ISplitterDragSource DragSource
+            {
+                get { return base.DragSource as ISplitterDragSource; }
+                private set { base.DragSource = value; }
+            }
+
+            private SplitterOutline m_outline;
+            private SplitterOutline Outline
+            {
+                get { return m_outline; }
+                set { m_outline = value; }
+            }
+
+            private Rectangle m_rectSplitter;
+            private Rectangle RectSplitter
+            {
+                get { return m_rectSplitter; }
+                set { m_rectSplitter = value; }
+            }
+
+            public void BeginDrag(ISplitterDragSource dragSource, Rectangle rectSplitter)
+            {
+                DragSource = dragSource;
+                RectSplitter = rectSplitter;
+
+                if (!BeginDrag())
+                {
+                    DragSource = null;
+                    return;
+                }
+
+                Outline = new SplitterOutline();
+                Outline.Show(rectSplitter);
+                DragSource.BeginDrag(rectSplitter);
+            }
+
+            protected override void OnDragging()
+            {
+                Outline.Show(GetSplitterOutlineBounds(Control.MousePosition));
+            }
+
+            protected override void OnEndDrag(bool abort)
+            {
+                DockPanel.SuspendLayout(true);
+
+                Outline.Close();
+
+                if (!abort)
+                    DragSource.MoveSplitter(GetMovingOffset(Control.MousePosition));
+
+                DragSource.EndDrag();
+                DockPanel.ResumeLayout(true, true);
+            }
+
+            private int GetMovingOffset(Point ptMouse)
+            {
+                Rectangle rect = GetSplitterOutlineBounds(ptMouse);
+                if (DragSource.IsVertical)
+                    return rect.X - RectSplitter.X;
+                else
+                    return rect.Y - RectSplitter.Y;
+            }
+
+            private Rectangle GetSplitterOutlineBounds(Point ptMouse)
+            {
+                Rectangle rectLimit = DragSource.DragLimitBounds;
+
+                Rectangle rect = RectSplitter;
+                if (rectLimit.Width <= 0 || rectLimit.Height <= 0)
+                    return rect;
+
+                if (DragSource.IsVertical)
+                {
+                    rect.X += ptMouse.X - StartMousePosition.X;
+                    rect.Height = rectLimit.Height;
+                }
+                else
+                {
+                    rect.Y += ptMouse.Y - StartMousePosition.Y;
+                    rect.Width = rectLimit.Width;
+                }
+
+                if (rect.Left < rectLimit.Left)
+                    rect.X = rectLimit.X;
+                if (rect.Top < rectLimit.Top)
+                    rect.Y = rectLimit.Y;
+                if (rect.Right > rectLimit.Right)
+                    rect.X -= rect.Right - rectLimit.Right;
+                if (rect.Bottom > rectLimit.Bottom)
+                    rect.Y -= rect.Bottom - rectLimit.Bottom;
+
+                return rect;
+            }
+        }
+
+        private SplitterDragHandler m_splitterDragHandler = null;
+        private SplitterDragHandler GetSplitterDragHandler()
+        {
+            if (m_splitterDragHandler == null)
+                m_splitterDragHandler = new SplitterDragHandler(this);
+            return m_splitterDragHandler;
+        }
+
+        internal void BeginDrag(ISplitterDragSource dragSource, Rectangle rectSplitter)
+        {
+            GetSplitterDragHandler().BeginDrag(dragSource, rectSplitter);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanel.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,1064 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+using System.IO;
+using System.Text;
+using System.Diagnostics.CodeAnalysis;
+using System.Collections.Generic;
+
+// To simplify the process of finding the toolbox bitmap resource:
+// #1 Create an internal class called "resfinder" outside of the root namespace.
+// #2 Use "resfinder" in the toolbox bitmap attribute instead of the control name.
+// #3 use the "<default namespace>.<resourcename>" string to locate the resource.
+// See: http://www.bobpowell.net/toolboxbitmap.htm
+internal class resfinder
+{
+}
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "0#")]
+	public delegate IDockContent DeserializeDockContent(string persistString);
+
+    [LocalizedDescription("DockPanel_Description")]
+    [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))]
+    [ToolboxBitmap(typeof(resfinder), "WeifenLuo.WinFormsUI.Docking.DockPanel.bmp")]
+    [DefaultProperty("DocumentStyle")]
+    [DefaultEvent("ActiveContentChanged")]
+	public partial class DockPanel : Panel
+	{
+        private FocusManagerImpl m_focusManager;
+        private DockPanelExtender m_extender;
+        private DockPaneCollection m_panes;
+        private FloatWindowCollection m_floatWindows;
+        private AutoHideWindowControl m_autoHideWindow;
+        private DockWindowCollection m_dockWindows;
+        private DockContent m_dummyContent; 
+        private Control m_dummyControl;
+        
+		public DockPanel()
+		{
+            m_focusManager = new FocusManagerImpl(this);
+			m_extender = new DockPanelExtender(this);
+			m_panes = new DockPaneCollection();
+			m_floatWindows = new FloatWindowCollection();
+
+            SuspendLayout();
+
+			m_autoHideWindow = new AutoHideWindowControl(this);
+			m_autoHideWindow.Visible = false;
+            SetAutoHideWindowParent();
+
+			m_dummyControl = new DummyControl();
+			m_dummyControl.Bounds = new Rectangle(0, 0, 1, 1);
+			Controls.Add(m_dummyControl);
+
+			m_dockWindows = new DockWindowCollection(this);
+			Controls.AddRange(new Control[]	{
+				DockWindows[DockState.Document],
+				DockWindows[DockState.DockLeft],
+				DockWindows[DockState.DockRight],
+				DockWindows[DockState.DockTop],
+				DockWindows[DockState.DockBottom]
+				});
+
+			m_dummyContent = new DockContent();
+            ResumeLayout();
+        }
+        
+        private Color m_BackColor;
+        /// <summary>
+        /// Determines the color with which the client rectangle will be drawn.
+        /// If this property is used instead of the BackColor it will not have any influence on the borders to the surrounding controls (DockPane).
+        /// The BackColor property changes the borders of surrounding controls (DockPane).
+        /// Alternatively both properties may be used (BackColor to draw and define the color of the borders and DockBackColor to define the color of the client rectangle). 
+        /// For Backgroundimages: Set your prefered Image, then set the DockBackColor and the BackColor to the same Color (Control)
+        /// </summary>
+        [Description("Determines the color with which the client rectangle will be drawn.\r\n" +
+            "If this property is used instead of the BackColor it will not have any influence on the borders to the surrounding controls (DockPane).\r\n" +
+            "The BackColor property changes the borders of surrounding controls (DockPane).\r\n" +
+            "Alternatively both properties may be used (BackColor to draw and define the color of the borders and DockBackColor to define the color of the client rectangle).\r\n" +
+            "For Backgroundimages: Set your prefered Image, then set the DockBackColor and the BackColor to the same Color (Control).")]
+        public Color DockBackColor
+        {
+            get
+            {
+                return !m_BackColor.IsEmpty ? m_BackColor : base.BackColor;
+            }
+            set
+            {
+                if (m_BackColor != value)
+                {
+                    m_BackColor = value;
+                    this.Refresh();
+                }
+            }
+        }
+
+		private AutoHideStripBase m_autoHideStripControl = null;
+		internal AutoHideStripBase AutoHideStripControl
+		{
+			get
+			{	
+				if (m_autoHideStripControl == null)
+				{
+					m_autoHideStripControl = AutoHideStripFactory.CreateAutoHideStrip(this);
+					Controls.Add(m_autoHideStripControl);
+				}
+				return m_autoHideStripControl;
+			}
+		}
+        internal void ResetAutoHideStripControl()
+        {
+            if (m_autoHideStripControl != null)
+                m_autoHideStripControl.Dispose();
+
+            m_autoHideStripControl = null;
+        }
+
+		private void MdiClientHandleAssigned(object sender, EventArgs e)
+		{
+			SetMdiClient();
+			PerformLayout();
+		}
+
+		private void MdiClient_Layout(object sender, LayoutEventArgs e)
+		{
+			if (DocumentStyle != DocumentStyle.DockingMdi)
+				return;
+
+			foreach (DockPane pane in Panes)
+				if (pane.DockState == DockState.Document)
+					pane.SetContentBounds();
+
+			InvalidateWindowRegion();
+		}
+
+		private bool m_disposed = false;
+		protected override void Dispose(bool disposing)
+		{
+			lock (this)
+			{
+				if (!m_disposed && disposing)
+				{
+                    m_focusManager.Dispose();
+					if (m_mdiClientController != null)
+					{
+						m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
+						m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
+						m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
+						m_mdiClientController.Dispose();
+					}
+					FloatWindows.Dispose();
+					Panes.Dispose();
+					DummyContent.Dispose();
+
+					m_disposed = true;
+				}
+				
+				base.Dispose(disposing);
+			}
+		}
+
+		[Browsable(false)]
+		public IDockContent ActiveAutoHideContent
+		{
+			get	{	return AutoHideWindow.ActiveContent;	}
+			set	{	AutoHideWindow.ActiveContent = value;	}
+		}
+
+        private bool m_allowEndUserDocking = !Win32Helper.IsRunningOnMono();
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockPanel_AllowEndUserDocking_Description")]
+		[DefaultValue(true)]
+		public bool AllowEndUserDocking
+		{
+			get
+			{
+                if (Win32Helper.IsRunningOnMono() && m_allowEndUserDocking)
+                    m_allowEndUserDocking = false;
+
+			    return m_allowEndUserDocking;
+			}
+			set
+			{
+			    if (Win32Helper.IsRunningOnMono() && value)
+			        throw new InvalidOperationException("AllowEndUserDocking can only be false if running on Mono");
+                    
+                m_allowEndUserDocking = value;
+			}
+		}
+
+        private bool m_allowEndUserNestedDocking = !Win32Helper.IsRunningOnMono();
+        [LocalizedCategory("Category_Docking")]
+        [LocalizedDescription("DockPanel_AllowEndUserNestedDocking_Description")]
+        [DefaultValue(true)]
+        public bool AllowEndUserNestedDocking
+        {
+            get
+            {
+                if (Win32Helper.IsRunningOnMono() && m_allowEndUserDocking)
+                    m_allowEndUserDocking = false;
+                return m_allowEndUserNestedDocking;
+            }
+            set
+            {
+                if (Win32Helper.IsRunningOnMono() && value)
+                    throw new InvalidOperationException("AllowEndUserNestedDocking can only be false if running on Mono");
+
+                m_allowEndUserNestedDocking = value;
+            }
+        }
+
+        private DockContentCollection m_contents = new DockContentCollection();
+		[Browsable(false)]
+		public DockContentCollection Contents
+		{
+			get	{	return m_contents;	}
+		}
+
+		internal DockContent DummyContent
+		{
+			get	{	return m_dummyContent;	}
+		}
+
+        private bool m_rightToLeftLayout = false;
+        [DefaultValue(false)]
+        [LocalizedCategory("Appearance")]
+        [LocalizedDescription("DockPanel_RightToLeftLayout_Description")]
+        public bool RightToLeftLayout
+        {
+            get { return m_rightToLeftLayout; }
+            set
+            {
+                if (m_rightToLeftLayout == value)
+                    return;
+
+                m_rightToLeftLayout = value;
+                foreach (FloatWindow floatWindow in FloatWindows)
+                    floatWindow.RightToLeftLayout = value;
+            }
+        }
+
+        protected override void OnRightToLeftChanged(EventArgs e)
+        {
+            base.OnRightToLeftChanged(e);
+            foreach (FloatWindow floatWindow in FloatWindows)
+            {
+                if (floatWindow.RightToLeft != RightToLeft)
+                    floatWindow.RightToLeft = RightToLeft;
+            }
+        }
+
+		private bool m_showDocumentIcon = false;
+		[DefaultValue(false)]
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockPanel_ShowDocumentIcon_Description")]
+		public bool ShowDocumentIcon
+		{
+			get	{	return m_showDocumentIcon;	}
+			set
+			{
+				if (m_showDocumentIcon == value)
+					return;
+
+				m_showDocumentIcon = value;
+				Refresh();
+			}
+		}
+
+        private DockPanelSkin m_dockPanelSkin = new DockPanelSkin();
+        [LocalizedCategory("Category_Docking")]
+        [LocalizedDescription("DockPanel_DockPanelSkin")]
+        public DockPanelSkin Skin
+        {
+            get { return m_dockPanelSkin; }
+            set { m_dockPanelSkin = value; }
+        }
+
+        private DocumentTabStripLocation m_documentTabStripLocation = DocumentTabStripLocation.Top;
+        [DefaultValue(DocumentTabStripLocation.Top)]
+        [LocalizedCategory("Category_Docking")]
+        [LocalizedDescription("DockPanel_DocumentTabStripLocation")]
+        public DocumentTabStripLocation DocumentTabStripLocation
+        {
+            get { return m_documentTabStripLocation; }
+            set { m_documentTabStripLocation = value; }
+        }
+
+		[Browsable(false)]
+		public DockPanelExtender Extender
+		{
+			get	{	return m_extender;	}
+		}
+
+        [Browsable(false)]
+		public DockPanelExtender.IDockPaneFactory DockPaneFactory
+		{
+			get	{	return Extender.DockPaneFactory;	}
+		}
+
+        [Browsable(false)]
+		public DockPanelExtender.IFloatWindowFactory FloatWindowFactory
+		{
+			get	{	return Extender.FloatWindowFactory;	}
+		}
+
+		internal DockPanelExtender.IDockPaneCaptionFactory DockPaneCaptionFactory
+		{
+			get	{	return Extender.DockPaneCaptionFactory;	}
+		}
+
+		internal DockPanelExtender.IDockPaneStripFactory DockPaneStripFactory
+		{
+			get	{	return Extender.DockPaneStripFactory;	}
+		}
+
+		internal DockPanelExtender.IAutoHideStripFactory AutoHideStripFactory
+		{
+			get	{	return Extender.AutoHideStripFactory;	}
+		}
+
+		[Browsable(false)]
+		public DockPaneCollection Panes
+		{
+			get	{	return m_panes;	}
+		}
+
+		internal Rectangle DockArea
+		{
+			get
+			{
+				return new Rectangle(DockPadding.Left, DockPadding.Top,
+					ClientRectangle.Width - DockPadding.Left - DockPadding.Right,
+					ClientRectangle.Height - DockPadding.Top - DockPadding.Bottom);
+			}
+		}
+
+		private double m_dockBottomPortion = 0.25;
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockPanel_DockBottomPortion_Description")]
+		[DefaultValue(0.25)]
+		public double DockBottomPortion
+		{
+			get	{	return m_dockBottomPortion;	}
+			set
+			{
+				if (value <= 0)
+					throw new ArgumentOutOfRangeException("value");
+
+				if (value == m_dockBottomPortion)
+					return;
+
+				m_dockBottomPortion = value;
+
+                if (m_dockBottomPortion < 1 && m_dockTopPortion < 1)
+                {
+                    if (m_dockTopPortion + m_dockBottomPortion > 1)
+                        m_dockTopPortion = 1 - m_dockBottomPortion;
+                }
+
+				PerformLayout();
+			}
+		}
+
+		private double m_dockLeftPortion = 0.25;
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockPanel_DockLeftPortion_Description")]
+		[DefaultValue(0.25)]
+		public double DockLeftPortion
+		{
+			get	{	return m_dockLeftPortion;	}
+			set
+			{
+				if (value <= 0)
+					throw new ArgumentOutOfRangeException("value");
+
+				if (value == m_dockLeftPortion)
+					return;
+
+				m_dockLeftPortion = value;
+
+                if (m_dockLeftPortion < 1 && m_dockRightPortion < 1)
+                {
+                    if (m_dockLeftPortion + m_dockRightPortion > 1)
+                        m_dockRightPortion = 1 - m_dockLeftPortion;
+                }
+				PerformLayout();
+			}
+		}
+
+		private double m_dockRightPortion = 0.25;
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockPanel_DockRightPortion_Description")]
+		[DefaultValue(0.25)]
+		public double DockRightPortion
+		{
+			get	{	return m_dockRightPortion;	}
+			set
+			{
+				if (value <= 0)
+					throw new ArgumentOutOfRangeException("value");
+
+				if (value == m_dockRightPortion)
+					return;
+
+				m_dockRightPortion = value;
+
+                if (m_dockLeftPortion < 1 && m_dockRightPortion < 1)
+                {
+                    if (m_dockLeftPortion + m_dockRightPortion > 1)
+                        m_dockLeftPortion = 1 - m_dockRightPortion;
+                }
+				PerformLayout();
+			}
+		}
+
+		private double m_dockTopPortion = 0.25;
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockPanel_DockTopPortion_Description")]
+		[DefaultValue(0.25)]
+		public double DockTopPortion
+		{
+			get	{	return m_dockTopPortion;	}
+			set
+			{
+				if (value <= 0)
+					throw new ArgumentOutOfRangeException("value");
+
+				if (value == m_dockTopPortion)
+					return;
+
+				m_dockTopPortion = value;
+
+                if (m_dockTopPortion < 1 && m_dockBottomPortion < 1)
+                {
+                    if (m_dockTopPortion + m_dockBottomPortion > 1)
+                        m_dockBottomPortion = 1 - m_dockTopPortion;
+                }
+				PerformLayout();
+			}
+		}
+
+		[Browsable(false)]
+		public DockWindowCollection DockWindows
+		{
+			get	{	return m_dockWindows;	}
+		}
+
+        public void UpdateDockWindowZOrder(DockStyle dockStyle, bool fullPanelEdge)
+        {
+            if (dockStyle == DockStyle.Left)
+            {
+                if (fullPanelEdge)
+                    DockWindows[DockState.DockLeft].SendToBack();
+                else
+                    DockWindows[DockState.DockLeft].BringToFront();
+            }
+            else if (dockStyle == DockStyle.Right)
+            {
+                if (fullPanelEdge)
+                    DockWindows[DockState.DockRight].SendToBack();
+                else
+                    DockWindows[DockState.DockRight].BringToFront();
+            }
+            else if (dockStyle == DockStyle.Top)
+            {
+                if (fullPanelEdge)
+                    DockWindows[DockState.DockTop].SendToBack();
+                else
+                    DockWindows[DockState.DockTop].BringToFront();
+            }
+            else if (dockStyle == DockStyle.Bottom)
+            {
+                if (fullPanelEdge)
+                    DockWindows[DockState.DockBottom].SendToBack();
+                else
+                    DockWindows[DockState.DockBottom].BringToFront();
+            }
+        }
+
+        [Browsable(false)]
+        public int DocumentsCount
+        {
+            get
+            {
+                int count = 0;
+                foreach (IDockContent content in Documents)
+                    count++;
+
+                return count;
+            }
+        }
+
+        public IDockContent[] DocumentsToArray()
+        {
+            int count = DocumentsCount;
+            IDockContent[] documents = new IDockContent[count];
+            int i = 0;
+            foreach (IDockContent content in Documents)
+            {
+                documents[i] = content;
+                i++;
+            }
+
+            return documents;
+        }
+
+        [Browsable(false)]
+		public IEnumerable<IDockContent> Documents
+		{
+            get
+            {
+                foreach (IDockContent content in Contents)
+                {
+                    if (content.DockHandler.DockState == DockState.Document)
+                        yield return content;
+                }
+            }
+		}
+
+		private Rectangle DocumentRectangle
+		{
+			get
+			{
+				Rectangle rect = DockArea;
+				if (DockWindows[DockState.DockLeft].VisibleNestedPanes.Count != 0)
+				{
+					rect.X += (int)(DockArea.Width * DockLeftPortion);
+					rect.Width -= (int)(DockArea.Width * DockLeftPortion);
+				}
+				if (DockWindows[DockState.DockRight].VisibleNestedPanes.Count != 0)
+					rect.Width -= (int)(DockArea.Width * DockRightPortion);
+				if (DockWindows[DockState.DockTop].VisibleNestedPanes.Count != 0)
+				{
+					rect.Y += (int)(DockArea.Height * DockTopPortion);
+					rect.Height -= (int)(DockArea.Height * DockTopPortion);
+				}
+				if (DockWindows[DockState.DockBottom].VisibleNestedPanes.Count != 0)
+					rect.Height -= (int)(DockArea.Height * DockBottomPortion);
+
+				return rect;
+			}
+		}
+
+		private Control DummyControl
+		{
+			get	{	return m_dummyControl;	}
+		}
+
+		[Browsable(false)]
+		public FloatWindowCollection FloatWindows
+		{
+			get	{	return m_floatWindows;	}
+		}
+
+        private Size m_defaultFloatWindowSize = new Size(300, 300);
+        [Category("Layout")]
+        [LocalizedDescription("DockPanel_DefaultFloatWindowSize_Description")]
+        public Size DefaultFloatWindowSize
+        {
+            get { return m_defaultFloatWindowSize; }
+            set { m_defaultFloatWindowSize = value; }
+        }
+        private bool ShouldSerializeDefaultFloatWindowSize()
+        {
+            return DefaultFloatWindowSize != new Size(300, 300);
+        }
+
+		private DocumentStyle m_documentStyle = DocumentStyle.DockingMdi;
+		[LocalizedCategory("Category_Docking")]
+		[LocalizedDescription("DockPanel_DocumentStyle_Description")]
+		[DefaultValue(DocumentStyle.DockingMdi)]
+		public DocumentStyle DocumentStyle
+		{
+			get	{	return m_documentStyle;	}
+			set
+			{
+				if (value == m_documentStyle)
+					return;
+
+				if (!Enum.IsDefined(typeof(DocumentStyle), value))
+					throw new InvalidEnumArgumentException();
+
+				if (value == DocumentStyle.SystemMdi && DockWindows[DockState.Document].VisibleNestedPanes.Count > 0)
+					throw new InvalidEnumArgumentException();
+
+				m_documentStyle = value;
+
+				SuspendLayout(true);
+
+                SetAutoHideWindowParent();
+				SetMdiClient();
+				InvalidateWindowRegion();
+
+				foreach (IDockContent content in Contents)
+				{
+					if (content.DockHandler.DockState == DockState.Document)
+						content.DockHandler.SetPaneAndVisible(content.DockHandler.Pane);
+				}
+
+                PerformMdiClientLayout();
+
+				ResumeLayout(true, true);
+			}
+		}
+
+        private int GetDockWindowSize(DockState dockState)
+        {
+            if (dockState == DockState.DockLeft || dockState == DockState.DockRight)
+            {
+                int width = ClientRectangle.Width - DockPadding.Left - DockPadding.Right;
+                int dockLeftSize = m_dockLeftPortion >= 1 ? (int)m_dockLeftPortion : (int)(width * m_dockLeftPortion);
+                int dockRightSize = m_dockRightPortion >= 1 ? (int)m_dockRightPortion : (int)(width * m_dockRightPortion);
+
+                if (dockLeftSize < MeasurePane.MinSize)
+                    dockLeftSize = MeasurePane.MinSize;
+                if (dockRightSize < MeasurePane.MinSize)
+                    dockRightSize = MeasurePane.MinSize;
+
+                if (dockLeftSize + dockRightSize > width - MeasurePane.MinSize)
+                {
+                    int adjust = (dockLeftSize + dockRightSize) - (width - MeasurePane.MinSize);
+                    dockLeftSize -= adjust / 2;
+                    dockRightSize -= adjust / 2;
+                }
+
+                return dockState == DockState.DockLeft ? dockLeftSize : dockRightSize;
+            }
+            else if (dockState == DockState.DockTop || dockState == DockState.DockBottom)
+            {
+                int height = ClientRectangle.Height - DockPadding.Top - DockPadding.Bottom;
+                int dockTopSize = m_dockTopPortion >= 1 ? (int)m_dockTopPortion : (int)(height * m_dockTopPortion);
+                int dockBottomSize = m_dockBottomPortion >= 1 ? (int)m_dockBottomPortion : (int)(height * m_dockBottomPortion);
+
+                if (dockTopSize < MeasurePane.MinSize)
+                    dockTopSize = MeasurePane.MinSize;
+                if (dockBottomSize < MeasurePane.MinSize)
+                    dockBottomSize = MeasurePane.MinSize;
+
+                if (dockTopSize + dockBottomSize > height - MeasurePane.MinSize)
+                {
+                    int adjust = (dockTopSize + dockBottomSize) - (height - MeasurePane.MinSize);
+                    dockTopSize -= adjust / 2;
+                    dockBottomSize -= adjust / 2;
+                }
+
+                return dockState == DockState.DockTop ? dockTopSize : dockBottomSize;
+            }
+            else
+                return 0;
+        }
+
+        protected override void OnLayout(LayoutEventArgs levent)
+		{
+			SuspendLayout(true);
+
+			AutoHideStripControl.Bounds = ClientRectangle;
+
+			CalculateDockPadding();
+
+            DockWindows[DockState.DockLeft].Width = GetDockWindowSize(DockState.DockLeft);
+			DockWindows[DockState.DockRight].Width = GetDockWindowSize(DockState.DockRight);
+			DockWindows[DockState.DockTop].Height = GetDockWindowSize(DockState.DockTop);
+			DockWindows[DockState.DockBottom].Height = GetDockWindowSize(DockState.DockBottom);
+
+			AutoHideWindow.Bounds = GetAutoHideWindowBounds(AutoHideWindowRectangle);
+
+			DockWindows[DockState.Document].BringToFront();
+			AutoHideWindow.BringToFront();
+
+			base.OnLayout(levent);
+
+            if (DocumentStyle == DocumentStyle.SystemMdi && MdiClientExists)
+            {
+                SetMdiClientBounds(SystemMdiClientBounds);
+                InvalidateWindowRegion();
+            }
+            else if (DocumentStyle == DocumentStyle.DockingMdi)
+                InvalidateWindowRegion();
+
+			ResumeLayout(true, true);
+		}
+
+		internal Rectangle GetTabStripRectangle(DockState dockState)
+		{
+			return AutoHideStripControl.GetTabStripRectangle(dockState);
+		}
+
+		protected override void OnPaint(PaintEventArgs e)
+		{
+			base.OnPaint(e);
+
+		    if (DockBackColor == BackColor) return;
+
+		    Graphics g = e.Graphics;
+		    SolidBrush bgBrush = new SolidBrush(DockBackColor);
+		    g.FillRectangle(bgBrush, ClientRectangle);
+		}
+
+		internal void AddContent(IDockContent content)
+		{
+			if (content == null)
+				throw(new ArgumentNullException());
+
+			if (!Contents.Contains(content))
+			{
+				Contents.Add(content);
+				OnContentAdded(new DockContentEventArgs(content));
+			}
+		}
+
+		internal void AddPane(DockPane pane)
+		{
+			if (Panes.Contains(pane))
+				return;
+
+			Panes.Add(pane);
+		}
+
+		internal void AddFloatWindow(FloatWindow floatWindow)
+		{
+			if (FloatWindows.Contains(floatWindow))
+				return;
+
+			FloatWindows.Add(floatWindow);
+		}
+
+		private void CalculateDockPadding()
+		{
+			DockPadding.All = 0;
+
+			int height = AutoHideStripControl.MeasureHeight();
+
+			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockLeftAutoHide) > 0)
+				DockPadding.Left = height;
+			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockRightAutoHide) > 0)
+				DockPadding.Right = height;
+			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockTopAutoHide) > 0)
+				DockPadding.Top = height;
+			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockBottomAutoHide) > 0)
+				DockPadding.Bottom = height;
+		}
+
+		internal void RemoveContent(IDockContent content)
+		{
+			if (content == null)
+				throw(new ArgumentNullException());
+			
+			if (Contents.Contains(content))
+			{
+				Contents.Remove(content);
+				OnContentRemoved(new DockContentEventArgs(content));
+			}
+		}
+
+		internal void RemovePane(DockPane pane)
+		{
+			if (!Panes.Contains(pane))
+				return;
+
+			Panes.Remove(pane);
+		}
+
+		internal void RemoveFloatWindow(FloatWindow floatWindow)
+		{
+			if (!FloatWindows.Contains(floatWindow))
+				return;
+
+			FloatWindows.Remove(floatWindow);
+		}
+
+		public void SetPaneIndex(DockPane pane, int index)
+		{
+			int oldIndex = Panes.IndexOf(pane);
+			if (oldIndex == -1)
+				throw(new ArgumentException(Strings.DockPanel_SetPaneIndex_InvalidPane));
+
+			if (index < 0 || index > Panes.Count - 1)
+				if (index != -1)
+					throw(new ArgumentOutOfRangeException(Strings.DockPanel_SetPaneIndex_InvalidIndex));
+				
+			if (oldIndex == index)
+				return;
+			if (oldIndex == Panes.Count - 1 && index == -1)
+				return;
+
+			Panes.Remove(pane);
+			if (index == -1)
+				Panes.Add(pane);
+			else if (oldIndex < index)
+				Panes.AddAt(pane, index - 1);
+			else
+				Panes.AddAt(pane, index);
+		}
+
+		public void SuspendLayout(bool allWindows)
+		{
+            FocusManager.SuspendFocusTracking();
+			SuspendLayout();
+			if (allWindows)
+				SuspendMdiClientLayout();
+		}
+
+		public void ResumeLayout(bool performLayout, bool allWindows)
+		{
+            FocusManager.ResumeFocusTracking();
+            ResumeLayout(performLayout);
+            if (allWindows)
+                ResumeMdiClientLayout(performLayout);
+		}
+
+	    internal Form ParentForm
+		{
+			get
+			{	
+				if (!IsParentFormValid())
+					throw new InvalidOperationException(Strings.DockPanel_ParentForm_Invalid);
+
+				return GetMdiClientController().ParentForm;
+			}
+		}
+
+		private bool IsParentFormValid()
+		{
+			if (DocumentStyle == DocumentStyle.DockingSdi || DocumentStyle == DocumentStyle.DockingWindow)
+				return true;
+
+            if (!MdiClientExists)
+                GetMdiClientController().RenewMdiClient();
+
+            return (MdiClientExists);
+		}
+
+		protected override void OnParentChanged(EventArgs e)
+		{
+            SetAutoHideWindowParent();
+            GetMdiClientController().ParentForm = (this.Parent as Form);
+			base.OnParentChanged (e);
+		}
+
+        private void SetAutoHideWindowParent()
+        {
+            Control parent;
+            if (DocumentStyle == DocumentStyle.DockingMdi ||
+                DocumentStyle == DocumentStyle.SystemMdi)
+                parent = this.Parent;
+            else
+                parent = this;
+            if (AutoHideWindow.Parent != parent)
+            {
+                AutoHideWindow.Parent = parent;
+                AutoHideWindow.BringToFront();
+            }
+        }
+
+		protected override void OnVisibleChanged(EventArgs e)
+		{
+			base.OnVisibleChanged (e);
+
+			if (Visible)
+				SetMdiClient();
+		}
+
+		private Rectangle SystemMdiClientBounds
+		{
+			get
+			{
+				if (!IsParentFormValid() || !Visible)
+					return Rectangle.Empty;
+
+				Rectangle rect = ParentForm.RectangleToClient(RectangleToScreen(DocumentWindowBounds));
+				return rect;
+			}
+		}
+
+		internal Rectangle DocumentWindowBounds
+		{
+			get
+			{
+				Rectangle rectDocumentBounds = DisplayRectangle;
+				if (DockWindows[DockState.DockLeft].Visible)
+				{
+					rectDocumentBounds.X += DockWindows[DockState.DockLeft].Width;
+					rectDocumentBounds.Width -= DockWindows[DockState.DockLeft].Width;
+				}
+				if (DockWindows[DockState.DockRight].Visible)
+					rectDocumentBounds.Width -= DockWindows[DockState.DockRight].Width;
+				if (DockWindows[DockState.DockTop].Visible)
+				{
+					rectDocumentBounds.Y += DockWindows[DockState.DockTop].Height;
+					rectDocumentBounds.Height -= DockWindows[DockState.DockTop].Height;
+				}
+				if (DockWindows[DockState.DockBottom].Visible)
+					rectDocumentBounds.Height -= DockWindows[DockState.DockBottom].Height;
+
+				return rectDocumentBounds;
+
+			}
+		}
+
+        private PaintEventHandler m_dummyControlPaintEventHandler = null;
+        private void InvalidateWindowRegion()
+        {
+            if (DesignMode)
+                return;
+
+            if (m_dummyControlPaintEventHandler == null)
+                m_dummyControlPaintEventHandler = new PaintEventHandler(DummyControl_Paint);
+
+            DummyControl.Paint += m_dummyControlPaintEventHandler;
+            DummyControl.Invalidate();
+        }
+
+        void DummyControl_Paint(object sender, PaintEventArgs e)
+        {
+            DummyControl.Paint -= m_dummyControlPaintEventHandler;
+            UpdateWindowRegion();
+        }
+
+		private void UpdateWindowRegion()
+		{
+			if (this.DocumentStyle == DocumentStyle.DockingMdi)
+				UpdateWindowRegion_ClipContent();
+			else if (this.DocumentStyle == DocumentStyle.DockingSdi ||
+				this.DocumentStyle == DocumentStyle.DockingWindow)
+				UpdateWindowRegion_FullDocumentArea();
+			else if (this.DocumentStyle == DocumentStyle.SystemMdi)
+				UpdateWindowRegion_EmptyDocumentArea();
+		}
+
+		private void UpdateWindowRegion_FullDocumentArea()
+		{
+			SetRegion(null);
+		}
+
+		private void UpdateWindowRegion_EmptyDocumentArea()
+		{
+			Rectangle rect = DocumentWindowBounds;
+			SetRegion(new Rectangle[] { rect });
+		}
+
+		private void UpdateWindowRegion_ClipContent()
+		{
+			int count = 0;
+			foreach (DockPane pane in this.Panes)
+			{
+				if (!pane.Visible || pane.DockState != DockState.Document)
+					continue;
+
+				count ++;
+			}
+
+            if (count == 0)
+            {
+                SetRegion(null);
+                return;
+            }
+
+			Rectangle[] rects = new Rectangle[count];
+			int i = 0;
+			foreach (DockPane pane in this.Panes)
+			{
+				if (!pane.Visible || pane.DockState != DockState.Document)
+					continue;
+
+                rects[i] = RectangleToClient(pane.RectangleToScreen(pane.ContentRectangle));
+				i++;
+			}
+
+			SetRegion(rects);
+		}
+
+		private Rectangle[] m_clipRects = null;
+		private void SetRegion(Rectangle[] clipRects)
+		{
+			if (!IsClipRectsChanged(clipRects))
+				return;
+
+			m_clipRects = clipRects;
+
+			if (m_clipRects == null || m_clipRects.GetLength(0) == 0)
+				Region = null;
+			else
+			{
+				Region region = new Region(new Rectangle(0, 0, this.Width, this.Height));
+				foreach (Rectangle rect in m_clipRects)
+					region.Exclude(rect);
+				Region = region;
+			}
+		}
+
+		private bool IsClipRectsChanged(Rectangle[] clipRects)
+		{
+			if (clipRects == null && m_clipRects == null)
+				return false;
+			else if ((clipRects == null) != (m_clipRects == null))
+				return true;
+
+			foreach (Rectangle rect in clipRects)
+			{
+				bool matched = false;
+				foreach (Rectangle rect2 in m_clipRects)
+				{
+					if (rect == rect2)
+					{
+						matched = true;
+						break;
+					}
+				}
+				if (!matched)
+					return true;
+			}
+
+			foreach (Rectangle rect2 in m_clipRects)
+			{
+				bool matched = false;
+				foreach (Rectangle rect in clipRects)
+				{
+					if (rect == rect2)
+					{
+						matched = true;
+						break;
+					}
+				}
+				if (!matched)
+					return true;
+			}
+			return false;
+		}
+
+		private static readonly object ContentAddedEvent = new object();
+		[LocalizedCategory("Category_DockingNotification")]
+		[LocalizedDescription("DockPanel_ContentAdded_Description")]
+		public event EventHandler<DockContentEventArgs> ContentAdded
+		{
+			add	{	Events.AddHandler(ContentAddedEvent, value);	}
+			remove	{	Events.RemoveHandler(ContentAddedEvent, value);	}
+		}
+		protected virtual void OnContentAdded(DockContentEventArgs e)
+		{
+			EventHandler<DockContentEventArgs> handler = (EventHandler<DockContentEventArgs>)Events[ContentAddedEvent];
+			if (handler != null)
+				handler(this, e);
+		}
+
+		private static readonly object ContentRemovedEvent = new object();
+		[LocalizedCategory("Category_DockingNotification")]
+		[LocalizedDescription("DockPanel_ContentRemoved_Description")]
+		public event EventHandler<DockContentEventArgs> ContentRemoved
+		{
+			add	{	Events.AddHandler(ContentRemovedEvent, value);	}
+			remove	{	Events.RemoveHandler(ContentRemovedEvent, value);	}
+		}
+		protected virtual void OnContentRemoved(DockContentEventArgs e)
+		{
+			EventHandler<DockContentEventArgs> handler = (EventHandler<DockContentEventArgs>)Events[ContentRemovedEvent];
+			if (handler != null)
+				handler(this, e);
+		}
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelExtender.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelExtender.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelExtender.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,225 @@
+using System;
+using System.Drawing;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public sealed class DockPanelExtender
+	{
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        public interface IDockPaneFactory
+		{
+			DockPane CreateDockPane(IDockContent content, DockState visibleState, bool show);
+            [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]            
+			DockPane CreateDockPane(IDockContent content, FloatWindow floatWindow, bool show);
+			DockPane CreateDockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion, bool show);
+            [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]            
+			DockPane CreateDockPane(IDockContent content, Rectangle floatWindowBounds, bool show);
+		}
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        public interface IFloatWindowFactory
+		{
+			FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane);
+			FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds);
+		}
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        public interface IDockPaneCaptionFactory
+		{
+			DockPaneCaptionBase CreateDockPaneCaption(DockPane pane);
+		}
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        public interface IDockPaneStripFactory
+		{
+			DockPaneStripBase CreateDockPaneStrip(DockPane pane);
+		}
+
+        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+        public interface IAutoHideStripFactory
+		{
+			AutoHideStripBase CreateAutoHideStrip(DockPanel panel);
+		}
+
+		#region DefaultDockPaneFactory
+		private class DefaultDockPaneFactory : IDockPaneFactory
+		{
+			public DockPane CreateDockPane(IDockContent content, DockState visibleState, bool show)
+			{
+				return new DockPane(content, visibleState, show);
+			}
+
+			public DockPane CreateDockPane(IDockContent content, FloatWindow floatWindow, bool show)
+			{
+				return new DockPane(content, floatWindow, show);
+			}
+
+			public DockPane CreateDockPane(IDockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show)
+			{
+				return new DockPane(content, prevPane, alignment, proportion, show);
+			}
+
+			public DockPane CreateDockPane(IDockContent content, Rectangle floatWindowBounds, bool show)
+			{
+				return new DockPane(content, floatWindowBounds, show);
+			}
+		}
+		#endregion
+
+		#region DefaultFloatWindowFactory
+		private class DefaultFloatWindowFactory : IFloatWindowFactory
+		{
+			public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane)
+			{
+				return new FloatWindow(dockPanel, pane);
+			}
+
+			public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds)
+			{
+				return new FloatWindow(dockPanel, pane, bounds);
+			}
+		}
+		#endregion
+
+		#region DefaultDockPaneCaptionFactory
+		private class DefaultDockPaneCaptionFactory : IDockPaneCaptionFactory
+		{
+			public DockPaneCaptionBase CreateDockPaneCaption(DockPane pane)
+			{
+				return new VS2005DockPaneCaption(pane);
+			}
+		}
+		#endregion
+
+		#region DefaultDockPaneTabStripFactory
+		private class DefaultDockPaneStripFactory : IDockPaneStripFactory
+		{
+			public DockPaneStripBase CreateDockPaneStrip(DockPane pane)
+			{
+				return new VS2005DockPaneStrip(pane);
+			}
+		}
+		#endregion
+
+		#region DefaultAutoHideStripFactory
+		private class DefaultAutoHideStripFactory : IAutoHideStripFactory
+		{
+			public AutoHideStripBase CreateAutoHideStrip(DockPanel panel)
+			{
+				return new VS2005AutoHideStrip(panel);
+			}
+		}
+		#endregion
+
+		internal DockPanelExtender(DockPanel dockPanel)
+		{
+			m_dockPanel = dockPanel;
+		}
+
+		private DockPanel m_dockPanel;
+		private DockPanel DockPanel
+		{
+			get	{	return m_dockPanel;	}
+		}
+
+		private IDockPaneFactory m_dockPaneFactory = null;
+		public IDockPaneFactory DockPaneFactory
+		{
+			get
+			{
+				if (m_dockPaneFactory == null)
+					m_dockPaneFactory = new DefaultDockPaneFactory();
+
+				return m_dockPaneFactory;
+			}
+			set
+			{
+				if (DockPanel.Panes.Count > 0)
+					throw new InvalidOperationException();
+
+				m_dockPaneFactory = value;
+			}
+		}
+
+		private IFloatWindowFactory m_floatWindowFactory = null;
+		public IFloatWindowFactory FloatWindowFactory
+		{
+			get
+			{
+				if (m_floatWindowFactory == null)
+					m_floatWindowFactory = new DefaultFloatWindowFactory();
+
+				return m_floatWindowFactory;
+			}
+			set
+			{
+				if (DockPanel.FloatWindows.Count > 0)
+					throw new InvalidOperationException();
+
+				m_floatWindowFactory = value;
+			}
+		}
+
+		private IDockPaneCaptionFactory m_dockPaneCaptionFactory = null;
+		public IDockPaneCaptionFactory DockPaneCaptionFactory
+		{	
+			get
+			{
+				if (m_dockPaneCaptionFactory == null)
+					m_dockPaneCaptionFactory = new DefaultDockPaneCaptionFactory();
+
+				return m_dockPaneCaptionFactory;
+			}
+			set
+			{
+				if (DockPanel.Panes.Count > 0)
+					throw new InvalidOperationException();
+
+				m_dockPaneCaptionFactory = value;
+			}
+		}
+
+		private IDockPaneStripFactory m_dockPaneStripFactory = null;
+		public IDockPaneStripFactory DockPaneStripFactory
+		{
+			get
+			{
+				if (m_dockPaneStripFactory == null)
+					m_dockPaneStripFactory = new DefaultDockPaneStripFactory();
+
+				return m_dockPaneStripFactory;
+			}
+			set
+			{
+				if (DockPanel.Contents.Count > 0)
+					throw new InvalidOperationException();
+
+				m_dockPaneStripFactory = value;
+			}
+		}
+
+		private IAutoHideStripFactory m_autoHideStripFactory = null;
+		public IAutoHideStripFactory AutoHideStripFactory
+		{	
+			get
+			{
+				if (m_autoHideStripFactory == null)
+					m_autoHideStripFactory = new DefaultAutoHideStripFactory();
+
+				return m_autoHideStripFactory;
+			}
+			set
+			{
+				if (DockPanel.Contents.Count > 0)
+					throw new InvalidOperationException();
+
+				if (m_autoHideStripFactory == value)
+					return;
+
+				m_autoHideStripFactory = value;
+                DockPanel.ResetAutoHideStripControl();
+			}
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelSkin.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelSkin.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockPanelSkin.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,445 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Design;
+using System.Windows.Forms.Design;
+using System.ComponentModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    #region DockPanelSkin classes
+    /// <summary>
+    /// The skin to use when displaying the DockPanel.
+    /// The skin allows custom gradient color schemes to be used when drawing the
+    /// DockStrips and Tabs.
+    /// </summary>
+    [TypeConverter(typeof(DockPanelSkinConverter))]
+    public class DockPanelSkin
+    {
+        private AutoHideStripSkin m_autoHideStripSkin;
+        private DockPaneStripSkin m_dockPaneStripSkin;
+
+        public DockPanelSkin()
+        {
+            m_autoHideStripSkin = new AutoHideStripSkin();
+            m_dockPaneStripSkin = new DockPaneStripSkin();
+        }
+
+        /// <summary>
+        /// The skin used to display the auto hide strips and tabs.
+        /// </summary>
+        public AutoHideStripSkin AutoHideStripSkin
+        {
+            get { return m_autoHideStripSkin; }
+            set { m_autoHideStripSkin = value; }
+        }
+
+        /// <summary>
+        /// The skin used to display the Document and ToolWindow style DockStrips and Tabs.
+        /// </summary>
+        public DockPaneStripSkin DockPaneStripSkin
+        {
+            get { return m_dockPaneStripSkin; }
+            set { m_dockPaneStripSkin = value; }
+        }
+    }
+
+    /// <summary>
+    /// The skin used to display the auto hide strip and tabs.
+    /// </summary>
+    [TypeConverter(typeof(AutoHideStripConverter))]
+    public class AutoHideStripSkin
+    {
+        private DockPanelGradient m_dockStripGradient;
+        private TabGradient m_TabGradient;
+        private Font m_textFont;
+
+        public AutoHideStripSkin()
+        {
+            m_dockStripGradient = new DockPanelGradient();
+            m_dockStripGradient.StartColor = SystemColors.ControlLight;
+            m_dockStripGradient.EndColor = SystemColors.ControlLight;
+
+            m_TabGradient = new TabGradient();
+            m_TabGradient.TextColor = SystemColors.ControlDarkDark;
+
+            m_textFont = SystemFonts.MenuFont;
+        }
+
+        /// <summary>
+        /// The gradient color skin for the DockStrips.
+        /// </summary>
+        public DockPanelGradient DockStripGradient
+        {
+            get { return m_dockStripGradient; }
+            set { m_dockStripGradient = value; }
+        }
+
+        /// <summary>
+        /// The gradient color skin for the Tabs.
+        /// </summary>
+        public TabGradient TabGradient
+        {
+            get { return m_TabGradient; }
+            set { m_TabGradient = value; }
+        }
+
+        /// <summary>
+        /// Font used in AutoHideStrip elements.
+        /// </summary>
+        public Font TextFont
+        {
+            get { return m_textFont; }
+            set { m_textFont = value; }
+        }
+    }
+
+    /// <summary>
+    /// The skin used to display the document and tool strips and tabs.
+    /// </summary>
+    [TypeConverter(typeof(DockPaneStripConverter))]
+    public class DockPaneStripSkin
+    {
+        private DockPaneStripGradient m_DocumentGradient;
+        private DockPaneStripToolWindowGradient m_ToolWindowGradient;
+        private Font m_textFont;
+
+        public DockPaneStripSkin()
+        {
+            m_DocumentGradient = new DockPaneStripGradient();
+            m_DocumentGradient.DockStripGradient.StartColor = SystemColors.Control;
+            m_DocumentGradient.DockStripGradient.EndColor = SystemColors.Control;
+            m_DocumentGradient.ActiveTabGradient.StartColor = SystemColors.ControlLightLight;
+            m_DocumentGradient.ActiveTabGradient.EndColor = SystemColors.ControlLightLight;
+            m_DocumentGradient.InactiveTabGradient.StartColor = SystemColors.ControlLight;
+            m_DocumentGradient.InactiveTabGradient.EndColor = SystemColors.ControlLight;
+
+            m_ToolWindowGradient = new DockPaneStripToolWindowGradient();
+            m_ToolWindowGradient.DockStripGradient.StartColor = SystemColors.ControlLight;
+            m_ToolWindowGradient.DockStripGradient.EndColor = SystemColors.ControlLight;
+
+            m_ToolWindowGradient.ActiveTabGradient.StartColor = SystemColors.Control;
+            m_ToolWindowGradient.ActiveTabGradient.EndColor = SystemColors.Control;
+
+            m_ToolWindowGradient.InactiveTabGradient.StartColor = Color.Transparent;
+            m_ToolWindowGradient.InactiveTabGradient.EndColor = Color.Transparent;
+            m_ToolWindowGradient.InactiveTabGradient.TextColor = SystemColors.ControlDarkDark;
+
+            m_ToolWindowGradient.ActiveCaptionGradient.StartColor = SystemColors.GradientActiveCaption;
+            m_ToolWindowGradient.ActiveCaptionGradient.EndColor = SystemColors.ActiveCaption;
+            m_ToolWindowGradient.ActiveCaptionGradient.LinearGradientMode = LinearGradientMode.Vertical;
+            m_ToolWindowGradient.ActiveCaptionGradient.TextColor = SystemColors.ActiveCaptionText;
+
+            m_ToolWindowGradient.InactiveCaptionGradient.StartColor = SystemColors.GradientInactiveCaption;
+            m_ToolWindowGradient.InactiveCaptionGradient.EndColor = SystemColors.InactiveCaption;
+            m_ToolWindowGradient.InactiveCaptionGradient.LinearGradientMode = LinearGradientMode.Vertical;
+            m_ToolWindowGradient.InactiveCaptionGradient.TextColor = SystemColors.InactiveCaptionText;
+
+            m_textFont = SystemFonts.MenuFont;
+        }
+
+        /// <summary>
+        /// The skin used to display the Document style DockPane strip and tab.
+        /// </summary>
+        public DockPaneStripGradient DocumentGradient
+        {
+            get { return m_DocumentGradient; }
+            set { m_DocumentGradient = value; }
+        }
+
+        /// <summary>
+        /// The skin used to display the ToolWindow style DockPane strip and tab.
+        /// </summary>
+        public DockPaneStripToolWindowGradient ToolWindowGradient
+        {
+            get { return m_ToolWindowGradient; }
+            set { m_ToolWindowGradient = value; }
+        }
+
+        /// <summary>
+        /// Font used in DockPaneStrip elements.
+        /// </summary>
+        public Font TextFont
+        {
+            get { return m_textFont; }
+            set { m_textFont = value; }
+        }
+    }
+
+    /// <summary>
+    /// The skin used to display the DockPane ToolWindow strip and tab.
+    /// </summary>
+    [TypeConverter(typeof(DockPaneStripGradientConverter))]
+    public class DockPaneStripToolWindowGradient : DockPaneStripGradient
+    {
+        private TabGradient m_activeCaptionGradient;
+        private TabGradient m_inactiveCaptionGradient;
+
+        public DockPaneStripToolWindowGradient()
+        {
+            m_activeCaptionGradient = new TabGradient();
+            m_inactiveCaptionGradient = new TabGradient();
+        }
+
+        /// <summary>
+        /// The skin used to display the active ToolWindow caption.
+        /// </summary>
+        public TabGradient ActiveCaptionGradient
+        {
+            get { return m_activeCaptionGradient; }
+            set { m_activeCaptionGradient = value; }
+        }
+
+        /// <summary>
+        /// The skin used to display the inactive ToolWindow caption.
+        /// </summary>
+        public TabGradient InactiveCaptionGradient
+        {
+            get { return m_inactiveCaptionGradient; }
+            set { m_inactiveCaptionGradient = value; }
+        }
+    }
+
+    /// <summary>
+    /// The skin used to display the DockPane strip and tab.
+    /// </summary>
+    [TypeConverter(typeof(DockPaneStripGradientConverter))]
+    public class DockPaneStripGradient
+    {
+        private DockPanelGradient m_dockStripGradient;
+        private TabGradient m_activeTabGradient;
+        private TabGradient m_inactiveTabGradient;
+
+        public DockPaneStripGradient()
+        {
+            m_dockStripGradient = new DockPanelGradient();
+            m_activeTabGradient = new TabGradient();
+            m_inactiveTabGradient = new TabGradient();
+        }
+
+        /// <summary>
+        /// The gradient color skin for the DockStrip.
+        /// </summary>
+        public DockPanelGradient DockStripGradient
+        {
+            get { return m_dockStripGradient; }
+            set { m_dockStripGradient = value; }
+        }
+
+        /// <summary>
+        /// The skin used to display the active DockPane tabs.
+        /// </summary>
+        public TabGradient ActiveTabGradient
+        {
+            get { return m_activeTabGradient; }
+            set { m_activeTabGradient = value; }
+        }
+
+        /// <summary>
+        /// The skin used to display the inactive DockPane tabs.
+        /// </summary>
+        public TabGradient InactiveTabGradient
+        {
+            get { return m_inactiveTabGradient; }
+            set { m_inactiveTabGradient = value; }
+        }
+    }
+
+    /// <summary>
+    /// The skin used to display the dock pane tab
+    /// </summary>
+    [TypeConverter(typeof(DockPaneTabGradientConverter))]
+    public class TabGradient : DockPanelGradient
+    {
+        private Color m_textColor;
+
+        public TabGradient()
+        {
+            m_textColor = SystemColors.ControlText;
+        }
+
+        /// <summary>
+        /// The text color.
+        /// </summary>
+        [DefaultValue(typeof(SystemColors), "ControlText")]
+        public Color TextColor
+        {
+            get { return m_textColor; }
+            set { m_textColor = value; }
+        }
+    }
+
+    /// <summary>
+    /// The gradient color skin.
+    /// </summary>
+    [TypeConverter(typeof(DockPanelGradientConverter))]
+    public class DockPanelGradient
+    {
+        private Color m_startColor;
+        private Color m_endColor;
+        private LinearGradientMode m_linearGradientMode;
+
+        public DockPanelGradient()
+        {
+            m_startColor = SystemColors.Control;
+            m_endColor = SystemColors.Control;
+            m_linearGradientMode = LinearGradientMode.Horizontal;
+        }
+
+        /// <summary>
+        /// The beginning gradient color.
+        /// </summary>
+        [DefaultValue(typeof(SystemColors), "Control")]
+        public Color StartColor
+        {
+            get { return m_startColor; }
+            set { m_startColor = value; }
+        }
+
+        /// <summary>
+        /// The ending gradient color.
+        /// </summary>
+        [DefaultValue(typeof(SystemColors), "Control")]
+        public Color EndColor
+        {
+            get { return m_endColor; }
+            set { m_endColor = value; }
+        }
+
+        /// <summary>
+        /// The gradient mode to display the colors.
+        /// </summary>
+        [DefaultValue(LinearGradientMode.Horizontal)]
+        public LinearGradientMode LinearGradientMode
+        {
+            get { return m_linearGradientMode; }
+            set { m_linearGradientMode = value; }
+        }
+    }
+
+    #endregion
+
+    #region Converters
+    public class DockPanelSkinConverter : ExpandableObjectConverter
+    {
+        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+        {
+            if (destinationType == typeof(DockPanelSkin))
+                return true;
+
+            return base.CanConvertTo(context, destinationType);
+        }
+
+        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+        {
+            if (destinationType == typeof(String) && value is DockPanelSkin)
+            {
+                return "DockPanelSkin";
+            }
+            return base.ConvertTo(context, culture, value, destinationType);
+        }
+    }
+
+    public class DockPanelGradientConverter : ExpandableObjectConverter
+    {
+        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+        {
+            if (destinationType == typeof(DockPanelGradient))
+                return true;
+
+            return base.CanConvertTo(context, destinationType);
+        }
+
+        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+        {
+            if (destinationType == typeof(String) && value is DockPanelGradient)
+            {
+                return "DockPanelGradient";
+            }
+            return base.ConvertTo(context, culture, value, destinationType);
+        }
+    }
+
+    public class AutoHideStripConverter : ExpandableObjectConverter
+    {
+        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+        {
+            if (destinationType == typeof(AutoHideStripSkin))
+                return true;
+
+            return base.CanConvertTo(context, destinationType);
+        }
+
+        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+        {
+            if (destinationType == typeof(String) && value is AutoHideStripSkin)
+            {
+                return "AutoHideStripSkin";
+            }
+            return base.ConvertTo(context, culture, value, destinationType);
+        }
+    }
+
+    public class DockPaneStripConverter : ExpandableObjectConverter
+    {
+        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+        {
+            if (destinationType == typeof(DockPaneStripSkin))
+                return true;
+
+            return base.CanConvertTo(context, destinationType);
+        }
+
+        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+        {
+            if (destinationType == typeof(String) && value is DockPaneStripSkin)
+            {
+                return "DockPaneStripSkin";
+            }
+            return base.ConvertTo(context, culture, value, destinationType);
+        }
+    }
+
+    public class DockPaneStripGradientConverter : ExpandableObjectConverter
+    {
+        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+        {
+            if (destinationType == typeof(DockPaneStripGradient))
+                return true;
+
+            return base.CanConvertTo(context, destinationType);
+        }
+
+        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+        {
+            if (destinationType == typeof(String) && value is DockPaneStripGradient)
+            {
+                return "DockPaneStripGradient";
+            }
+            return base.ConvertTo(context, culture, value, destinationType);
+        }
+    }
+
+    public class DockPaneTabGradientConverter : ExpandableObjectConverter
+    {
+        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+        {
+            if (destinationType == typeof(TabGradient))
+                return true;
+
+            return base.CanConvertTo(context, destinationType);
+        }
+
+        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+        {
+            if (destinationType == typeof(String) && value is TabGradient)
+            {
+                return "DockPaneTabGradient";
+            }
+            return base.ConvertTo(context, culture, value, destinationType);
+        }
+    }
+    #endregion
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.SplitterControl.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.SplitterControl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.SplitterControl.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,28 @@
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    public partial class DockWindow
+    {
+        private class SplitterControl : SplitterBase
+        {
+            protected override int SplitterSize
+            {
+                get { return Measures.SplitterSize; }
+            }
+
+            protected override void StartDrag()
+            {
+                DockWindow window = Parent as DockWindow;
+                if (window == null)
+                    return;
+
+                window.DockPanel.BeginDrag(window, window.RectangleToScreen(Bounds));
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindow.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,243 @@
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.ComponentModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	[ToolboxItem(false)]
+	public partial class DockWindow : Panel, INestedPanesContainer, ISplitterDragSource
+	{
+		private DockPanel m_dockPanel;
+		private DockState m_dockState;
+		private SplitterControl m_splitter;
+		private NestedPaneCollection m_nestedPanes;
+
+		internal DockWindow(DockPanel dockPanel, DockState dockState)
+		{
+			m_nestedPanes = new NestedPaneCollection(this);
+			m_dockPanel = dockPanel;
+			m_dockState = dockState;
+			Visible = false;
+
+			SuspendLayout();
+
+			if (DockState == DockState.DockLeft || DockState == DockState.DockRight ||
+				DockState == DockState.DockTop || DockState == DockState.DockBottom)
+			{
+				m_splitter = new SplitterControl();
+				Controls.Add(m_splitter);
+			}
+
+			if (DockState == DockState.DockLeft)
+			{
+				Dock = DockStyle.Left;
+				m_splitter.Dock = DockStyle.Right;
+			}
+			else if (DockState == DockState.DockRight)
+			{
+				Dock = DockStyle.Right;
+				m_splitter.Dock = DockStyle.Left;
+			}
+			else if (DockState == DockState.DockTop)
+			{
+				Dock = DockStyle.Top;
+				m_splitter.Dock = DockStyle.Bottom;
+			}
+			else if (DockState == DockState.DockBottom)
+			{
+				Dock = DockStyle.Bottom;
+				m_splitter.Dock = DockStyle.Top;
+			}
+			else if (DockState == DockState.Document)
+			{
+				Dock = DockStyle.Fill;
+			}
+
+			ResumeLayout();
+		}
+
+		public VisibleNestedPaneCollection VisibleNestedPanes
+		{
+			get	{	return NestedPanes.VisibleNestedPanes;	}
+		}
+
+		public NestedPaneCollection NestedPanes
+		{
+			get	{	return m_nestedPanes;	}
+		}
+
+		public DockPanel DockPanel
+		{
+			get	{	return m_dockPanel;	}
+		}
+
+		public DockState DockState
+		{
+			get	{	return m_dockState;	}
+		}
+
+		public bool IsFloat
+		{
+			get	{	return DockState == DockState.Float;	}
+		}
+
+		internal DockPane DefaultPane
+		{
+			get	{	return VisibleNestedPanes.Count == 0 ? null : VisibleNestedPanes[0];	}
+		}
+
+		public virtual Rectangle DisplayingRectangle
+		{
+			get
+			{
+				Rectangle rect = ClientRectangle;
+				// if DockWindow is document, exclude the border
+				if (DockState == DockState.Document)
+				{
+					rect.X += 1;
+					rect.Y += 1;
+					rect.Width -= 2;
+					rect.Height -= 2;
+				}
+				// exclude the splitter
+				else if (DockState == DockState.DockLeft)
+					rect.Width -= Measures.SplitterSize;
+				else if (DockState == DockState.DockRight)
+				{
+					rect.X += Measures.SplitterSize;
+					rect.Width -= Measures.SplitterSize;
+				}
+				else if (DockState == DockState.DockTop)
+					rect.Height -= Measures.SplitterSize;
+				else if (DockState == DockState.DockBottom)
+				{
+					rect.Y += Measures.SplitterSize;
+					rect.Height -= Measures.SplitterSize;
+				}
+
+				return rect;
+			}
+		}
+
+		protected override void OnPaint(PaintEventArgs e)
+		{
+			// if DockWindow is document, draw the border
+            if (DockState == DockState.Document)
+                e.Graphics.DrawRectangle(SystemPens.ControlDark, ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width - 1, ClientRectangle.Height - 1);
+
+			base.OnPaint(e);
+		}
+
+		protected override void OnLayout(LayoutEventArgs levent)
+		{
+			VisibleNestedPanes.Refresh();
+			if (VisibleNestedPanes.Count == 0)
+			{
+                if (Visible)
+                    Visible = false;
+			}
+			else if (!Visible)
+			{
+				Visible = true;
+				VisibleNestedPanes.Refresh();
+			}
+
+			base.OnLayout (levent);
+		}
+
+        #region ISplitterDragSource Members
+
+        void ISplitterDragSource.BeginDrag(Rectangle rectSplitter)
+        {
+        }
+
+        void ISplitterDragSource.EndDrag()
+        {
+        }
+
+        bool ISplitterDragSource.IsVertical
+        {
+            get { return (DockState == DockState.DockLeft || DockState == DockState.DockRight); }
+        }
+
+        Rectangle ISplitterDragSource.DragLimitBounds
+        {
+            get
+            {
+                Rectangle rectLimit = DockPanel.DockArea;
+                Point location;
+                if ((Control.ModifierKeys & Keys.Shift) == 0)
+                    location = Location;
+                else
+                    location = DockPanel.DockArea.Location;
+
+                if (((ISplitterDragSource)this).IsVertical)
+                {
+                    rectLimit.X += MeasurePane.MinSize;
+                    rectLimit.Width -= 2 * MeasurePane.MinSize;
+                    rectLimit.Y = location.Y;
+                    if ((Control.ModifierKeys & Keys.Shift) == 0)
+                        rectLimit.Height = Height;
+                }
+                else
+                {
+                    rectLimit.Y += MeasurePane.MinSize;
+                    rectLimit.Height -= 2 * MeasurePane.MinSize;
+                    rectLimit.X = location.X;
+                    if ((Control.ModifierKeys & Keys.Shift) == 0)
+                        rectLimit.Width = Width;
+                }
+
+                return DockPanel.RectangleToScreen(rectLimit);
+            }
+        }
+
+        void ISplitterDragSource.MoveSplitter(int offset)
+        {
+            if ((Control.ModifierKeys & Keys.Shift) != 0)
+                SendToBack();
+
+            Rectangle rectDockArea = DockPanel.DockArea;
+            if (DockState == DockState.DockLeft && rectDockArea.Width > 0)
+            {
+                if (DockPanel.DockLeftPortion > 1)
+                    DockPanel.DockLeftPortion = Width + offset;
+                else
+                    DockPanel.DockLeftPortion += ((double)offset) / (double)rectDockArea.Width;
+            }
+            else if (DockState == DockState.DockRight && rectDockArea.Width > 0)
+            {
+                if (DockPanel.DockRightPortion > 1)
+                    DockPanel.DockRightPortion = Width - offset;
+                else
+                    DockPanel.DockRightPortion -= ((double)offset) / (double)rectDockArea.Width;
+            }
+            else if (DockState == DockState.DockBottom && rectDockArea.Height > 0)
+            {
+                if (DockPanel.DockBottomPortion > 1)
+                    DockPanel.DockBottomPortion = Height - offset;
+                else
+                    DockPanel.DockBottomPortion -= ((double)offset) / (double)rectDockArea.Height;
+            }
+            else if (DockState == DockState.DockTop && rectDockArea.Height > 0)
+            {
+                if (DockPanel.DockTopPortion > 1)
+                    DockPanel.DockTopPortion = Height + offset;
+                else
+                    DockPanel.DockTopPortion += ((double)offset) / (double)rectDockArea.Height;
+            }
+        }
+
+        #region IDragSource Members
+
+        Control IDragSource.DragControl
+        {
+            get { return this; }
+        }
+
+        #endregion
+        #endregion
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindowCollection.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindowCollection.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DockWindowCollection.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public class DockWindowCollection : ReadOnlyCollection<DockWindow>
+	{
+		internal DockWindowCollection(DockPanel dockPanel)
+            : base(new List<DockWindow>())
+		{
+			Items.Add(new DockWindow(dockPanel, DockState.Document));
+			Items.Add(new DockWindow(dockPanel, DockState.DockLeft));
+			Items.Add(new DockWindow(dockPanel, DockState.DockRight));
+			Items.Add(new DockWindow(dockPanel, DockState.DockTop));
+			Items.Add(new DockWindow(dockPanel, DockState.DockBottom));
+		}
+
+		public DockWindow this [DockState dockState]
+		{
+			get
+			{
+				if (dockState == DockState.Document)
+					return Items[0];
+				else if (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide)
+					return Items[1];
+				else if (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide)
+					return Items[2];
+				else if (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide)
+					return Items[3];
+				else if (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide)
+					return Items[4];
+
+				throw (new ArgumentOutOfRangeException());
+			}
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DragForm.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DragForm.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DragForm.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,65 @@
+using System;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	// Inspired by Chris Sano's article:
+	// http://msdn.microsoft.com/smartclient/default.aspx?pull=/library/en-us/dnwinforms/html/colorpicker.asp
+	// In Sano's article, the DragForm needs to meet the following criteria:
+	// (1) it was not to show up in the task bar;
+	//     ShowInTaskBar = false
+	// (2) it needed to be the top-most window;
+	//     TopMost = true (not necessary here)
+	// (3) its icon could not show up in the ALT+TAB window if the user pressed ALT+TAB during a drag-and-drop;
+	//     FormBorderStyle = FormBorderStyle.None;
+	//     Create with WS_EX_TOOLWINDOW window style.
+	//     Compares with the solution in the artile by setting FormBorderStyle as FixedToolWindow,
+	//     and then clip the window caption and border, this way is much simplier.
+	// (4) it was not to steal focus from the application when displayed.
+	//     User Win32 ShowWindow API with SW_SHOWNOACTIVATE
+	// In addition, this form should only for display and therefore should act as transparent, otherwise
+	// WindowFromPoint will return this form, instead of the control beneath. Need BOTH of the following to
+	// achieve this (don't know why, spent hours to try it out :( ):
+	//  1. Enabled = false;
+	//  2. WM_NCHITTEST returns HTTRANSPARENT
+	internal class DragForm : Form
+	{
+		public DragForm()
+		{
+			FormBorderStyle = FormBorderStyle.None;
+			ShowInTaskbar = false;
+			SetStyle(ControlStyles.Selectable, false);
+			Enabled = false;
+		}
+
+		protected override CreateParams CreateParams
+		{
+			get
+			{
+				CreateParams createParams = base.CreateParams;
+				createParams.ExStyle |= (int)Win32.WindowExStyles.WS_EX_TOOLWINDOW;
+				return createParams;
+			}
+		}
+
+		protected override void WndProc(ref Message m)
+		{
+			if (m.Msg == (int)Win32.Msgs.WM_NCHITTEST)
+			{
+				m.Result = (IntPtr)Win32.HitTest.HTTRANSPARENT;
+				return;
+			}
+
+			base.WndProc (ref m);
+		}
+
+		public virtual void Show(bool bActivate)
+		{
+			if (bActivate)
+				Show();
+			else
+                                if (!Win32Helper.IsRunningOnMono())
+				NativeMethods.ShowWindow(Handle, (int)Win32.ShowWindowStyles.SW_SHOWNOACTIVATE);
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DummyControl.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DummyControl.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/DummyControl.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,13 @@
+using System;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal class DummyControl : Control
+	{
+		public DummyControl()
+		{
+			SetStyle(ControlStyles.Selectable, false);
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Enums.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Enums.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Enums.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	[Flags]
+	[Serializable]
+	[Editor(typeof(DockAreasEditor), typeof(System.Drawing.Design.UITypeEditor))]
+	public enum DockAreas
+	{
+		Float = 1,
+		DockLeft = 2,
+		DockRight = 4,
+		DockTop = 8,
+		DockBottom = 16,
+		Document = 32
+	}
+
+	public enum DockState
+	{
+		Unknown = 0,
+		Float = 1,
+		DockTopAutoHide = 2,
+		DockLeftAutoHide = 3,
+		DockBottomAutoHide = 4,
+		DockRightAutoHide = 5,
+		Document = 6,
+		DockTop = 7,
+		DockLeft = 8,
+		DockBottom = 9,
+		DockRight = 10,
+		Hidden = 11
+	}
+
+	public enum DockAlignment
+	{
+		Left,
+		Right,
+		Top,
+		Bottom
+	}
+
+	public enum DocumentStyle
+	{
+		DockingMdi,
+		DockingWindow,
+		DockingSdi,
+		SystemMdi,
+	}
+
+    /// <summary>
+    /// The location to draw the DockPaneStrip for Document style windows.
+    /// </summary>
+    public enum DocumentTabStripLocation
+    {
+        Top,
+        Bottom
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindow.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindow.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindow.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,454 @@
+using System;
+using System.Collections;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public class FloatWindow : Form, INestedPanesContainer, IDockDragSource
+	{
+		private NestedPaneCollection m_nestedPanes;
+		internal const int WM_CHECKDISPOSE = (int)(Win32.Msgs.WM_USER + 1);
+
+		internal protected FloatWindow(DockPanel dockPanel, DockPane pane)
+		{
+			InternalConstruct(dockPanel, pane, false, Rectangle.Empty);
+		}
+
+		internal protected FloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds)
+		{
+			InternalConstruct(dockPanel, pane, true, bounds);
+		}
+
+		private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds)
+		{
+			if (dockPanel == null)
+				throw(new ArgumentNullException(Strings.FloatWindow_Constructor_NullDockPanel));
+
+			m_nestedPanes = new NestedPaneCollection(this);
+
+			FormBorderStyle = FormBorderStyle.SizableToolWindow;
+			ShowInTaskbar = false;
+            if (dockPanel.RightToLeft != RightToLeft)
+                RightToLeft = dockPanel.RightToLeft;
+            if (RightToLeftLayout != dockPanel.RightToLeftLayout)
+                RightToLeftLayout = dockPanel.RightToLeftLayout;
+			
+			SuspendLayout();
+            if (boundsSpecified)
+            {
+                Bounds = bounds;
+                StartPosition = FormStartPosition.Manual;
+            }
+            else
+            {
+                StartPosition = FormStartPosition.WindowsDefaultLocation;
+                Size = dockPanel.DefaultFloatWindowSize;
+            }
+
+			m_dockPanel = dockPanel;
+			Owner = DockPanel.FindForm();
+			DockPanel.AddFloatWindow(this);
+			if (pane != null)
+				pane.FloatWindow = this;
+
+			ResumeLayout();
+		}
+
+		protected override void Dispose(bool disposing)
+		{
+			if (disposing)
+			{
+				if (DockPanel != null)
+					DockPanel.RemoveFloatWindow(this);
+				m_dockPanel = null;
+			}
+			base.Dispose(disposing);
+		}
+
+		private bool m_allowEndUserDocking = true;
+		public bool AllowEndUserDocking
+		{
+			get	{	return m_allowEndUserDocking;	}
+			set	{	m_allowEndUserDocking = value;	}
+		}
+
+		public NestedPaneCollection NestedPanes
+		{
+			get	{	return m_nestedPanes;	}
+		}
+
+		public VisibleNestedPaneCollection VisibleNestedPanes
+		{
+			get	{	return NestedPanes.VisibleNestedPanes;	}
+		}
+
+		private DockPanel m_dockPanel;
+		public DockPanel DockPanel
+		{
+			get	{	return m_dockPanel;	}
+		}
+
+		public DockState DockState
+		{
+			get	{	return DockState.Float;	}
+		}
+	
+		public bool IsFloat
+		{
+			get	{	return DockState == DockState.Float;	}
+		}
+
+		internal bool IsDockStateValid(DockState dockState)
+		{
+			foreach (DockPane pane in NestedPanes)
+				foreach (IDockContent content in pane.Contents)
+					if (!DockHelper.IsDockStateValid(dockState, content.DockHandler.DockAreas))
+						return false;
+
+			return true;
+		}
+
+		protected override void OnActivated(EventArgs e)
+		{
+			DockPanel.FloatWindows.BringWindowToFront(this);
+			base.OnActivated (e);
+			// Propagate the Activated event to the visible panes content objects
+			foreach (DockPane pane in VisibleNestedPanes)
+				foreach (IDockContent content in pane.Contents)
+					content.OnActivated(e);
+		}
+
+		protected override void OnDeactivate(EventArgs e)
+		{
+			base.OnDeactivate(e);
+			// Propagate the Deactivate event to the visible panes content objects
+			foreach (DockPane pane in VisibleNestedPanes)
+				foreach (IDockContent content in pane.Contents)
+					content.OnDeactivate(e);
+		}
+
+		protected override void OnLayout(LayoutEventArgs levent)
+		{
+			VisibleNestedPanes.Refresh();
+			RefreshChanges();
+            Visible = (VisibleNestedPanes.Count > 0);
+            SetText();
+
+			base.OnLayout(levent);
+		}
+
+
+        [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.Windows.Forms.Control.set_Text(System.String)")]
+        internal void SetText()
+		{
+			DockPane theOnlyPane = (VisibleNestedPanes.Count == 1) ? VisibleNestedPanes[0] : null;
+
+			if (theOnlyPane == null)
+				Text = " ";	// use " " instead of string.Empty because the whole title bar will disappear when ControlBox is set to false.
+			else if (theOnlyPane.ActiveContent == null)
+				Text = " ";
+			else
+				Text = theOnlyPane.ActiveContent.DockHandler.TabText;
+		}
+
+		protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
+		{
+			Rectangle rectWorkArea = SystemInformation.VirtualScreen;
+
+			if (y + height > rectWorkArea.Bottom)
+				y -= (y + height) - rectWorkArea.Bottom;
+
+			if (y < rectWorkArea.Top)
+				y += rectWorkArea.Top - y;
+
+			base.SetBoundsCore (x, y, width, height, specified);
+		}
+
+        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+		protected override void WndProc(ref Message m)
+		{
+			if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDOWN)
+			{
+				if (IsDisposed)
+					return;
+
+				uint result = Win32Helper.IsRunningOnMono() ? 0 : NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
+				if (result == 2 && DockPanel.AllowEndUserDocking && this.AllowEndUserDocking)	// HITTEST_CAPTION
+				{
+					Activate();
+					m_dockPanel.BeginDrag(this);
+				}
+				else
+					base.WndProc(ref m);
+
+				return;
+			}
+            else if (m.Msg == (int)Win32.Msgs.WM_NCRBUTTONDOWN)
+            {
+                uint result = Win32Helper.IsRunningOnMono() ? 0 : NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
+                if (result == 2)	// HITTEST_CAPTION
+                {
+                    DockPane theOnlyPane = (VisibleNestedPanes.Count == 1) ? VisibleNestedPanes[0] : null;
+                    if (theOnlyPane != null && theOnlyPane.ActiveContent != null)
+                    {
+                        theOnlyPane.ShowTabPageContextMenu(this, PointToClient(Control.MousePosition));
+                        return;
+                    }
+                }
+
+                base.WndProc(ref m);
+                return;
+            }
+            else if (m.Msg == (int)Win32.Msgs.WM_CLOSE)
+            {
+                if (NestedPanes.Count == 0)
+                {
+                    base.WndProc(ref m);
+                    return;
+                }
+
+                for (int i = NestedPanes.Count - 1; i >= 0; i--)
+                {
+                    DockContentCollection contents = NestedPanes[i].Contents;
+                    for (int j = contents.Count - 1; j >= 0; j--)
+                    {
+                        IDockContent content = contents[j];
+                        if (content.DockHandler.DockState != DockState.Float)
+                            continue;
+
+                        if (!content.DockHandler.CloseButton)
+                            continue;
+
+                        if (content.DockHandler.HideOnClose)
+                            content.DockHandler.Hide();
+                        else
+                            content.DockHandler.Close();
+                    }
+                }
+
+                return;
+            }
+            else if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDBLCLK)
+            {
+                uint result = Win32Helper.IsRunningOnMono() ? 0: NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
+                if (result != 2)	// HITTEST_CAPTION
+                {
+                    base.WndProc(ref m);
+                    return;
+                }
+
+                DockPanel.SuspendLayout(true);
+
+                // Restore to panel
+                foreach (DockPane pane in NestedPanes)
+                {
+                    if (pane.DockState != DockState.Float)
+                        continue;
+                    pane.RestoreToPanel();
+                }
+
+
+                DockPanel.ResumeLayout(true, true);
+                return;
+            }
+            else if (m.Msg == WM_CHECKDISPOSE)
+            {
+                if (NestedPanes.Count == 0)
+                    Dispose();
+
+                return;
+            }
+
+			base.WndProc(ref m);
+		}
+
+		internal void RefreshChanges()
+		{
+            if (IsDisposed)
+                return;
+
+			if (VisibleNestedPanes.Count == 0)
+			{
+				ControlBox = true;
+				return;
+			}
+
+			for (int i=VisibleNestedPanes.Count - 1; i>=0; i--)
+			{
+				DockContentCollection contents = VisibleNestedPanes[i].Contents;
+				for (int j=contents.Count - 1; j>=0; j--)
+				{
+					IDockContent content = contents[j];
+					if (content.DockHandler.DockState != DockState.Float)
+						continue;
+
+					if (content.DockHandler.CloseButton && content.DockHandler.CloseButtonVisible)
+					{
+						ControlBox = true;
+						return;
+					}
+				}
+			}
+			//Only if there is a ControlBox do we turn it off
+			//old code caused a flash of the window.
+            if (ControlBox)
+				ControlBox = false;
+		}
+
+		public virtual Rectangle DisplayingRectangle
+		{
+			get	{	return ClientRectangle;	}
+		}
+
+		internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline)
+		{
+            if (VisibleNestedPanes.Count == 1)
+            {
+                DockPane pane = VisibleNestedPanes[0];
+                if (!dragSource.CanDockTo(pane))
+                    return;
+
+                Point ptMouse = Control.MousePosition;
+                uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y);
+                if (!Win32Helper.IsRunningOnMono())
+                if (NativeMethods.SendMessage(Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, lParam) == (uint)Win32.HitTest.HTCAPTION)
+                    dockOutline.Show(VisibleNestedPanes[0], -1);
+            }
+		}
+
+        #region IDockDragSource Members
+
+        #region IDragSource Members
+
+        Control IDragSource.DragControl
+        {
+            get { return this; }
+        }
+
+        #endregion
+
+        bool IDockDragSource.IsDockStateValid(DockState dockState)
+        {
+            return IsDockStateValid(dockState);
+        }
+
+        bool IDockDragSource.CanDockTo(DockPane pane)
+        {
+            if (!IsDockStateValid(pane.DockState))
+                return false;
+
+            if (pane.FloatWindow == this)
+                return false;
+
+            return true;
+        }
+
+        Rectangle IDockDragSource.BeginDrag(Point ptMouse)
+        {
+            return Bounds;
+        }
+
+        public  void FloatAt(Rectangle floatWindowBounds)
+        {
+            Bounds = floatWindowBounds;
+        }
+
+        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
+        {
+            if (dockStyle == DockStyle.Fill)
+            {
+                for (int i = NestedPanes.Count - 1; i >= 0; i--)
+                {
+                    DockPane paneFrom = NestedPanes[i];
+                    for (int j = paneFrom.Contents.Count - 1; j >= 0; j--)
+                    {
+                        IDockContent c = paneFrom.Contents[j];
+                        c.DockHandler.Pane = pane;
+                        if (contentIndex != -1)
+                            pane.SetContentIndex(c, contentIndex);
+                        c.DockHandler.Activate();
+                    }
+                }
+            }
+            else
+            {
+                DockAlignment alignment = DockAlignment.Left;
+                if (dockStyle == DockStyle.Left)
+                    alignment = DockAlignment.Left;
+                else if (dockStyle == DockStyle.Right)
+                    alignment = DockAlignment.Right;
+                else if (dockStyle == DockStyle.Top)
+                    alignment = DockAlignment.Top;
+                else if (dockStyle == DockStyle.Bottom)
+                    alignment = DockAlignment.Bottom;
+
+                MergeNestedPanes(VisibleNestedPanes, pane.NestedPanesContainer.NestedPanes, pane, alignment, 0.5);
+            }
+        }
+
+        public void DockTo(DockPanel panel, DockStyle dockStyle)
+        {
+            if (panel != DockPanel)
+                throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
+
+            NestedPaneCollection nestedPanesTo = null;
+
+            if (dockStyle == DockStyle.Top)
+                nestedPanesTo = DockPanel.DockWindows[DockState.DockTop].NestedPanes;
+            else if (dockStyle == DockStyle.Bottom)
+                nestedPanesTo = DockPanel.DockWindows[DockState.DockBottom].NestedPanes;
+            else if (dockStyle == DockStyle.Left)
+                nestedPanesTo = DockPanel.DockWindows[DockState.DockLeft].NestedPanes;
+            else if (dockStyle == DockStyle.Right)
+                nestedPanesTo = DockPanel.DockWindows[DockState.DockRight].NestedPanes;
+            else if (dockStyle == DockStyle.Fill)
+                nestedPanesTo = DockPanel.DockWindows[DockState.Document].NestedPanes;
+
+            DockPane prevPane = null;
+            for (int i = nestedPanesTo.Count - 1; i >= 0; i--)
+                if (nestedPanesTo[i] != VisibleNestedPanes[0])
+                    prevPane = nestedPanesTo[i];
+            MergeNestedPanes(VisibleNestedPanes, nestedPanesTo, prevPane, DockAlignment.Left, 0.5);
+        }
+
+        private static void MergeNestedPanes(VisibleNestedPaneCollection nestedPanesFrom, NestedPaneCollection nestedPanesTo, DockPane prevPane, DockAlignment alignment, double proportion)
+        {
+            if (nestedPanesFrom.Count == 0)
+                return;
+
+            int count = nestedPanesFrom.Count;
+            DockPane[] panes = new DockPane[count];
+            DockPane[] prevPanes = new DockPane[count];
+            DockAlignment[] alignments = new DockAlignment[count];
+            double[] proportions = new double[count];
+
+            for (int i = 0; i < count; i++)
+            {
+                panes[i] = nestedPanesFrom[i];
+                prevPanes[i] = nestedPanesFrom[i].NestedDockingStatus.PreviousPane;
+                alignments[i] = nestedPanesFrom[i].NestedDockingStatus.Alignment;
+                proportions[i] = nestedPanesFrom[i].NestedDockingStatus.Proportion;
+            }
+
+            DockPane pane = panes[0].DockTo(nestedPanesTo.Container, prevPane, alignment, proportion);
+            panes[0].DockState = nestedPanesTo.DockState;
+
+            for (int i = 1; i < count; i++)
+            {
+                for (int j = i; j < count; j++)
+                {
+                    if (prevPanes[j] == panes[i - 1])
+                        prevPanes[j] = pane;
+                }
+                pane = panes[i].DockTo(nestedPanesTo.Container, prevPanes[i], alignments[i], proportions[i]);
+                panes[i].DockState = nestedPanesTo.DockState;
+            }
+        }
+
+        #endregion
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindowCollection.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindowCollection.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/FloatWindowCollection.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public class FloatWindowCollection : ReadOnlyCollection<FloatWindow>
+	{
+		internal FloatWindowCollection()
+            : base(new List<FloatWindow>())
+		{
+		}
+
+		internal int Add(FloatWindow fw)
+		{
+			if (Items.Contains(fw))
+				return Items.IndexOf(fw);
+
+			Items.Add(fw);
+            return Count - 1;
+		}
+
+		internal void Dispose()
+		{
+			for (int i=Count - 1; i>=0; i--)
+				this[i].Close();
+		}
+
+		internal void Remove(FloatWindow fw)
+		{
+			Items.Remove(fw);
+		}
+
+		internal void BringWindowToFront(FloatWindow fw)
+		{
+			Items.Remove(fw);
+			Items.Add(fw);
+		}
+	}
+}


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DockHelper.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DockHelper.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DockHelper.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,105 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal static class DockHelper
+	{
+		public static bool IsDockStateAutoHide(DockState dockState)
+		{
+			if (dockState == DockState.DockLeftAutoHide ||
+				dockState == DockState.DockRightAutoHide ||
+				dockState == DockState.DockTopAutoHide ||
+				dockState == DockState.DockBottomAutoHide)
+				return true;
+			else
+				return false;
+		}
+
+		public static bool IsDockStateValid(DockState dockState, DockAreas dockableAreas)
+		{
+			if (((dockableAreas & DockAreas.Float) == 0) &&
+				(dockState == DockState.Float))
+				return false;
+			else if (((dockableAreas & DockAreas.Document) == 0) &&
+				(dockState == DockState.Document))
+				return false;
+			else if (((dockableAreas & DockAreas.DockLeft) == 0) &&
+				(dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide))
+				return false;
+			else if (((dockableAreas & DockAreas.DockRight) == 0) &&
+				(dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide))
+				return false;
+			else if (((dockableAreas & DockAreas.DockTop) == 0) &&
+				(dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide))
+				return false;
+			else if (((dockableAreas & DockAreas.DockBottom) == 0) &&
+				(dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide))
+				return false;
+			else
+				return true;
+		}
+
+		public static bool IsDockWindowState(DockState state)
+		{
+			if (state == DockState.DockTop || state == DockState.DockBottom || state == DockState.DockLeft ||
+				state == DockState.DockRight || state == DockState.Document)
+				return true;
+			else
+				return false;
+		}
+
+		public static DockState ToggleAutoHideState(DockState state)
+		{
+			if (state == DockState.DockLeft)
+				return DockState.DockLeftAutoHide;
+			else if (state == DockState.DockRight)
+				return DockState.DockRightAutoHide;
+			else if (state == DockState.DockTop)
+				return DockState.DockTopAutoHide;
+			else if (state == DockState.DockBottom)
+				return DockState.DockBottomAutoHide;
+			else if (state == DockState.DockLeftAutoHide)
+				return DockState.DockLeft;
+			else if (state == DockState.DockRightAutoHide)
+				return DockState.DockRight;
+			else if (state == DockState.DockTopAutoHide)
+				return DockState.DockTop;
+			else if (state == DockState.DockBottomAutoHide)
+				return DockState.DockBottom;
+			else
+				return state;
+		}
+
+		public static DockPane PaneAtPoint(Point pt, DockPanel dockPanel)
+		{
+                        if (!Win32Helper.IsRunningOnMono())
+			for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
+			{
+				IDockContent content = control as IDockContent;
+				if (content != null && content.DockHandler.DockPanel == dockPanel)
+					return content.DockHandler.Pane;
+
+				DockPane pane = control as DockPane;
+				if (pane != null && pane.DockPanel == dockPanel)
+					return pane;
+			}
+
+			return null;
+		}
+
+		public static FloatWindow FloatWindowAtPoint(Point pt, DockPanel dockPanel)
+		{
+                        if (!Win32Helper.IsRunningOnMono())
+			for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
+			{
+				FloatWindow floatWindow = control as FloatWindow;
+				if (floatWindow != null && floatWindow.DockPanel == dockPanel)
+					return floatWindow;
+			}
+
+			return null;
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DrawHelper.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DrawHelper.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/DrawHelper.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,88 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Imaging;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal static class DrawHelper
+	{
+        public static Point RtlTransform(Control control, Point point)
+        {
+            if (control.RightToLeft != RightToLeft.Yes)
+                return point;
+            else
+                return new Point(control.Right - point.X, point.Y);
+        }
+
+        public static Rectangle RtlTransform(Control control, Rectangle rectangle)
+        {
+            if (control.RightToLeft != RightToLeft.Yes)
+                return rectangle;
+            else
+                return new Rectangle(control.ClientRectangle.Right - rectangle.Right, rectangle.Y, rectangle.Width, rectangle.Height);
+        }
+
+        public static GraphicsPath GetRoundedCornerTab(GraphicsPath graphicsPath, Rectangle rect, bool upCorner)
+        {
+            if (graphicsPath == null)
+                graphicsPath = new GraphicsPath();
+            else
+                graphicsPath.Reset();
+            
+            int curveSize = 6;
+            if (upCorner)
+            {
+                graphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left, rect.Top + curveSize / 2);
+                graphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
+                graphicsPath.AddLine(rect.Left + curveSize / 2, rect.Top, rect.Right - curveSize / 2, rect.Top);
+                graphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Top, curveSize, curveSize), -90, 90);
+                graphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Bottom);
+            }
+            else
+            {
+                graphicsPath.AddLine(rect.Right, rect.Top, rect.Right, rect.Bottom - curveSize / 2);
+                graphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize), 0, 90);
+                graphicsPath.AddLine(rect.Right - curveSize / 2, rect.Bottom, rect.Left + curveSize / 2, rect.Bottom);
+                graphicsPath.AddArc(new Rectangle(rect.Left, rect.Bottom - curveSize, curveSize, curveSize), 90, 90);
+                graphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Top);
+            }
+
+            return graphicsPath;
+        }
+
+		public static GraphicsPath CalculateGraphicsPathFromBitmap(Bitmap bitmap)
+		{
+			return CalculateGraphicsPathFromBitmap(bitmap, Color.Empty);
+		}
+
+		// From http://edu.cnzz.cn/show_3281.html
+		public static GraphicsPath CalculateGraphicsPathFromBitmap(Bitmap bitmap, Color colorTransparent) 
+		{ 
+			GraphicsPath graphicsPath = new GraphicsPath(); 
+			if (colorTransparent == Color.Empty)
+				colorTransparent = bitmap.GetPixel(0, 0); 
+
+			for(int row = 0; row < bitmap.Height; row ++) 
+			{ 
+				int colOpaquePixel = 0;
+				for(int col = 0; col < bitmap.Width; col ++) 
+				{ 
+					if(bitmap.GetPixel(col, row) != colorTransparent) 
+					{ 
+						colOpaquePixel = col; 
+						int colNext = col; 
+						for(colNext = colOpaquePixel; colNext < bitmap.Width; colNext ++) 
+							if(bitmap.GetPixel(colNext, row) == colorTransparent) 
+								break;
+ 
+						graphicsPath.AddRectangle(new Rectangle(colOpaquePixel, row, colNext - colOpaquePixel, 1)); 
+						col = colNext; 
+					} 
+				} 
+			} 
+			return graphicsPath; 
+		} 
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/ResourceHelper.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/ResourceHelper.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/ResourceHelper.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,29 @@
+using System;
+using System.Drawing;
+using System.Reflection;
+using System.Resources;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal static class ResourceHelper
+	{
+        private static ResourceManager _resourceManager = null;
+
+        private static ResourceManager ResourceManager
+        {
+            get
+            {
+                if (_resourceManager == null)
+                    _resourceManager = new ResourceManager("WeifenLuo.WinFormsUI.Docking.Strings", typeof(ResourceHelper).Assembly);
+                return _resourceManager;
+            }
+
+        }
+
+		public static string GetString(string name)
+		{
+			return ResourceManager.GetString(name);
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/Win32Helper.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/Win32Helper.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Helpers/Win32Helper.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,24 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+        public static class Win32Helper
+	{
+                internal static Control ControlAtPoint(Point pt)
+	        {
+		        return Control.FromChildHandle(NativeMethods.WindowFromPoint(pt));
+		}
+
+                internal static uint MakeLong(int low, int high)
+		{
+			return (uint)((high << 16) + low);
+		}
+
+		public static bool IsRunningOnMono()
+		{
+			return Type.GetType ("Mono.Runtime") != null;
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/InertButtonBase.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/InertButtonBase.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/InertButtonBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,115 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing;
+using System.Drawing.Imaging;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    internal abstract class InertButtonBase : Control
+    {
+        protected InertButtonBase()
+        {
+            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
+            BackColor = Color.Transparent;
+        }
+
+        public abstract Bitmap Image
+        {
+            get;
+        }
+
+        private bool m_isMouseOver = false;
+        protected bool IsMouseOver
+        {
+            get { return m_isMouseOver; }
+            private set
+            {
+                if (m_isMouseOver == value)
+                    return;
+
+                m_isMouseOver = value;
+                Invalidate();
+            }
+        }
+
+        protected override Size DefaultSize
+        {
+            get { return Resources.DockPane_Close.Size; }
+        }
+
+        protected override void OnMouseMove(MouseEventArgs e)
+        {
+            base.OnMouseMove(e);
+            bool over = ClientRectangle.Contains(e.X, e.Y);
+            if (IsMouseOver != over)
+                IsMouseOver = over;
+        }
+
+        protected override void OnMouseEnter(EventArgs e)
+        {
+            base.OnMouseEnter(e);
+            if (!IsMouseOver)
+                IsMouseOver = true;
+        }
+
+        protected override void OnMouseLeave(EventArgs e)
+        {
+            base.OnMouseLeave(e);
+            if (IsMouseOver)
+                IsMouseOver = false;
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            if (IsMouseOver && Enabled)
+            {
+                using (Pen pen = new Pen(ForeColor))
+                {
+                    e.Graphics.DrawRectangle(pen, Rectangle.Inflate(ClientRectangle, -1, -1));
+                }
+            }
+
+            using (ImageAttributes imageAttributes = new ImageAttributes())
+            {
+                ColorMap[] colorMap = new ColorMap[2];
+                colorMap[0] = new ColorMap();
+                colorMap[0].OldColor = Color.FromArgb(0, 0, 0);
+                colorMap[0].NewColor = ForeColor;
+                colorMap[1] = new ColorMap();
+                colorMap[1].OldColor = Image.GetPixel(0, 0);
+                colorMap[1].NewColor = Color.Transparent;
+
+                imageAttributes.SetRemapTable(colorMap);
+
+                e.Graphics.DrawImage(
+                   Image,
+                   new Rectangle(0, 0, Image.Width, Image.Height),
+                   0, 0,
+                   Image.Width,
+                   Image.Height,
+                   GraphicsUnit.Pixel,
+                   imageAttributes);
+            }
+
+            base.OnPaint(e);
+        }
+
+        public void RefreshChanges()
+        {
+            if (IsDisposed)
+                return;
+
+            bool mouseOver = ClientRectangle.Contains(PointToClient(Control.MousePosition));
+            if (mouseOver != IsMouseOver)
+                IsMouseOver = mouseOver;
+
+            OnRefreshChanges();
+        }
+
+        protected virtual void OnRefreshChanges()
+        {
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Interfaces.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Interfaces.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Interfaces.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,46 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public interface IDockContent
+	{
+		DockContentHandler DockHandler	{	get;	}
+		void OnActivated(EventArgs e);
+		void OnDeactivate(EventArgs e);
+	}
+
+	public interface INestedPanesContainer
+	{
+		DockState DockState	{	get;	}
+		Rectangle DisplayingRectangle	{	get;	}
+		NestedPaneCollection NestedPanes	{	get;	}
+		VisibleNestedPaneCollection VisibleNestedPanes	{	get;	}
+		bool IsFloat	{	get;	}
+	}
+
+    internal interface IDragSource
+    {
+        Control DragControl { get; }
+    }
+
+    internal interface IDockDragSource : IDragSource
+    {
+        Rectangle BeginDrag(Point ptMouse);
+        bool IsDockStateValid(DockState dockState);
+        bool CanDockTo(DockPane pane);
+        void FloatAt(Rectangle floatWindowBounds);
+        void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex);
+        void DockTo(DockPanel panel, DockStyle dockStyle);
+    }
+
+    internal interface ISplitterDragSource : IDragSource
+    {
+        void BeginDrag(Rectangle rectSplitter);
+        void EndDrag();
+        bool IsVertical { get; }
+        Rectangle DragLimitBounds { get; }
+        void MoveSplitter(int offset);
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Localization.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Localization.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Localization.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,46 @@
+using System;
+using System.ComponentModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	[AttributeUsage(AttributeTargets.All)]
+	internal sealed class LocalizedDescriptionAttribute : DescriptionAttribute
+	{
+		private bool m_initialized = false;
+
+		public LocalizedDescriptionAttribute(string key) : base(key)
+		{
+		}
+
+		public override string Description
+		{
+			get
+			{	
+				if (!m_initialized)
+				{
+					string key = base.Description;
+					DescriptionValue = ResourceHelper.GetString(key);
+					if (DescriptionValue == null)
+						DescriptionValue = String.Empty;
+
+					m_initialized = true;
+				}
+
+				return DescriptionValue;
+			}
+		}
+	}
+
+	[AttributeUsage(AttributeTargets.All)]
+	internal sealed class LocalizedCategoryAttribute : CategoryAttribute
+	{
+		public LocalizedCategoryAttribute(string key) : base(key)
+		{
+		}
+
+		protected override string GetLocalizedString(string key)
+		{
+			return ResourceHelper.GetString(key);
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Measures.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Measures.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Measures.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,14 @@
+using System;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal static class Measures
+	{
+		public const int SplitterSize = 4;
+	}
+
+	internal static class MeasurePane
+	{
+		public const int MinSize = 24;
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedDockingStatus.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedDockingStatus.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedDockingStatus.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,108 @@
+using System;
+using System.Drawing;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public sealed class NestedDockingStatus
+	{
+		internal NestedDockingStatus(DockPane pane)
+		{
+			m_dockPane = pane;
+		}
+
+		private DockPane m_dockPane = null;
+		public DockPane DockPane
+		{
+			get	{	return m_dockPane;	}
+		}
+		
+		private NestedPaneCollection m_nestedPanes = null;
+		public NestedPaneCollection NestedPanes
+		{
+			get	{	return m_nestedPanes;	}
+		}
+		
+		private DockPane m_previousPane = null;
+		public DockPane PreviousPane
+		{
+			get	{	return m_previousPane;	}
+		}
+
+		private DockAlignment m_alignment = DockAlignment.Left;
+		public DockAlignment Alignment
+		{
+			get	{	return m_alignment;	}
+		}
+
+		private double m_proportion = 0.5;
+		public double Proportion
+		{
+			get	{	return m_proportion;	}
+		}
+
+		private bool m_isDisplaying = false;
+		public bool IsDisplaying
+		{
+			get	{	return m_isDisplaying;	}
+		}
+
+		private DockPane m_displayingPreviousPane = null;
+		public DockPane DisplayingPreviousPane
+		{
+			get	{	return m_displayingPreviousPane;	}
+		}
+
+		private DockAlignment m_displayingAlignment = DockAlignment.Left;
+		public DockAlignment DisplayingAlignment
+		{
+			get	{	return m_displayingAlignment;	}
+		}
+
+		private double m_displayingProportion = 0.5;
+		public double DisplayingProportion
+		{
+			get	{	return m_displayingProportion;	}
+		}
+
+		private Rectangle m_logicalBounds = Rectangle.Empty; 
+		public Rectangle LogicalBounds
+		{
+			get	{	return m_logicalBounds;	}
+		}
+
+		private Rectangle m_paneBounds = Rectangle.Empty;
+		public Rectangle PaneBounds
+		{
+			get	{	return m_paneBounds;	}
+		}
+
+		private Rectangle m_splitterBounds = Rectangle.Empty;
+		public Rectangle SplitterBounds
+		{
+			get	{	return m_splitterBounds;	}
+		}
+
+		internal void SetStatus(NestedPaneCollection nestedPanes, DockPane previousPane, DockAlignment alignment, double proportion)
+		{
+			m_nestedPanes = nestedPanes;
+			m_previousPane = previousPane;
+			m_alignment = alignment;
+			m_proportion = proportion;
+		}
+
+		internal void SetDisplayingStatus(bool isDisplaying, DockPane displayingPreviousPane, DockAlignment displayingAlignment, double displayingProportion)
+		{
+			m_isDisplaying = isDisplaying;
+			m_displayingPreviousPane = displayingPreviousPane;
+			m_displayingAlignment = displayingAlignment;
+			m_displayingProportion = displayingProportion;
+		}
+
+		internal void SetDisplayingBounds(Rectangle logicalBounds, Rectangle paneBounds, Rectangle splitterBounds)
+		{
+			m_logicalBounds = logicalBounds;
+			m_paneBounds = paneBounds;
+			m_splitterBounds = splitterBounds;
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedPaneCollection.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedPaneCollection.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/NestedPaneCollection.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,167 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Drawing;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public sealed class NestedPaneCollection : ReadOnlyCollection<DockPane>
+	{
+		private INestedPanesContainer m_container;
+		private VisibleNestedPaneCollection m_visibleNestedPanes;
+
+		internal NestedPaneCollection(INestedPanesContainer container)
+            : base(new List<DockPane>())
+		{
+			m_container = container;
+			m_visibleNestedPanes = new VisibleNestedPaneCollection(this);
+		}
+
+		public INestedPanesContainer Container
+		{
+			get	{	return m_container;	}
+		}
+		
+		public VisibleNestedPaneCollection VisibleNestedPanes
+		{
+			get	{	return m_visibleNestedPanes;	}
+		}
+
+		public DockState DockState
+		{
+			get	{	return Container.DockState;	}
+		}
+
+		public bool IsFloat
+		{
+			get	{	return DockState == DockState.Float;	}
+		}
+
+		internal void Add(DockPane pane)
+		{
+			if (pane == null)
+				return;
+
+			NestedPaneCollection oldNestedPanes = (pane.NestedPanesContainer == null) ? null : pane.NestedPanesContainer.NestedPanes;
+			if (oldNestedPanes != null)
+				oldNestedPanes.InternalRemove(pane);
+			Items.Add(pane);
+			if (oldNestedPanes != null)
+				oldNestedPanes.CheckFloatWindowDispose();
+		}
+
+		private void CheckFloatWindowDispose()
+		{
+			if (Count == 0 && Container.DockState == DockState.Float)
+			{
+				FloatWindow floatWindow = (FloatWindow)Container;
+				if (!floatWindow.Disposing && !floatWindow.IsDisposed)
+                                        if (!Win32Helper.IsRunningOnMono())
+					NativeMethods.PostMessage(((FloatWindow)Container).Handle, FloatWindow.WM_CHECKDISPOSE, 0, 0);
+			}
+		}
+
+        /// <summary>
+        /// Switches a pane with its first child in the pane hierarchy. (The actual hiding happens elsewhere.)
+        /// </summary>
+        /// <param name="pane">Pane to switch</param>
+        internal void SwitchPaneWithFirstChild(DockPane pane)
+        {
+            if (!Contains(pane))
+                return;
+
+            NestedDockingStatus statusPane = pane.NestedDockingStatus;
+            DockPane lastNestedPane = null;
+            for (int i = Count - 1; i > IndexOf(pane); i--)
+            {
+                if (this[i].NestedDockingStatus.PreviousPane == pane)
+                {
+                    lastNestedPane = this[i];
+                    break;
+                }
+            }
+
+            if (lastNestedPane != null)
+            {
+                int indexLastNestedPane = IndexOf(lastNestedPane);
+                Items[IndexOf(pane)] = lastNestedPane;
+                Items[indexLastNestedPane] = pane;
+                NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus;
+
+                DockAlignment newAlignment;
+                if (lastNestedDock.Alignment == DockAlignment.Left)
+                    newAlignment = DockAlignment.Right;
+                else if (lastNestedDock.Alignment == DockAlignment.Right)
+                    newAlignment = DockAlignment.Left;
+                else if (lastNestedDock.Alignment == DockAlignment.Top)
+                    newAlignment = DockAlignment.Bottom;
+                else
+                    newAlignment = DockAlignment.Top;
+                double newProportion = 1 - lastNestedDock.Proportion;
+
+                lastNestedDock.SetStatus(this, statusPane.PreviousPane, statusPane.Alignment, statusPane.Proportion);
+                for (int i = indexLastNestedPane - 1; i > IndexOf(lastNestedPane); i--)
+                {
+                    NestedDockingStatus status = this[i].NestedDockingStatus;
+                    if (status.PreviousPane == pane)
+                        status.SetStatus(this, lastNestedPane, status.Alignment, status.Proportion);
+                }
+
+                statusPane.SetStatus(this, lastNestedPane, newAlignment, newProportion);
+            }
+        }
+
+		internal void Remove(DockPane pane)
+		{
+			InternalRemove(pane);
+			CheckFloatWindowDispose();
+		}
+
+		private void InternalRemove(DockPane pane)
+		{
+			if (!Contains(pane))
+				return;
+
+			NestedDockingStatus statusPane = pane.NestedDockingStatus;
+			DockPane lastNestedPane = null;
+			for (int i=Count - 1; i> IndexOf(pane); i--)
+			{
+				if (this[i].NestedDockingStatus.PreviousPane == pane)
+				{
+					lastNestedPane = this[i];
+					break;
+				}
+			}
+
+			if (lastNestedPane != null)
+			{
+				int indexLastNestedPane = IndexOf(lastNestedPane);
+				Items.Remove(lastNestedPane);
+				Items[IndexOf(pane)] = lastNestedPane;
+				NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus;
+				lastNestedDock.SetStatus(this, statusPane.PreviousPane, statusPane.Alignment, statusPane.Proportion);
+				for (int i=indexLastNestedPane - 1; i>IndexOf(lastNestedPane); i--)
+				{
+					NestedDockingStatus status = this[i].NestedDockingStatus;
+					if (status.PreviousPane == pane)
+						status.SetStatus(this, lastNestedPane, status.Alignment, status.Proportion);
+				}
+			}
+			else
+				Items.Remove(pane);
+
+			statusPane.SetStatus(null, null, DockAlignment.Left, 0.5);
+			statusPane.SetDisplayingStatus(false, null, DockAlignment.Left, 0.5);
+			statusPane.SetDisplayingBounds(Rectangle.Empty, Rectangle.Empty, Rectangle.Empty);
+		}
+
+		public DockPane GetDefaultPreviousPane(DockPane pane)
+		{
+			for (int i=Count-1; i>=0; i--)
+				if (this[i] != pane)
+					return this[i];
+
+			return null;
+		}
+	}
+}


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Bottom.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Bottom.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Hotspot.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Hotspot.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_HotspotIndex.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_HotspotIndex.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Left.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Left.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Right.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Right.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Top.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PaneDiamond_Top.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelBottom.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelBottom.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelBottom_Active.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelBottom_Active.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelFill.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelFill.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelFill_Active.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelFill_Active.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelLeft.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelLeft.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelLeft_Active.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelLeft_Active.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelRight.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelRight.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelRight_Active.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelRight_Active.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelTop.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelTop.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelTop_Active.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockIndicator_PanelTop_Active.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_AutoHide.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_AutoHide.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Close.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Close.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Dock.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Dock.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Option.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_Option.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_OptionOverflow.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/DockPane_OptionOverflow.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/Dockindicator_PaneDiamond_Fill.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources/Dockindicator_PaneDiamond_Fill.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.Designer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,224 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.225
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WeifenLuo.WinFormsUI.Docking {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeifenLuo.WinFormsUI.Docking.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Bottom {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Bottom", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Fill {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Fill", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpot {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpot", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpotIndex {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpotIndex", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Left {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Left", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Right {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Right", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Top {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Top", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelBottom {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelBottom", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelBottom_Active {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelBottom_Active", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelFill {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelFill", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelFill_Active {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelFill_Active", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelLeft {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelLeft", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelLeft_Active {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelLeft_Active", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelRight {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelRight", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelRight_Active {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelRight_Active", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelTop {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelTop", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockIndicator_PanelTop_Active {
+            get {
+                object obj = ResourceManager.GetObject("DockIndicator_PanelTop_Active", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockPane_AutoHide {
+            get {
+                object obj = ResourceManager.GetObject("DockPane_AutoHide", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockPane_Close {
+            get {
+                object obj = ResourceManager.GetObject("DockPane_Close", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockPane_Dock {
+            get {
+                object obj = ResourceManager.GetObject("DockPane_Dock", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockPane_Option {
+            get {
+                object obj = ResourceManager.GetObject("DockPane_Option", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap DockPane_OptionOverflow {
+            get {
+                object obj = ResourceManager.GetObject("DockPane_OptionOverflow", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Resources.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="DockIndicator_PaneDiamond" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PaneDiamond.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PaneDiamond_Bottom" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PaneDiamond_Bottom.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PaneDiamond_Fill" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\Dockindicator_PaneDiamond_Fill.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PaneDiamond_HotSpot" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PaneDiamond_Hotspot.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PaneDiamond_HotSpotIndex" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PaneDiamond_HotspotIndex.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PaneDiamond_Left" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PaneDiamond_Left.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PaneDiamond_Right" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PaneDiamond_Right.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PaneDiamond_Top" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PaneDiamond_Top.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelBottom" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelBottom.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelBottom_Active" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelBottom_Active.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelFill" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelFill.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelFill_Active" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelFill_Active.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelLeft.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelLeft_Active" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelLeft_Active.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelRight.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelRight_Active" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelRight_Active.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelTop" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelTop.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockIndicator_PanelTop_Active" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockIndicator_PanelTop_Active.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockPane_AutoHide" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockPane_AutoHide.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockPane_Close" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockPane_Close.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockPane_Dock" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockPane_Dock.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockPane_Option" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockPane_Option.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="DockPane_OptionOverflow" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Resources\DockPane_OptionOverflow.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/SplitterBase.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/SplitterBase.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/SplitterBase.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,70 @@
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal class SplitterBase : Control
+	{
+		public SplitterBase()
+		{
+			SetStyle(ControlStyles.Selectable, false);
+		}
+
+		public override DockStyle Dock
+		{
+			get	{	return base.Dock;	}
+			set
+			{
+				SuspendLayout();
+				base.Dock = value;
+
+				if (Dock == DockStyle.Left || Dock == DockStyle.Right)
+					Width = SplitterSize;
+				else if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
+					Height = SplitterSize;
+				else
+					Bounds = Rectangle.Empty;
+
+				if (Dock == DockStyle.Left || Dock == DockStyle.Right)
+					Cursor = Cursors.VSplit;
+				else if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
+					Cursor = Cursors.HSplit;
+				else
+					Cursor = Cursors.Default;
+					
+				ResumeLayout();
+			}
+		}
+
+		protected virtual int SplitterSize
+		{
+			get	{	return 0;	}
+		}
+
+		protected override void OnMouseDown(MouseEventArgs e)
+		{
+			base.OnMouseDown(e);
+
+			if (e.Button != MouseButtons.Left)
+				return;
+
+			StartDrag();
+		}
+
+		protected virtual void StartDrag()
+		{
+		}
+
+		protected override void WndProc(ref Message m)
+		{
+            // eat the WM_MOUSEACTIVATE message
+			if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE)
+				return;
+
+			base.WndProc(ref m);
+		}
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.Designer.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.Designer.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,774 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.225
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WeifenLuo.WinFormsUI.Docking {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Strings {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Strings() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeifenLuo.WinFormsUI.Docking.Strings", typeof(Strings).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Docking.
+        /// </summary>
+        internal static string Category_Docking {
+            get {
+                return ResourceManager.GetString("Category_Docking", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Docking Notification.
+        /// </summary>
+        internal static string Category_DockingNotification {
+            get {
+                return ResourceManager.GetString("Category_DockingNotification", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Property Changed.
+        /// </summary>
+        internal static string Category_PropertyChanged {
+            get {
+                return ResourceManager.GetString("Category_PropertyChanged", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to (Float).
+        /// </summary>
+        internal static string DockAreaEditor_FloatCheckBoxText {
+            get {
+                return ResourceManager.GetString("DockAreaEditor_FloatCheckBoxText", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Determines if end user drag and drop docking is allowed..
+        /// </summary>
+        internal static string DockContent_AllowEndUserDocking_Description {
+            get {
+                return ResourceManager.GetString("DockContent_AllowEndUserDocking_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The size to display the content in auto hide mode. Value &lt; 1 to specify the size in portion; value &gt;= 1 to specify the size in pixel..
+        /// </summary>
+        internal static string DockContent_AutoHidePortion_Description {
+            get {
+                return ResourceManager.GetString("DockContent_AutoHidePortion_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Enable/Disable the close button of the content..
+        /// </summary>
+        internal static string DockContent_CloseButton_Description {
+            get {
+                return ResourceManager.GetString("DockContent_CloseButton_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Shows or hides the close button of the content. This property does not function with System MDI Document Style..
+        /// </summary>
+        internal static string DockContent_CloseButtonVisible_Description {
+            get {
+                return ResourceManager.GetString("DockContent_CloseButtonVisible_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The form must be of type IDockContent..
+        /// </summary>
+        internal static string DockContent_Constructor_InvalidForm {
+            get {
+                return ResourceManager.GetString("DockContent_Constructor_InvalidForm", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Gets or sets a value indicating in which area of the DockPanel the content allowed to show..
+        /// </summary>
+        internal static string DockContent_DockAreas_Description {
+            get {
+                return ResourceManager.GetString("DockContent_DockAreas_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Occurs when the value of DockState property changed..
+        /// </summary>
+        internal static string DockContent_DockStateChanged_Description {
+            get {
+                return ResourceManager.GetString("DockContent_DockStateChanged_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Indicates the content will be hidden instead of being closed..
+        /// </summary>
+        internal static string DockContent_HideOnClose_Description {
+            get {
+                return ResourceManager.GetString("DockContent_HideOnClose_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The desired docking state when first showing..
+        /// </summary>
+        internal static string DockContent_ShowHint_Description {
+            get {
+                return ResourceManager.GetString("DockContent_ShowHint_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Context menu displayed for the dock pane tab strip..
+        /// </summary>
+        internal static string DockContent_TabPageContextMenu_Description {
+            get {
+                return ResourceManager.GetString("DockContent_TabPageContextMenu_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The tab text displayed in the dock pane. If not set, the Text property will be used..
+        /// </summary>
+        internal static string DockContent_TabText_Description {
+            get {
+                return ResourceManager.GetString("DockContent_TabText_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The text displayed when mouse hovers over the tab..
+        /// </summary>
+        internal static string DockContent_ToolTipText_Description {
+            get {
+                return ResourceManager.GetString("DockContent_ToolTipText_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The provided value is out of range..
+        /// </summary>
+        internal static string DockContentHandler_AutoHidePortion_OutOfRange {
+            get {
+                return ResourceManager.GetString("DockContentHandler_AutoHidePortion_OutOfRange", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Value: The value of DockAreas conflicts with current DockState..
+        /// </summary>
+        internal static string DockContentHandler_DockAreas_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockContentHandler_DockAreas_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane..
+        /// </summary>
+        internal static string DockContentHandler_DockPane_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockContentHandler_DockPane_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane..
+        /// </summary>
+        internal static string DockContentHandler_FloatPane_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockContentHandler_FloatPane_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid value, conflicts with DockableAreas  property..
+        /// </summary>
+        internal static string DockContentHandler_IsFloat_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockContentHandler_IsFloat_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The dock state is invalid..
+        /// </summary>
+        internal static string DockContentHandler_SetDockState_InvalidState {
+            get {
+                return ResourceManager.GetString("DockContentHandler_SetDockState_InvalidState", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The dock panel is null..
+        /// </summary>
+        internal static string DockContentHandler_SetDockState_NullPanel {
+            get {
+                return ResourceManager.GetString("DockContentHandler_SetDockState_NullPanel", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid beforeContent, it must be contained by the pane..
+        /// </summary>
+        internal static string DockContentHandler_Show_InvalidBeforeContent {
+            get {
+                return ResourceManager.GetString("DockContentHandler_Show_InvalidBeforeContent", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid DockState: Content can not be showed as &quot;Unknown&quot; or &quot;Hidden&quot;..
+        /// </summary>
+        internal static string DockContentHandler_Show_InvalidDockState {
+            get {
+                return ResourceManager.GetString("DockContentHandler_Show_InvalidDockState", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The previous pane is invalid. It can not be null, and its docking state must not be auto-hide..
+        /// </summary>
+        internal static string DockContentHandler_Show_InvalidPrevPane {
+            get {
+                return ResourceManager.GetString("DockContentHandler_Show_InvalidPrevPane", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DockPanel can not be null..
+        /// </summary>
+        internal static string DockContentHandler_Show_NullDockPanel {
+            get {
+                return ResourceManager.GetString("DockContentHandler_Show_NullDockPanel", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The Pane can not be null..
+        /// </summary>
+        internal static string DockContentHandler_Show_NullPane {
+            get {
+                return ResourceManager.GetString("DockContentHandler_Show_NullPane", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid value, check DockableAreas property..
+        /// </summary>
+        internal static string DockContentHandler_ShowHint_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockContentHandler_ShowHint_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Context menu displayed for the dock pane tab strip..
+        /// </summary>
+        internal static string DockHandler_TabPageContextMenuStrip_Description {
+            get {
+                return ResourceManager.GetString("DockHandler_TabPageContextMenuStrip_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Press SHIFT for docking to full side..
+        /// </summary>
+        internal static string DockIndicator_ToolTipText {
+            get {
+                return ResourceManager.GetString("DockIndicator_ToolTipText", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Content: ActiveContent must be one of the visible contents, or null if there is no visible content..
+        /// </summary>
+        internal static string DockPane_ActiveContent_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockPane_ActiveContent_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid argument: Content can not be &quot;null&quot;..
+        /// </summary>
+        internal static string DockPane_Constructor_NullContent {
+            get {
+                return ResourceManager.GetString("DockPane_Constructor_NullContent", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid argument: The content&apos;s DockPanel can not be &quot;null&quot;..
+        /// </summary>
+        internal static string DockPane_Constructor_NullDockPanel {
+            get {
+                return ResourceManager.GetString("DockPane_Constructor_NullDockPanel", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The specified container conflicts with the IsFloat property..
+        /// </summary>
+        internal static string DockPane_DockTo_InvalidContainer {
+            get {
+                return ResourceManager.GetString("DockPane_DockTo_InvalidContainer", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The previous pane does not exist in the nested docking pane collection..
+        /// </summary>
+        internal static string DockPane_DockTo_NoPrevPane {
+            get {
+                return ResourceManager.GetString("DockPane_DockTo_NoPrevPane", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The container can not be null..
+        /// </summary>
+        internal static string DockPane_DockTo_NullContainer {
+            get {
+                return ResourceManager.GetString("DockPane_DockTo_NullContainer", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The previous pane can not be null when the nested docking pane collection is not empty..
+        /// </summary>
+        internal static string DockPane_DockTo_NullPrevPane {
+            get {
+                return ResourceManager.GetString("DockPane_DockTo_NullPrevPane", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The previous pane can not be itself..
+        /// </summary>
+        internal static string DockPane_DockTo_SelfPrevPane {
+            get {
+                return ResourceManager.GetString("DockPane_DockTo_SelfPrevPane", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to FloatWindow property can not be set to &quot;null&quot; when DockState is DockState.Float..
+        /// </summary>
+        internal static string DockPane_FloatWindow_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockPane_FloatWindow_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Content: Content not within the collection..
+        /// </summary>
+        internal static string DockPane_SetContentIndex_InvalidContent {
+            get {
+                return ResourceManager.GetString("DockPane_SetContentIndex_InvalidContent", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Index: The index is out of range..
+        /// </summary>
+        internal static string DockPane_SetContentIndex_InvalidIndex {
+            get {
+                return ResourceManager.GetString("DockPane_SetContentIndex_InvalidIndex", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The state for the dock pane is invalid..
+        /// </summary>
+        internal static string DockPane_SetDockState_InvalidState {
+            get {
+                return ResourceManager.GetString("DockPane_SetDockState_InvalidState", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Auto Hide.
+        /// </summary>
+        internal static string DockPaneCaption_ToolTipAutoHide {
+            get {
+                return ResourceManager.GetString("DockPaneCaption_ToolTipAutoHide", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Close.
+        /// </summary>
+        internal static string DockPaneCaption_ToolTipClose {
+            get {
+                return ResourceManager.GetString("DockPaneCaption_ToolTipClose", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Options.
+        /// </summary>
+        internal static string DockPaneCaption_ToolTipOptions {
+            get {
+                return ResourceManager.GetString("DockPaneCaption_ToolTipOptions", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Content: The content must be auto-hide state and associates with this DockPanel..
+        /// </summary>
+        internal static string DockPanel_ActiveAutoHideContent_InvalidValue {
+            get {
+                return ResourceManager.GetString("DockPanel_ActiveAutoHideContent_InvalidValue", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Occurs when the value of ActiveContentProperty changed..
+        /// </summary>
+        internal static string DockPanel_ActiveContentChanged_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_ActiveContentChanged_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Occurs when the value of ActiveDocument property changed..
+        /// </summary>
+        internal static string DockPanel_ActiveDocumentChanged_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_ActiveDocumentChanged_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Occurs when the value of ActivePane property changed..
+        /// </summary>
+        internal static string DockPanel_ActivePaneChanged_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_ActivePaneChanged_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Determines if the drag and drop docking is allowed..
+        /// </summary>
+        internal static string DockPanel_AllowEndUserDocking_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_AllowEndUserDocking_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Determines if the drag and drop nested docking is allowed..
+        /// </summary>
+        internal static string DockPanel_AllowEndUserNestedDocking_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_AllowEndUserNestedDocking_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Occurs when a content added to the DockPanel..
+        /// </summary>
+        internal static string DockPanel_ContentAdded_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_ContentAdded_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Occurs when a content removed from the DockPanel..
+        /// </summary>
+        internal static string DockPanel_ContentRemoved_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_ContentRemoved_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The default size of float window..
+        /// </summary>
+        internal static string DockPanel_DefaultFloatWindowSize_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_DefaultFloatWindowSize_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Provides Visual Studio .Net style docking..
+        /// </summary>
+        internal static string DockPanel_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Size of the bottom docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+        /// </summary>
+        internal static string DockPanel_DockBottomPortion_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_DockBottomPortion_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Size of the left docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+        /// </summary>
+        internal static string DockPanel_DockLeftPortion_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_DockLeftPortion_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The visual skin to use when displaying the docked windows..
+        /// </summary>
+        internal static string DockPanel_DockPanelSkin {
+            get {
+                return ResourceManager.GetString("DockPanel_DockPanelSkin", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Size of the right docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+        /// </summary>
+        internal static string DockPanel_DockRightPortion_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_DockRightPortion_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Size of the top docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+        /// </summary>
+        internal static string DockPanel_DockTopPortion_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_DockTopPortion_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The style of the document window..
+        /// </summary>
+        internal static string DockPanel_DocumentStyle_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_DocumentStyle_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Determines where the tab strip for Document style content is drawn..
+        /// </summary>
+        internal static string DockPanel_DocumentTabStripLocation {
+            get {
+                return ResourceManager.GetString("DockPanel_DocumentTabStripLocation", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The DockPanel has already been initialized..
+        /// </summary>
+        internal static string DockPanel_LoadFromXml_AlreadyInitialized {
+            get {
+                return ResourceManager.GetString("DockPanel_LoadFromXml_AlreadyInitialized", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The configuration file&apos;s version is invalid..
+        /// </summary>
+        internal static string DockPanel_LoadFromXml_InvalidFormatVersion {
+            get {
+                return ResourceManager.GetString("DockPanel_LoadFromXml_InvalidFormatVersion", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The XML file format is invalid..
+        /// </summary>
+        internal static string DockPanel_LoadFromXml_InvalidXmlFormat {
+            get {
+                return ResourceManager.GetString("DockPanel_LoadFromXml_InvalidXmlFormat", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid parent form. When using DockingMdi or SystemMdi document style, the DockPanel control must be the child control of the main MDI container form..
+        /// </summary>
+        internal static string DockPanel_ParentForm_Invalid {
+            get {
+                return ResourceManager.GetString("DockPanel_ParentForm_Invalid", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DockPanel configuration file. Author: Weifen Luo, all rights reserved..
+        /// </summary>
+        internal static string DockPanel_Persistor_XmlFileComment1 {
+            get {
+                return ResourceManager.GetString("DockPanel_Persistor_XmlFileComment1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to !!! AUTOMATICALLY GENERATED FILE. DO NOT MODIFY !!!.
+        /// </summary>
+        internal static string DockPanel_Persistor_XmlFileComment2 {
+            get {
+                return ResourceManager.GetString("DockPanel_Persistor_XmlFileComment2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Indicates whether the control layout is right-to-left when the RightToLeft property is set to Yes..
+        /// </summary>
+        internal static string DockPanel_RightToLeftLayout_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_RightToLeftLayout_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Index: The index is out of range..
+        /// </summary>
+        internal static string DockPanel_SetPaneIndex_InvalidIndex {
+            get {
+                return ResourceManager.GetString("DockPanel_SetPaneIndex_InvalidIndex", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Pane: DockPane not within the collection..
+        /// </summary>
+        internal static string DockPanel_SetPaneIndex_InvalidPane {
+            get {
+                return ResourceManager.GetString("DockPanel_SetPaneIndex_InvalidPane", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Determines if the document icon will be displayed in the tab strip..
+        /// </summary>
+        internal static string DockPanel_ShowDocumentIcon_Description {
+            get {
+                return ResourceManager.GetString("DockPanel_ShowDocumentIcon_Description", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Close.
+        /// </summary>
+        internal static string DockPaneStrip_ToolTipClose {
+            get {
+                return ResourceManager.GetString("DockPaneStrip_ToolTipClose", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Window List.
+        /// </summary>
+        internal static string DockPaneStrip_ToolTipWindowList {
+            get {
+                return ResourceManager.GetString("DockPaneStrip_ToolTipWindowList", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid argument: DockPanel can not be &quot;null&quot;..
+        /// </summary>
+        internal static string FloatWindow_Constructor_NullDockPanel {
+            get {
+                return ResourceManager.GetString("FloatWindow_Constructor_NullDockPanel", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Index: The index is out of range..
+        /// </summary>
+        internal static string FloatWindow_SetPaneIndex_InvalidIndex {
+            get {
+                return ResourceManager.GetString("FloatWindow_SetPaneIndex_InvalidIndex", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid Pane: DockPane not within the collection..
+        /// </summary>
+        internal static string FloatWindow_SetPaneIndex_InvalidPane {
+            get {
+                return ResourceManager.GetString("FloatWindow_SetPaneIndex_InvalidPane", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid DockPanel..
+        /// </summary>
+        internal static string IDockDragSource_DockTo_InvalidPanel {
+            get {
+                return ResourceManager.GetString("IDockDragSource_DockTo_InvalidPanel", resourceCulture);
+            }
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.resx
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.resx	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Strings.resx	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,357 @@
+<?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>
+  <data name="Category_Docking" xml:space="preserve">
+    <value>Docking</value>
+  </data>
+  <data name="Category_DockingNotification" xml:space="preserve">
+    <value>Docking Notification</value>
+  </data>
+  <data name="Category_PropertyChanged" xml:space="preserve">
+    <value>Property Changed</value>
+  </data>
+  <data name="DockAreaEditor_FloatCheckBoxText" xml:space="preserve">
+    <value>(Float)</value>
+  </data>
+  <data name="DockContent_AllowEndUserDocking_Description" xml:space="preserve">
+    <value>Determines if end user drag and drop docking is allowed.</value>
+  </data>
+  <data name="DockContent_AutoHidePortion_Description" xml:space="preserve">
+    <value>The size to display the content in auto hide mode. Value &lt; 1 to specify the size in portion; value &gt;= 1 to specify the size in pixel.</value>
+  </data>
+  <data name="DockContent_CloseButton_Description" xml:space="preserve">
+    <value>Enable/Disable the close button of the content.</value>
+  </data>
+  <data name="DockContent_Constructor_InvalidForm" xml:space="preserve">
+    <value>The form must be of type IDockContent.</value>
+  </data>
+  <data name="DockContent_DockAreas_Description" xml:space="preserve">
+    <value>Gets or sets a value indicating in which area of the DockPanel the content allowed to show.</value>
+  </data>
+  <data name="DockContent_DockStateChanged_Description" xml:space="preserve">
+    <value>Occurs when the value of DockState property changed.</value>
+  </data>
+  <data name="DockContent_HideOnClose_Description" xml:space="preserve">
+    <value>Indicates the content will be hidden instead of being closed.</value>
+  </data>
+  <data name="DockContent_ShowHint_Description" xml:space="preserve">
+    <value>The desired docking state when first showing.</value>
+  </data>
+  <data name="DockContent_TabPageContextMenu_Description" xml:space="preserve">
+    <value>Context menu displayed for the dock pane tab strip.</value>
+  </data>
+  <data name="DockContent_TabText_Description" xml:space="preserve">
+    <value>The tab text displayed in the dock pane. If not set, the Text property will be used.</value>
+  </data>
+  <data name="DockContent_ToolTipText_Description" xml:space="preserve">
+    <value>The text displayed when mouse hovers over the tab.</value>
+  </data>
+  <data name="DockContentHandler_AutoHidePortion_OutOfRange" xml:space="preserve">
+    <value>The provided value is out of range.</value>
+  </data>
+  <data name="DockContentHandler_DockAreas_InvalidValue" xml:space="preserve">
+    <value>Invalid Value: The value of DockAreas conflicts with current DockState.</value>
+  </data>
+  <data name="DockContentHandler_DockPane_InvalidValue" xml:space="preserve">
+    <value>The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane.</value>
+  </data>
+  <data name="DockContentHandler_FloatPane_InvalidValue" xml:space="preserve">
+    <value>The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane.</value>
+  </data>
+  <data name="DockContentHandler_IsFloat_InvalidValue" xml:space="preserve">
+    <value>Invalid value, conflicts with DockableAreas  property.</value>
+  </data>
+  <data name="DockContentHandler_SetDockState_InvalidState" xml:space="preserve">
+    <value>The dock state is invalid.</value>
+  </data>
+  <data name="DockContentHandler_SetDockState_NullPanel" xml:space="preserve">
+    <value>The dock panel is null.</value>
+  </data>
+  <data name="DockContentHandler_Show_InvalidBeforeContent" xml:space="preserve">
+    <value>Invalid beforeContent, it must be contained by the pane.</value>
+  </data>
+  <data name="DockContentHandler_Show_InvalidDockState" xml:space="preserve">
+    <value>Invalid DockState: Content can not be showed as "Unknown" or "Hidden".</value>
+  </data>
+  <data name="DockContentHandler_Show_InvalidPrevPane" xml:space="preserve">
+    <value>The previous pane is invalid. It can not be null, and its docking state must not be auto-hide.</value>
+  </data>
+  <data name="DockContentHandler_Show_NullDockPanel" xml:space="preserve">
+    <value>DockPanel can not be null.</value>
+  </data>
+  <data name="DockContentHandler_Show_NullPane" xml:space="preserve">
+    <value>The Pane can not be null.</value>
+  </data>
+  <data name="DockContentHandler_ShowHint_InvalidValue" xml:space="preserve">
+    <value>Invalid value, check DockableAreas property.</value>
+  </data>
+  <data name="DockHandler_TabPageContextMenuStrip_Description" xml:space="preserve">
+    <value>Context menu displayed for the dock pane tab strip.</value>
+  </data>
+  <data name="DockIndicator_ToolTipText" xml:space="preserve">
+    <value>Press SHIFT for docking to full side.</value>
+  </data>
+  <data name="DockPane_ActiveContent_InvalidValue" xml:space="preserve">
+    <value>Invalid Content: ActiveContent must be one of the visible contents, or null if there is no visible content.</value>
+  </data>
+  <data name="DockPane_Constructor_NullContent" xml:space="preserve">
+    <value>Invalid argument: Content can not be "null".</value>
+  </data>
+  <data name="DockPane_Constructor_NullDockPanel" xml:space="preserve">
+    <value>Invalid argument: The content's DockPanel can not be "null".</value>
+  </data>
+  <data name="DockPane_DockTo_InvalidContainer" xml:space="preserve">
+    <value>The specified container conflicts with the IsFloat property.</value>
+  </data>
+  <data name="DockPane_DockTo_NoPrevPane" xml:space="preserve">
+    <value>The previous pane does not exist in the nested docking pane collection.</value>
+  </data>
+  <data name="DockPane_DockTo_NullContainer" xml:space="preserve">
+    <value>The container can not be null.</value>
+  </data>
+  <data name="DockPane_DockTo_NullPrevPane" xml:space="preserve">
+    <value>The previous pane can not be null when the nested docking pane collection is not empty.</value>
+  </data>
+  <data name="DockPane_DockTo_SelfPrevPane" xml:space="preserve">
+    <value>The previous pane can not be itself.</value>
+  </data>
+  <data name="DockPane_FloatWindow_InvalidValue" xml:space="preserve">
+    <value>FloatWindow property can not be set to "null" when DockState is DockState.Float.</value>
+  </data>
+  <data name="DockPane_SetContentIndex_InvalidContent" xml:space="preserve">
+    <value>Invalid Content: Content not within the collection.</value>
+  </data>
+  <data name="DockPane_SetContentIndex_InvalidIndex" xml:space="preserve">
+    <value>Invalid Index: The index is out of range.</value>
+  </data>
+  <data name="DockPane_SetDockState_InvalidState" xml:space="preserve">
+    <value>The state for the dock pane is invalid.</value>
+  </data>
+  <data name="DockPaneCaption_ToolTipAutoHide" xml:space="preserve">
+    <value>Auto Hide</value>
+  </data>
+  <data name="DockPaneCaption_ToolTipClose" xml:space="preserve">
+    <value>Close</value>
+  </data>
+  <data name="DockPaneCaption_ToolTipOptions" xml:space="preserve">
+    <value>Options</value>
+  </data>
+  <data name="DockPanel_ActiveAutoHideContent_InvalidValue" xml:space="preserve">
+    <value>Invalid Content: The content must be auto-hide state and associates with this DockPanel.</value>
+  </data>
+  <data name="DockPanel_ActiveContentChanged_Description" xml:space="preserve">
+    <value>Occurs when the value of ActiveContentProperty changed.</value>
+  </data>
+  <data name="DockPanel_ActiveDocumentChanged_Description" xml:space="preserve">
+    <value>Occurs when the value of ActiveDocument property changed.</value>
+  </data>
+  <data name="DockPanel_ActivePaneChanged_Description" xml:space="preserve">
+    <value>Occurs when the value of ActivePane property changed.</value>
+  </data>
+  <data name="DockPanel_AllowEndUserDocking_Description" xml:space="preserve">
+    <value>Determines if the drag and drop docking is allowed.</value>
+  </data>
+  <data name="DockPanel_AllowEndUserNestedDocking_Description" xml:space="preserve">
+    <value>Determines if the drag and drop nested docking is allowed.</value>
+  </data>
+  <data name="DockPanel_ContentAdded_Description" xml:space="preserve">
+    <value>Occurs when a content added to the DockPanel.</value>
+  </data>
+  <data name="DockPanel_ContentRemoved_Description" xml:space="preserve">
+    <value>Occurs when a content removed from the DockPanel.</value>
+  </data>
+  <data name="DockPanel_DefaultFloatWindowSize_Description" xml:space="preserve">
+    <value>The default size of float window.</value>
+  </data>
+  <data name="DockPanel_Description" xml:space="preserve">
+    <value>Provides Visual Studio .Net style docking.</value>
+  </data>
+  <data name="DockPanel_DockBottomPortion_Description" xml:space="preserve">
+    <value>Size of the bottom docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels.</value>
+  </data>
+  <data name="DockPanel_DockLeftPortion_Description" xml:space="preserve">
+    <value>Size of the left docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels.</value>
+  </data>
+  <data name="DockPanel_DockRightPortion_Description" xml:space="preserve">
+    <value>Size of the right docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels.</value>
+  </data>
+  <data name="DockPanel_DockTopPortion_Description" xml:space="preserve">
+    <value>Size of the top docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels.</value>
+  </data>
+  <data name="DockPanel_DocumentStyle_Description" xml:space="preserve">
+    <value>The style of the document window.</value>
+  </data>
+  <data name="DockPanel_LoadFromXml_AlreadyInitialized" xml:space="preserve">
+    <value>The DockPanel has already been initialized.</value>
+  </data>
+  <data name="DockPanel_LoadFromXml_InvalidFormatVersion" xml:space="preserve">
+    <value>The configuration file's version is invalid.</value>
+  </data>
+  <data name="DockPanel_LoadFromXml_InvalidXmlFormat" xml:space="preserve">
+    <value>The XML file format is invalid.</value>
+  </data>
+  <data name="DockPanel_ParentForm_Invalid" xml:space="preserve">
+    <value>Invalid parent form. When using DockingMdi or SystemMdi document style, the DockPanel control must be the child control of the main MDI container form.</value>
+  </data>
+  <data name="DockPanel_Persistor_XmlFileComment1" xml:space="preserve">
+    <value>DockPanel configuration file. Author: Weifen Luo, all rights reserved.</value>
+  </data>
+  <data name="DockPanel_Persistor_XmlFileComment2" xml:space="preserve">
+    <value>!!! AUTOMATICALLY GENERATED FILE. DO NOT MODIFY !!!</value>
+  </data>
+  <data name="DockPanel_RightToLeftLayout_Description" xml:space="preserve">
+    <value>Indicates whether the control layout is right-to-left when the RightToLeft property is set to Yes.</value>
+  </data>
+  <data name="DockPanel_SetPaneIndex_InvalidIndex" xml:space="preserve">
+    <value>Invalid Index: The index is out of range.</value>
+  </data>
+  <data name="DockPanel_SetPaneIndex_InvalidPane" xml:space="preserve">
+    <value>Invalid Pane: DockPane not within the collection.</value>
+  </data>
+  <data name="DockPanel_ShowDocumentIcon_Description" xml:space="preserve">
+    <value>Determines if the document icon will be displayed in the tab strip.</value>
+  </data>
+  <data name="DockPaneStrip_ToolTipClose" xml:space="preserve">
+    <value>Close</value>
+  </data>
+  <data name="DockPaneStrip_ToolTipWindowList" xml:space="preserve">
+    <value>Window List</value>
+  </data>
+  <data name="FloatWindow_Constructor_NullDockPanel" xml:space="preserve">
+    <value>Invalid argument: DockPanel can not be "null".</value>
+  </data>
+  <data name="FloatWindow_SetPaneIndex_InvalidIndex" xml:space="preserve">
+    <value>Invalid Index: The index is out of range.</value>
+  </data>
+  <data name="FloatWindow_SetPaneIndex_InvalidPane" xml:space="preserve">
+    <value>Invalid Pane: DockPane not within the collection.</value>
+  </data>
+  <data name="IDockDragSource_DockTo_InvalidPanel" xml:space="preserve">
+    <value>Invalid DockPanel.</value>
+  </data>
+  <data name="DockContent_CloseButtonVisible_Description" xml:space="preserve">
+    <value>Shows or hides the close button of the content. This property does not function with System MDI Document Style.</value>
+  </data>
+  <data name="DockPanel_DockPanelSkin" xml:space="preserve">
+    <value>The visual skin to use when displaying the docked windows.</value>
+  </data>
+  <data name="DockPanel_DocumentTabStripLocation" xml:space="preserve">
+    <value>Determines where the tab strip for Document style content is drawn.</value>
+  </data>
+</root>
\ No newline at end of file

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005AutoHideStrip.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005AutoHideStrip.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005AutoHideStrip.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,526 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Drawing.Drawing2D;
+using System.ComponentModel;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    internal class VS2005AutoHideStrip : AutoHideStripBase
+    {
+        private class TabVS2005 : Tab
+        {
+            internal TabVS2005(IDockContent content)
+                : base(content)
+            {
+            }
+
+            private int m_tabX = 0;
+            public int TabX
+            {
+                get { return m_tabX; }
+                set { m_tabX = value; }
+            }
+
+            private int m_tabWidth = 0;
+            public int TabWidth
+            {
+                get { return m_tabWidth; }
+                set { m_tabWidth = value; }
+            }
+
+        }
+
+        private const int _ImageHeight = 16;
+        private const int _ImageWidth = 16;
+        private const int _ImageGapTop = 2;
+        private const int _ImageGapLeft = 4;
+        private const int _ImageGapRight = 2;
+        private const int _ImageGapBottom = 2;
+        private const int _TextGapLeft = 0;
+        private const int _TextGapRight = 0;
+        private const int _TabGapTop = 3;
+        private const int _TabGapLeft = 4;
+        private const int _TabGapBetween = 10;
+
+        #region Customizable Properties
+        public Font TextFont
+        {
+            get { return DockPanel.Skin.AutoHideStripSkin.TextFont; }
+        }
+
+        private static StringFormat _stringFormatTabHorizontal;
+        private StringFormat StringFormatTabHorizontal
+        {
+            get
+            {
+                if (_stringFormatTabHorizontal == null)
+                {
+                    _stringFormatTabHorizontal = new StringFormat();
+                    _stringFormatTabHorizontal.Alignment = StringAlignment.Near;
+                    _stringFormatTabHorizontal.LineAlignment = StringAlignment.Center;
+                    _stringFormatTabHorizontal.FormatFlags = StringFormatFlags.NoWrap;
+                    _stringFormatTabHorizontal.Trimming = StringTrimming.None;
+                }
+
+                if (RightToLeft == RightToLeft.Yes)
+                    _stringFormatTabHorizontal.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
+                else
+                    _stringFormatTabHorizontal.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft;
+
+                return _stringFormatTabHorizontal;
+            }
+        }
+
+        private static StringFormat _stringFormatTabVertical;
+        private StringFormat StringFormatTabVertical
+        {
+            get
+            {
+                if (_stringFormatTabVertical == null)
+                {
+                    _stringFormatTabVertical = new StringFormat();
+                    _stringFormatTabVertical.Alignment = StringAlignment.Near;
+                    _stringFormatTabVertical.LineAlignment = StringAlignment.Center;
+                    _stringFormatTabVertical.FormatFlags = StringFormatFlags.NoWrap | StringFormatFlags.DirectionVertical;
+                    _stringFormatTabVertical.Trimming = StringTrimming.None;
+                }
+                if (RightToLeft == RightToLeft.Yes)
+                    _stringFormatTabVertical.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
+                else
+                    _stringFormatTabVertical.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft;
+
+                return _stringFormatTabVertical;
+            }
+        }
+
+        private static int ImageHeight
+        {
+            get { return _ImageHeight; }
+        }
+
+        private static int ImageWidth
+        {
+            get { return _ImageWidth; }
+        }
+
+        private static int ImageGapTop
+        {
+            get { return _ImageGapTop; }
+        }
+
+        private static int ImageGapLeft
+        {
+            get { return _ImageGapLeft; }
+        }
+
+        private static int ImageGapRight
+        {
+            get { return _ImageGapRight; }
+        }
+
+        private static int ImageGapBottom
+        {
+            get { return _ImageGapBottom; }
+        }
+
+        private static int TextGapLeft
+        {
+            get { return _TextGapLeft; }
+        }
+
+        private static int TextGapRight
+        {
+            get { return _TextGapRight; }
+        }
+
+        private static int TabGapTop
+        {
+            get { return _TabGapTop; }
+        }
+
+        private static int TabGapLeft
+        {
+            get { return _TabGapLeft; }
+        }
+
+        private static int TabGapBetween
+        {
+            get { return _TabGapBetween; }
+        }
+
+        private static Pen PenTabBorder
+        {
+            get { return SystemPens.GrayText; }
+        }
+        #endregion
+
+        private static Matrix _matrixIdentity = new Matrix();
+        private static Matrix MatrixIdentity
+        {
+            get { return _matrixIdentity; }
+        }
+
+        private static DockState[] _dockStates;
+        private static DockState[] DockStates
+        {
+            get
+            {
+                if (_dockStates == null)
+                {
+                    _dockStates = new DockState[4];
+                    _dockStates[0] = DockState.DockLeftAutoHide;
+                    _dockStates[1] = DockState.DockRightAutoHide;
+                    _dockStates[2] = DockState.DockTopAutoHide;
+                    _dockStates[3] = DockState.DockBottomAutoHide;
+                }
+                return _dockStates;
+            }
+        }
+
+        private static GraphicsPath _graphicsPath;
+        internal static GraphicsPath GraphicsPath
+        {
+            get
+            {
+                if (_graphicsPath == null)
+                    _graphicsPath = new GraphicsPath();
+
+                return _graphicsPath;
+            }
+        }
+
+        public VS2005AutoHideStrip(DockPanel panel)
+            : base(panel)
+        {
+            SetStyle(ControlStyles.ResizeRedraw |
+                ControlStyles.UserPaint |
+                ControlStyles.AllPaintingInWmPaint |
+                ControlStyles.OptimizedDoubleBuffer, true);
+            BackColor = SystemColors.ControlLight;
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            Graphics g = e.Graphics;
+
+            Color startColor = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.StartColor;
+            Color endColor = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.EndColor;
+            LinearGradientMode gradientMode = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.LinearGradientMode;
+            using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode))
+            {
+                g.FillRectangle(brush, ClientRectangle);
+            }
+
+            DrawTabStrip(g);
+        }
+
+        protected override void OnLayout(LayoutEventArgs levent)
+        {
+            CalculateTabs();
+            base.OnLayout(levent);
+        }
+
+        private void DrawTabStrip(Graphics g)
+        {
+            DrawTabStrip(g, DockState.DockTopAutoHide);
+            DrawTabStrip(g, DockState.DockBottomAutoHide);
+            DrawTabStrip(g, DockState.DockLeftAutoHide);
+            DrawTabStrip(g, DockState.DockRightAutoHide);
+        }
+
+        private void DrawTabStrip(Graphics g, DockState dockState)
+        {
+            Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+
+            if (rectTabStrip.IsEmpty)
+                return;
+
+            Matrix matrixIdentity = g.Transform;
+            if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
+            {
+                Matrix matrixRotated = new Matrix();
+                matrixRotated.RotateAt(90, new PointF((float)rectTabStrip.X + (float)rectTabStrip.Height / 2,
+                    (float)rectTabStrip.Y + (float)rectTabStrip.Height / 2));
+                g.Transform = matrixRotated;
+            }
+
+            foreach (Pane pane in GetPanes(dockState))
+            {
+                foreach (TabVS2005 tab in pane.AutoHideTabs)
+                    DrawTab(g, tab);
+            }
+            g.Transform = matrixIdentity;
+        }
+
+        private void CalculateTabs()
+        {
+            CalculateTabs(DockState.DockTopAutoHide);
+            CalculateTabs(DockState.DockBottomAutoHide);
+            CalculateTabs(DockState.DockLeftAutoHide);
+            CalculateTabs(DockState.DockRightAutoHide);
+        }
+
+        private void CalculateTabs(DockState dockState)
+        {
+            Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+
+            int imageHeight = rectTabStrip.Height - ImageGapTop - ImageGapBottom;
+            int imageWidth = ImageWidth;
+            if (imageHeight > ImageHeight)
+                imageWidth = ImageWidth * (imageHeight / ImageHeight);
+
+            int x = TabGapLeft + rectTabStrip.X;
+            foreach (Pane pane in GetPanes(dockState))
+            {
+                foreach (TabVS2005 tab in pane.AutoHideTabs)
+                {
+                    int width = imageWidth + ImageGapLeft + ImageGapRight +
+                        TextRenderer.MeasureText(tab.Content.DockHandler.TabText, TextFont).Width +
+                        TextGapLeft + TextGapRight;
+                    tab.TabX = x;
+                    tab.TabWidth = width;
+                    x += width;
+                }
+
+                x += TabGapBetween;
+            }
+        }
+
+        private Rectangle RtlTransform(Rectangle rect, DockState dockState)
+        {
+            Rectangle rectTransformed;
+            if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
+                rectTransformed = rect;
+            else
+                rectTransformed = DrawHelper.RtlTransform(this, rect);
+
+            return rectTransformed;
+        }
+
+        private GraphicsPath GetTabOutline(TabVS2005 tab, bool transformed, bool rtlTransform)
+        {
+            DockState dockState = tab.Content.DockHandler.DockState;
+            Rectangle rectTab = GetTabRectangle(tab, transformed);
+            if (rtlTransform)
+                rectTab = RtlTransform(rectTab, dockState);
+            bool upTab = (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockBottomAutoHide);
+            DrawHelper.GetRoundedCornerTab(GraphicsPath, rectTab, upTab);
+
+            return GraphicsPath;
+        }
+
+        private void DrawTab(Graphics g, TabVS2005 tab)
+        {
+            Rectangle rectTabOrigin = GetTabRectangle(tab);
+            if (rectTabOrigin.IsEmpty)
+                return;
+
+            DockState dockState = tab.Content.DockHandler.DockState;
+            IDockContent content = tab.Content;
+
+            GraphicsPath path = GetTabOutline(tab, false, true);
+
+            Color startColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.StartColor;
+            Color endColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.EndColor;
+            LinearGradientMode gradientMode = DockPanel.Skin.AutoHideStripSkin.TabGradient.LinearGradientMode;
+            g.FillPath(new LinearGradientBrush(rectTabOrigin, startColor, endColor, gradientMode), path);
+            g.DrawPath(PenTabBorder, path);
+
+            // Set no rotate for drawing icon and text
+            Matrix matrixRotate = g.Transform;
+            g.Transform = MatrixIdentity;
+
+            // Draw the icon
+            Rectangle rectImage = rectTabOrigin;
+            rectImage.X += ImageGapLeft;
+            rectImage.Y += ImageGapTop;
+            int imageHeight = rectTabOrigin.Height - ImageGapTop - ImageGapBottom;
+            int imageWidth = ImageWidth;
+            if (imageHeight > ImageHeight)
+                imageWidth = ImageWidth * (imageHeight / ImageHeight);
+            rectImage.Height = imageHeight;
+            rectImage.Width = imageWidth;
+            rectImage = GetTransformedRectangle(dockState, rectImage);
+
+            if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
+            {
+                // The DockState is DockLeftAutoHide or DockRightAutoHide, so rotate the image 90 degrees to the right. 
+                Rectangle rectTransform = RtlTransform(rectImage, dockState);
+                Point[] rotationPoints =
+                { 
+                    new Point(rectTransform.X + rectTransform.Width, rectTransform.Y), 
+                    new Point(rectTransform.X + rectTransform.Width, rectTransform.Y + rectTransform.Height), 
+                    new Point(rectTransform.X, rectTransform.Y)
+                };
+
+                using (Icon rotatedIcon = new Icon(((Form)content).Icon, 16, 16))
+                {
+                    g.DrawImage(rotatedIcon.ToBitmap(), rotationPoints);
+                }
+            }
+            else
+            {
+                // Draw the icon normally without any rotation.
+                g.DrawIcon(((Form)content).Icon, RtlTransform(rectImage, dockState));
+            }
+
+            // Draw the text
+            Rectangle rectText = rectTabOrigin;
+            rectText.X += ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft;
+            rectText.Width -= ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft;
+            rectText = RtlTransform(GetTransformedRectangle(dockState, rectText), dockState);
+
+            Color textColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.TextColor;
+
+            if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
+                g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, StringFormatTabVertical);
+            else
+                g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, StringFormatTabHorizontal);
+
+            // Set rotate back
+            g.Transform = matrixRotate;
+        }
+
+        private Rectangle GetLogicalTabStripRectangle(DockState dockState)
+        {
+            return GetLogicalTabStripRectangle(dockState, false);
+        }
+
+        private Rectangle GetLogicalTabStripRectangle(DockState dockState, bool transformed)
+        {
+            if (!DockHelper.IsDockStateAutoHide(dockState))
+                return Rectangle.Empty;
+
+            int leftPanes = GetPanes(DockState.DockLeftAutoHide).Count;
+            int rightPanes = GetPanes(DockState.DockRightAutoHide).Count;
+            int topPanes = GetPanes(DockState.DockTopAutoHide).Count;
+            int bottomPanes = GetPanes(DockState.DockBottomAutoHide).Count;
+
+            int x, y, width, height;
+
+            height = MeasureHeight();
+            if (dockState == DockState.DockLeftAutoHide && leftPanes > 0)
+            {
+                x = 0;
+                y = (topPanes == 0) ? 0 : height;
+                width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 : height);
+            }
+            else if (dockState == DockState.DockRightAutoHide && rightPanes > 0)
+            {
+                x = Width - height;
+                if (leftPanes != 0 && x < height)
+                    x = height;
+                y = (topPanes == 0) ? 0 : height;
+                width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 : height);
+            }
+            else if (dockState == DockState.DockTopAutoHide && topPanes > 0)
+            {
+                x = leftPanes == 0 ? 0 : height;
+                y = 0;
+                width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
+            }
+            else if (dockState == DockState.DockBottomAutoHide && bottomPanes > 0)
+            {
+                x = leftPanes == 0 ? 0 : height;
+                y = Height - height;
+                if (topPanes != 0 && y < height)
+                    y = height;
+                width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
+            }
+            else
+                return Rectangle.Empty;
+
+            if (!transformed)
+                return new Rectangle(x, y, width, height);
+            else
+                return GetTransformedRectangle(dockState, new Rectangle(x, y, width, height));
+        }
+
+        private Rectangle GetTabRectangle(TabVS2005 tab)
+        {
+            return GetTabRectangle(tab, false);
+        }
+
+        private Rectangle GetTabRectangle(TabVS2005 tab, bool transformed)
+        {
+            DockState dockState = tab.Content.DockHandler.DockState;
+            Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+
+            if (rectTabStrip.IsEmpty)
+                return Rectangle.Empty;
+
+            int x = tab.TabX;
+            int y = rectTabStrip.Y +
+                (dockState == DockState.DockTopAutoHide || dockState == DockState.DockRightAutoHide ?
+                0 : TabGapTop);
+            int width = tab.TabWidth;
+            int height = rectTabStrip.Height - TabGapTop;
+
+            if (!transformed)
+                return new Rectangle(x, y, width, height);
+            else
+                return GetTransformedRectangle(dockState, new Rectangle(x, y, width, height));
+        }
+
+        private Rectangle GetTransformedRectangle(DockState dockState, Rectangle rect)
+        {
+            if (dockState != DockState.DockLeftAutoHide && dockState != DockState.DockRightAutoHide)
+                return rect;
+
+            PointF[] pts = new PointF[1];
+            // the center of the rectangle
+            pts[0].X = (float)rect.X + (float)rect.Width / 2;
+            pts[0].Y = (float)rect.Y + (float)rect.Height / 2;
+            Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+            Matrix matrix = new Matrix();
+            matrix.RotateAt(90, new PointF((float)rectTabStrip.X + (float)rectTabStrip.Height / 2,
+                (float)rectTabStrip.Y + (float)rectTabStrip.Height / 2));
+            matrix.TransformPoints(pts);
+
+            return new Rectangle((int)(pts[0].X - (float)rect.Height / 2 + .5F),
+                (int)(pts[0].Y - (float)rect.Width / 2 + .5F),
+                rect.Height, rect.Width);
+        }
+
+        protected override IDockContent HitTest(Point ptMouse)
+        {
+            foreach (DockState state in DockStates)
+            {
+                Rectangle rectTabStrip = GetLogicalTabStripRectangle(state, true);
+                if (!rectTabStrip.Contains(ptMouse))
+                    continue;
+
+                foreach (Pane pane in GetPanes(state))
+                {
+                    foreach (TabVS2005 tab in pane.AutoHideTabs)
+                    {
+                        GraphicsPath path = GetTabOutline(tab, true, true);
+                        if (path.IsVisible(ptMouse))
+                            return tab.Content;
+                    }
+                }
+            }
+
+            return null;
+        }
+
+        protected internal override int MeasureHeight()
+        {
+            return Math.Max(ImageGapBottom +
+                ImageGapTop + ImageHeight,
+                TextFont.Height) + TabGapTop;
+        }
+
+        protected override void OnRefreshChanges()
+        {
+            CalculateTabs();
+            Invalidate();
+        }
+
+        protected override AutoHideStripBase.Tab CreateTab(IDockContent content)
+        {
+            return new TabVS2005(content);
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneCaption.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneCaption.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneCaption.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,480 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+using System.ComponentModel;
+using System.Windows.Forms.VisualStyles;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal class VS2005DockPaneCaption : DockPaneCaptionBase
+	{
+        private sealed class InertButton : InertButtonBase
+        {
+            private Bitmap m_image, m_imageAutoHide;
+
+            public InertButton(VS2005DockPaneCaption dockPaneCaption, Bitmap image, Bitmap imageAutoHide)
+                : base()
+            {
+                m_dockPaneCaption = dockPaneCaption;
+                m_image = image;
+                m_imageAutoHide = imageAutoHide;
+                RefreshChanges();
+            }
+
+            private VS2005DockPaneCaption m_dockPaneCaption;
+            private VS2005DockPaneCaption DockPaneCaption
+            {
+                get { return m_dockPaneCaption; }
+            }
+
+            public bool IsAutoHide
+            {
+                get { return DockPaneCaption.DockPane.IsAutoHide; }
+            }
+
+            public override Bitmap Image
+            {
+                get { return IsAutoHide ? m_imageAutoHide : m_image; }
+            }
+
+            protected override void OnRefreshChanges()
+            {
+                if (DockPaneCaption.DockPane.DockPanel != null)
+                {
+                    if (DockPaneCaption.TextColor != ForeColor)
+                    {
+                        ForeColor = DockPaneCaption.TextColor;
+                        Invalidate();
+                    }
+                }
+            }
+        }
+
+		#region consts
+		private const int _TextGapTop = 2;
+		private const int _TextGapBottom = 0;
+		private const int _TextGapLeft = 3;
+		private const int _TextGapRight = 3;
+		private const int _ButtonGapTop = 2;
+		private const int _ButtonGapBottom = 1;
+		private const int _ButtonGapBetween = 1;
+		private const int _ButtonGapLeft = 1;
+		private const int _ButtonGapRight = 2;
+		#endregion
+
+        private static Bitmap _imageButtonClose;
+        private static Bitmap ImageButtonClose
+        {
+            get
+            {
+                if (_imageButtonClose == null)
+                    _imageButtonClose = Resources.DockPane_Close;
+
+                return _imageButtonClose;
+            }
+        }
+
+		private InertButton m_buttonClose;
+        private InertButton ButtonClose
+        {
+            get
+            {
+                if (m_buttonClose == null)
+                {
+                    m_buttonClose = new InertButton(this, ImageButtonClose, ImageButtonClose);
+                    m_toolTip.SetToolTip(m_buttonClose, ToolTipClose);
+                    m_buttonClose.Click += new EventHandler(Close_Click);
+                    Controls.Add(m_buttonClose);
+                }
+
+                return m_buttonClose;
+            }
+        }
+
+        private static Bitmap _imageButtonAutoHide;
+        private static Bitmap ImageButtonAutoHide
+        {
+            get
+            {
+                if (_imageButtonAutoHide == null)
+                    _imageButtonAutoHide = Resources.DockPane_AutoHide;
+
+                return _imageButtonAutoHide;
+            }
+        }
+
+        private static Bitmap _imageButtonDock;
+        private static Bitmap ImageButtonDock
+        {
+            get
+            {
+                if (_imageButtonDock == null)
+                    _imageButtonDock = Resources.DockPane_Dock;
+
+                return _imageButtonDock;
+            }
+        }
+
+        private InertButton m_buttonAutoHide;
+        private InertButton ButtonAutoHide
+        {
+            get
+            {
+                if (m_buttonAutoHide == null)
+                {
+                    m_buttonAutoHide = new InertButton(this, ImageButtonDock, ImageButtonAutoHide);
+                    m_toolTip.SetToolTip(m_buttonAutoHide, ToolTipAutoHide);
+                    m_buttonAutoHide.Click += new EventHandler(AutoHide_Click);
+                    Controls.Add(m_buttonAutoHide);
+                }
+
+                return m_buttonAutoHide;
+            }
+        }
+
+        private static Bitmap _imageButtonOptions;
+        private static Bitmap ImageButtonOptions
+        {
+            get
+            {
+                if (_imageButtonOptions == null)
+                    _imageButtonOptions = Resources.DockPane_Option;
+
+                return _imageButtonOptions;
+            }
+        }
+
+        private InertButton m_buttonOptions;
+        private InertButton ButtonOptions
+        {
+            get
+            {
+                if (m_buttonOptions == null)
+                {
+                    m_buttonOptions = new InertButton(this, ImageButtonOptions, ImageButtonOptions);
+                    m_toolTip.SetToolTip(m_buttonOptions, ToolTipOptions);
+                    m_buttonOptions.Click += new EventHandler(Options_Click);
+                    Controls.Add(m_buttonOptions);
+                }
+                return m_buttonOptions;
+            }
+        }
+
+        private IContainer m_components;
+        private IContainer Components
+        {
+            get { return m_components; }
+        }
+
+		private ToolTip m_toolTip;
+
+		public VS2005DockPaneCaption(DockPane pane) : base(pane)
+		{
+			SuspendLayout();
+
+            m_components = new Container();
+            m_toolTip = new ToolTip(Components);
+
+			ResumeLayout();
+		}
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+                Components.Dispose();
+            base.Dispose(disposing);
+        }
+
+		private static int TextGapTop
+		{
+			get	{	return _TextGapTop;	}
+		}
+
+        public Font TextFont
+        {
+            get { return DockPane.DockPanel.Skin.DockPaneStripSkin.TextFont; }
+        }
+
+		private static int TextGapBottom
+		{
+			get	{	return _TextGapBottom;	}
+		}
+
+		private static int TextGapLeft
+		{
+			get	{	return _TextGapLeft;	}
+		}
+
+		private static int TextGapRight
+		{
+			get	{	return _TextGapRight;	}
+		}
+
+		private static int ButtonGapTop
+		{
+			get	{	return _ButtonGapTop;	}
+		}
+
+		private static int ButtonGapBottom
+		{
+			get	{	return _ButtonGapBottom;	}
+		}
+
+		private static int ButtonGapLeft
+		{
+			get	{	return _ButtonGapLeft;	}
+		}
+
+		private static int ButtonGapRight
+		{
+			get	{	return _ButtonGapRight;	}
+		}
+
+		private static int ButtonGapBetween
+		{
+			get	{	return _ButtonGapBetween;	}
+		}
+
+		private static string _toolTipClose;
+		private static string ToolTipClose
+		{
+			get
+			{	
+				if (_toolTipClose == null)
+					_toolTipClose = Strings.DockPaneCaption_ToolTipClose;
+				return _toolTipClose;
+			}
+		}
+
+        private static string _toolTipOptions;
+        private static string ToolTipOptions
+        {
+            get
+            {
+                if (_toolTipOptions == null)
+                    _toolTipOptions = Strings.DockPaneCaption_ToolTipOptions;
+
+                return _toolTipOptions;
+            }
+        }
+
+		private static string _toolTipAutoHide;
+		private static string ToolTipAutoHide
+		{
+			get
+			{	
+				if (_toolTipAutoHide == null)
+					_toolTipAutoHide = Strings.DockPaneCaption_ToolTipAutoHide;
+				return _toolTipAutoHide;
+			}
+		}
+
+        private static Blend _activeBackColorGradientBlend;
+        private static Blend ActiveBackColorGradientBlend
+        {
+            get
+            {
+                if (_activeBackColorGradientBlend == null)
+                {
+                    Blend blend = new Blend(2);
+
+                    blend.Factors = new float[]{0.5F, 1.0F};
+                    blend.Positions = new float[]{0.0F, 1.0F};
+                    _activeBackColorGradientBlend = blend;
+                }
+
+                return _activeBackColorGradientBlend;
+            }
+        }
+
+        private Color TextColor
+        {
+            get
+            {
+                if (DockPane.IsActivated)
+                    return DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.TextColor;
+                else
+                    return DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.TextColor;
+            }
+        }
+
+		private static TextFormatFlags _textFormat =
+            TextFormatFlags.SingleLine |
+            TextFormatFlags.EndEllipsis |
+            TextFormatFlags.VerticalCenter;
+		private TextFormatFlags TextFormat
+		{
+            get
+            {
+                if (RightToLeft == RightToLeft.No)
+                    return _textFormat;
+                else
+                    return _textFormat | TextFormatFlags.RightToLeft | TextFormatFlags.Right;
+            }
+		}
+
+		protected internal override int MeasureHeight()
+		{
+			int height = TextFont.Height + TextGapTop + TextGapBottom;
+
+			if (height < ButtonClose.Image.Height + ButtonGapTop + ButtonGapBottom)
+				height = ButtonClose.Image.Height + ButtonGapTop + ButtonGapBottom;
+
+			return height;
+		}
+
+		protected override void OnPaint(PaintEventArgs e)
+		{
+			base.OnPaint (e);
+			DrawCaption(e.Graphics);
+		}
+
+		private void DrawCaption(Graphics g)
+		{
+            if (ClientRectangle.Width == 0 || ClientRectangle.Height == 0)
+                return;
+
+            if (DockPane.IsActivated)
+            {
+                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.StartColor;
+                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.EndColor;
+                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.LinearGradientMode;
+                using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode))
+                {
+                    brush.Blend = ActiveBackColorGradientBlend;
+                    g.FillRectangle(brush, ClientRectangle);
+                }
+            }
+            else
+            {
+                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.StartColor;
+                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.EndColor;
+                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.LinearGradientMode;
+                using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode))
+                {
+                    g.FillRectangle(brush, ClientRectangle);
+                }
+            }
+
+			Rectangle rectCaption = ClientRectangle;
+
+			Rectangle rectCaptionText = rectCaption;
+            rectCaptionText.X += TextGapLeft;
+            rectCaptionText.Width -= TextGapLeft + TextGapRight;
+            rectCaptionText.Width -= ButtonGapLeft + ButtonClose.Width + ButtonGapRight;
+            if (ShouldShowAutoHideButton)
+                rectCaptionText.Width -= ButtonAutoHide.Width + ButtonGapBetween;
+            if (HasTabPageContextMenu)
+                rectCaptionText.Width -= ButtonOptions.Width + ButtonGapBetween;
+			rectCaptionText.Y += TextGapTop;
+			rectCaptionText.Height -= TextGapTop + TextGapBottom;
+
+            Color colorText;
+            if (DockPane.IsActivated)
+                colorText = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.TextColor;
+            else
+                colorText = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.TextColor;
+
+            TextRenderer.DrawText(g, DockPane.CaptionText, TextFont, DrawHelper.RtlTransform(this, rectCaptionText), colorText, TextFormat);
+		}
+
+		protected override void OnLayout(LayoutEventArgs levent)
+		{
+			SetButtonsPosition();
+			base.OnLayout (levent);
+		}
+
+		protected override void OnRefreshChanges()
+		{
+			SetButtons();
+			Invalidate();
+		}
+
+		private bool CloseButtonEnabled
+		{
+			get	{	return (DockPane.ActiveContent != null)? DockPane.ActiveContent.DockHandler.CloseButton : false;	}
+		}
+
+        /// <summary>
+        /// Determines whether the close button is visible on the content
+        /// </summary>
+        private bool CloseButtonVisible
+        {
+            get { return (DockPane.ActiveContent != null) ? DockPane.ActiveContent.DockHandler.CloseButtonVisible : false; }
+        }
+
+		private bool ShouldShowAutoHideButton
+		{
+			get	{	return !DockPane.IsFloat;	}
+		}
+
+		private void SetButtons()
+		{
+			ButtonClose.Enabled = CloseButtonEnabled;
+            ButtonClose.Visible = CloseButtonVisible;
+			ButtonAutoHide.Visible = ShouldShowAutoHideButton;
+            ButtonOptions.Visible = HasTabPageContextMenu;
+            ButtonClose.RefreshChanges();
+            ButtonAutoHide.RefreshChanges();
+            ButtonOptions.RefreshChanges();
+			
+			SetButtonsPosition();
+		}
+
+		private void SetButtonsPosition()
+		{
+			// set the size and location for close and auto-hide buttons
+			Rectangle rectCaption = ClientRectangle;
+			int buttonWidth = ButtonClose.Image.Width;
+			int buttonHeight = ButtonClose.Image.Height;
+			int height = rectCaption.Height - ButtonGapTop - ButtonGapBottom;
+			if (buttonHeight < height)
+			{
+				buttonWidth = buttonWidth * (height / buttonHeight);
+				buttonHeight = height;
+			}
+			Size buttonSize = new Size(buttonWidth, buttonHeight);
+			int x = rectCaption.X + rectCaption.Width - 1 - ButtonGapRight - m_buttonClose.Width;
+			int y = rectCaption.Y + ButtonGapTop;
+			Point point = new Point(x, y);
+            ButtonClose.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+
+            // If the close button is not visible draw the auto hide button overtop.
+            // Otherwise it is drawn to the left of the close button.
+            if (CloseButtonVisible)
+			    point.Offset(-(buttonWidth + ButtonGapBetween), 0);
+            
+            ButtonAutoHide.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+            if (ShouldShowAutoHideButton)
+                point.Offset(-(buttonWidth + ButtonGapBetween), 0);
+            ButtonOptions.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+		}
+
+		private void Close_Click(object sender, EventArgs e)
+		{
+			DockPane.CloseActiveContent();
+		}
+
+		private void AutoHide_Click(object sender, EventArgs e)
+		{
+			DockPane.DockState = DockHelper.ToggleAutoHideState(DockPane.DockState);
+            if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
+            {
+                DockPane.DockPanel.ActiveAutoHideContent = null;
+                DockPane.NestedDockingStatus.NestedPanes.SwitchPaneWithFirstChild(DockPane);
+            }
+		}
+
+        private void Options_Click(object sender, EventArgs e)
+        {
+            ShowTabPageContextMenu(PointToClient(Control.MousePosition));
+        }
+
+        protected override void OnRightToLeftChanged(EventArgs e)
+        {
+            base.OnRightToLeftChanged(e);
+            PerformLayout();
+        }
+	}
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneStrip.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneStrip.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VS2005DockPaneStrip.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,1492 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+using System.ComponentModel;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	internal class VS2005DockPaneStrip : DockPaneStripBase
+	{
+        private class TabVS2005 : Tab
+        {
+            public TabVS2005(IDockContent content)
+                : base(content)
+            {
+            }
+
+            private int m_tabX;
+            public int TabX
+            {
+                get { return m_tabX; }
+                set { m_tabX = value; }
+            }
+
+            private int m_tabWidth;
+            public int TabWidth
+            {
+                get { return m_tabWidth; }
+                set { m_tabWidth = value; }
+            }
+
+            private int m_maxWidth;
+            public int MaxWidth
+            {
+                get { return m_maxWidth; }
+                set { m_maxWidth = value; }
+            }
+
+            private bool m_flag;
+            protected internal bool Flag
+            {
+                get { return m_flag; }
+                set { m_flag = value; }
+            }
+        }
+
+        protected internal override DockPaneStripBase.Tab CreateTab(IDockContent content)
+        {
+            return new TabVS2005(content);
+        }
+
+        private sealed class InertButton : InertButtonBase
+        {
+            private Bitmap m_image0, m_image1;
+
+            public InertButton(Bitmap image0, Bitmap image1)
+                : base()
+            {
+                m_image0 = image0;
+                m_image1 = image1;
+            }
+
+            private int m_imageCategory = 0;
+            public int ImageCategory
+            {
+                get { return m_imageCategory; }
+                set
+                {
+                    if (m_imageCategory == value)
+                        return;
+
+                    m_imageCategory = value;
+                    Invalidate();
+                }
+            }
+
+            public override Bitmap Image
+            {
+                get { return ImageCategory == 0 ? m_image0 : m_image1; }
+            }
+        }
+
+        #region Constants
+
+        private const int _ToolWindowStripGapTop = 0;
+        private const int _ToolWindowStripGapBottom = 1;
+        private const int _ToolWindowStripGapLeft = 0;
+        private const int _ToolWindowStripGapRight = 0;
+        private const int _ToolWindowImageHeight = 16;
+        private const int _ToolWindowImageWidth = 16;
+        private const int _ToolWindowImageGapTop = 3;
+        private const int _ToolWindowImageGapBottom = 1;
+        private const int _ToolWindowImageGapLeft = 2;
+        private const int _ToolWindowImageGapRight = 0;
+        private const int _ToolWindowTextGapRight = 3;
+        private const int _ToolWindowTabSeperatorGapTop = 3;
+        private const int _ToolWindowTabSeperatorGapBottom = 3;
+
+        private const int _DocumentStripGapTop = 0;
+        private const int _DocumentStripGapBottom = 1;
+        private const int _DocumentTabMaxWidth = 200;
+        private const int _DocumentButtonGapTop = 4;
+        private const int _DocumentButtonGapBottom = 4;
+        private const int _DocumentButtonGapBetween = 0;
+        private const int _DocumentButtonGapRight = 3;
+        private const int _DocumentTabGapTop = 3;
+        private const int _DocumentTabGapLeft = 3;
+        private const int _DocumentTabGapRight = 3;
+        private const int _DocumentIconGapBottom = 2;
+        private const int _DocumentIconGapLeft = 8;
+        private const int _DocumentIconGapRight = 0;
+        private const int _DocumentIconHeight = 16;
+        private const int _DocumentIconWidth = 16;
+        private const int _DocumentTextGapRight = 3;
+
+        #endregion
+
+        #region Members
+
+        private ContextMenuStrip m_selectMenu;
+        private static Bitmap m_imageButtonClose;
+        private InertButton m_buttonClose;
+        private static Bitmap m_imageButtonWindowList;
+        private static Bitmap m_imageButtonWindowListOverflow;
+        private InertButton m_buttonWindowList;
+        private IContainer m_components;
+        private ToolTip m_toolTip;
+        private Font m_font;
+        private Font m_boldFont;
+        private int m_startDisplayingTab = 0;
+        private int m_endDisplayingTab = 0;
+        private int m_firstDisplayingTab = 0;
+        private bool m_documentTabsOverflow = false;
+        private static string m_toolTipSelect;
+        private static string m_toolTipClose;
+        private bool m_closeButtonVisible = false;
+
+        #endregion
+
+        #region Properties
+
+        private Rectangle TabStripRectangle
+        {
+            get
+            {
+                if (Appearance == DockPane.AppearanceStyle.Document)
+                    return TabStripRectangle_Document;
+                else
+                    return TabStripRectangle_ToolWindow;
+            }
+        }
+
+        private Rectangle TabStripRectangle_ToolWindow
+        {
+            get
+            {
+                Rectangle rect = ClientRectangle;
+                return new Rectangle(rect.X, rect.Top + ToolWindowStripGapTop, rect.Width, rect.Height - ToolWindowStripGapTop - ToolWindowStripGapBottom);
+            }
+        }
+
+        private Rectangle TabStripRectangle_Document
+        {
+            get
+            {
+                Rectangle rect = ClientRectangle;
+                return new Rectangle(rect.X, rect.Top + DocumentStripGapTop, rect.Width, rect.Height - DocumentStripGapTop - ToolWindowStripGapBottom);
+            }
+        }
+
+        private Rectangle TabsRectangle
+        {
+            get
+            {
+                if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+                    return TabStripRectangle;
+
+                Rectangle rectWindow = TabStripRectangle;
+                int x = rectWindow.X;
+                int y = rectWindow.Y;
+                int width = rectWindow.Width;
+                int height = rectWindow.Height;
+
+                x += DocumentTabGapLeft;
+                width -= DocumentTabGapLeft +
+                    DocumentTabGapRight +
+                    DocumentButtonGapRight +
+                    ButtonClose.Width +
+                    ButtonWindowList.Width +
+                    2 * DocumentButtonGapBetween;
+
+                return new Rectangle(x, y, width, height);
+            }
+        }
+
+        private ContextMenuStrip SelectMenu
+        {
+            get { return m_selectMenu; }
+        }
+
+        private static Bitmap ImageButtonClose
+        {
+            get
+            {
+                if (m_imageButtonClose == null)
+                    m_imageButtonClose = Resources.DockPane_Close;
+
+                return m_imageButtonClose;
+            }
+        }
+
+        private InertButton ButtonClose
+        {
+            get
+            {
+                if (m_buttonClose == null)
+                {
+                    m_buttonClose = new InertButton(ImageButtonClose, ImageButtonClose);
+                    m_toolTip.SetToolTip(m_buttonClose, ToolTipClose);
+                    m_buttonClose.Click += new EventHandler(Close_Click);
+                    Controls.Add(m_buttonClose);
+                }
+
+                return m_buttonClose;
+            }
+        }
+
+        private static Bitmap ImageButtonWindowList
+        {
+            get
+            {
+                if (m_imageButtonWindowList == null)
+                    m_imageButtonWindowList = Resources.DockPane_Option;
+
+                return m_imageButtonWindowList;
+            }
+        }
+
+        private static Bitmap ImageButtonWindowListOverflow
+        {
+            get
+            {
+                if (m_imageButtonWindowListOverflow == null)
+                    m_imageButtonWindowListOverflow = Resources.DockPane_OptionOverflow;
+
+                return m_imageButtonWindowListOverflow;
+            }
+        }
+
+        private InertButton ButtonWindowList
+        {
+            get
+            {
+                if (m_buttonWindowList == null)
+                {
+                    m_buttonWindowList = new InertButton(ImageButtonWindowList, ImageButtonWindowListOverflow);
+                    m_toolTip.SetToolTip(m_buttonWindowList, ToolTipSelect);
+                    m_buttonWindowList.Click += new EventHandler(WindowList_Click);
+                    Controls.Add(m_buttonWindowList);
+                }
+
+                return m_buttonWindowList;
+            }
+        }
+
+        private static GraphicsPath GraphicsPath
+        {
+            get { return VS2005AutoHideStrip.GraphicsPath; }
+        }
+
+        private IContainer Components
+        {
+            get { return m_components; }
+        }
+
+        public Font TextFont
+        {
+            get { return DockPane.DockPanel.Skin.DockPaneStripSkin.TextFont; }
+        }
+
+        private Font BoldFont
+        {
+            get
+            {
+                if (IsDisposed)
+                    return null;
+
+                if (m_boldFont == null)
+                {
+                    m_font = TextFont;
+                    m_boldFont = new Font(TextFont, FontStyle.Bold);
+                }
+                else if (m_font != TextFont)
+                {
+                    m_boldFont.Dispose();
+                    m_font = TextFont;
+                    m_boldFont = new Font(TextFont, FontStyle.Bold);
+                }
+
+                return m_boldFont;
+            }
+        }
+
+        private int StartDisplayingTab
+        {
+            get { return m_startDisplayingTab; }
+            set
+            {
+                m_startDisplayingTab = value;
+                Invalidate();
+            }
+        }
+
+        private int EndDisplayingTab
+        {
+            get { return m_endDisplayingTab; }
+            set { m_endDisplayingTab = value; }
+        }
+
+        private int FirstDisplayingTab
+        {
+            get { return m_firstDisplayingTab; }
+            set { m_firstDisplayingTab = value; }
+        }
+
+        private bool DocumentTabsOverflow
+        {
+            set
+            {
+                if (m_documentTabsOverflow == value)
+                    return;
+
+                m_documentTabsOverflow = value;
+                if (value)
+                    ButtonWindowList.ImageCategory = 1;
+                else
+                    ButtonWindowList.ImageCategory = 0;
+            }
+        }
+
+        #region Customizable Properties
+
+        private static int ToolWindowStripGapTop
+        {
+            get { return _ToolWindowStripGapTop; }
+        }
+
+        private static int ToolWindowStripGapBottom
+        {
+            get { return _ToolWindowStripGapBottom; }
+        }
+
+        private static int ToolWindowStripGapLeft
+        {
+            get { return _ToolWindowStripGapLeft; }
+        }
+
+        private static int ToolWindowStripGapRight
+        {
+            get { return _ToolWindowStripGapRight; }
+        }
+
+        private static int ToolWindowImageHeight
+        {
+            get { return _ToolWindowImageHeight; }
+        }
+
+        private static int ToolWindowImageWidth
+        {
+            get { return _ToolWindowImageWidth; }
+        }
+
+        private static int ToolWindowImageGapTop
+        {
+            get { return _ToolWindowImageGapTop; }
+        }
+
+        private static int ToolWindowImageGapBottom
+        {
+            get { return _ToolWindowImageGapBottom; }
+        }
+
+        private static int ToolWindowImageGapLeft
+        {
+            get { return _ToolWindowImageGapLeft; }
+        }
+
+        private static int ToolWindowImageGapRight
+        {
+            get { return _ToolWindowImageGapRight; }
+        }
+
+        private static int ToolWindowTextGapRight
+        {
+            get { return _ToolWindowTextGapRight; }
+        }
+
+        private static int ToolWindowTabSeperatorGapTop
+        {
+            get { return _ToolWindowTabSeperatorGapTop; }
+        }
+
+        private static int ToolWindowTabSeperatorGapBottom
+        {
+            get { return _ToolWindowTabSeperatorGapBottom; }
+        }
+
+        private static string ToolTipClose
+        {
+            get
+            {
+                if (m_toolTipClose == null)
+                    m_toolTipClose = Strings.DockPaneStrip_ToolTipClose;
+                return m_toolTipClose;
+            }
+        }
+
+        private static string ToolTipSelect
+        {
+            get
+            {
+                if (m_toolTipSelect == null)
+                    m_toolTipSelect = Strings.DockPaneStrip_ToolTipWindowList;
+                return m_toolTipSelect;
+            }
+        }
+
+        private TextFormatFlags ToolWindowTextFormat
+        {
+            get
+            {
+                TextFormatFlags textFormat = TextFormatFlags.EndEllipsis |
+                    TextFormatFlags.HorizontalCenter |
+                    TextFormatFlags.SingleLine |
+                    TextFormatFlags.VerticalCenter;
+                if (RightToLeft == RightToLeft.Yes)
+                    return textFormat | TextFormatFlags.RightToLeft | TextFormatFlags.Right;
+                else
+                    return textFormat;
+            }
+        }
+
+        private static int DocumentStripGapTop
+        {
+            get { return _DocumentStripGapTop; }
+        }
+
+        private static int DocumentStripGapBottom
+        {
+            get { return _DocumentStripGapBottom; }
+        }
+
+        private TextFormatFlags DocumentTextFormat
+        {
+            get
+            {
+                TextFormatFlags textFormat = TextFormatFlags.EndEllipsis |
+                    TextFormatFlags.SingleLine |
+                    TextFormatFlags.VerticalCenter |
+                    TextFormatFlags.HorizontalCenter;
+                if (RightToLeft == RightToLeft.Yes)
+                    return textFormat | TextFormatFlags.RightToLeft;
+                else
+                    return textFormat;
+            }
+        }
+
+        private static int DocumentTabMaxWidth
+        {
+            get { return _DocumentTabMaxWidth; }
+        }
+
+        private static int DocumentButtonGapTop
+        {
+            get { return _DocumentButtonGapTop; }
+        }
+
+        private static int DocumentButtonGapBottom
+        {
+            get { return _DocumentButtonGapBottom; }
+        }
+
+        private static int DocumentButtonGapBetween
+        {
+            get { return _DocumentButtonGapBetween; }
+        }
+
+        private static int DocumentButtonGapRight
+        {
+            get { return _DocumentButtonGapRight; }
+        }
+
+        private static int DocumentTabGapTop
+        {
+            get { return _DocumentTabGapTop; }
+        }
+
+        private static int DocumentTabGapLeft
+        {
+            get { return _DocumentTabGapLeft; }
+        }
+
+        private static int DocumentTabGapRight
+        {
+            get { return _DocumentTabGapRight; }
+        }
+
+        private static int DocumentIconGapBottom
+        {
+            get { return _DocumentIconGapBottom; }
+        }
+
+        private static int DocumentIconGapLeft
+        {
+            get { return _DocumentIconGapLeft; }
+        }
+
+        private static int DocumentIconGapRight
+        {
+            get { return _DocumentIconGapRight; }
+        }
+
+        private static int DocumentIconWidth
+        {
+            get { return _DocumentIconWidth; }
+        }
+
+        private static int DocumentIconHeight
+        {
+            get { return _DocumentIconHeight; }
+        }
+
+        private static int DocumentTextGapRight
+        {
+            get { return _DocumentTextGapRight; }
+        }
+
+        private static Pen PenToolWindowTabBorder
+        {
+            get { return SystemPens.GrayText; }
+        }
+
+        private static Pen PenDocumentTabActiveBorder
+        {
+            get { return SystemPens.ControlDarkDark; }
+        }
+
+        private static Pen PenDocumentTabInactiveBorder
+        {
+            get { return SystemPens.GrayText; }
+        }
+
+        #endregion
+
+        #endregion
+
+        public VS2005DockPaneStrip(DockPane pane)
+            : base(pane)
+        {
+            SetStyle(ControlStyles.ResizeRedraw |
+                ControlStyles.UserPaint |
+                ControlStyles.AllPaintingInWmPaint |
+                ControlStyles.OptimizedDoubleBuffer, true);
+
+            SuspendLayout();
+
+            m_components = new Container();
+            m_toolTip = new ToolTip(Components);
+            m_selectMenu = new ContextMenuStrip(Components);
+
+            ResumeLayout();
+        }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                Components.Dispose();
+                if (m_boldFont != null)
+                {
+                    m_boldFont.Dispose();
+                    m_boldFont = null;
+                }
+            }
+            base.Dispose(disposing);
+        }
+
+        protected internal override int MeasureHeight()
+        {
+            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+                return MeasureHeight_ToolWindow();
+            else
+                return MeasureHeight_Document();
+        }
+
+        private int MeasureHeight_ToolWindow()
+        {
+            if (DockPane.IsAutoHide || Tabs.Count <= 1)
+                return 0;
+
+            int height = Math.Max(TextFont.Height, ToolWindowImageHeight + ToolWindowImageGapTop + ToolWindowImageGapBottom)
+                + ToolWindowStripGapTop + ToolWindowStripGapBottom;
+
+            return height;
+        }
+
+        private int MeasureHeight_Document()
+        {
+            int height = Math.Max(TextFont.Height + DocumentTabGapTop,
+                ButtonClose.Height + DocumentButtonGapTop + DocumentButtonGapBottom)
+                + DocumentStripGapBottom + DocumentStripGapTop;
+
+            return height;
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            Rectangle rect = TabsRectangle;
+
+            if (Appearance == DockPane.AppearanceStyle.Document)
+            {
+                rect.X -= DocumentTabGapLeft;
+
+                // Add these values back in so that the DockStrip color is drawn
+                // beneath the close button and window list button.
+                rect.Width += DocumentTabGapLeft +
+                    DocumentTabGapRight +
+                    DocumentButtonGapRight +
+                    ButtonClose.Width +
+                    ButtonWindowList.Width;
+
+                // It is possible depending on the DockPanel DocumentStyle to have
+                // a Document without a DockStrip.
+                if (rect.Width > 0 && rect.Height > 0)
+                {
+                    Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.StartColor;
+                    Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.EndColor;
+                    LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.LinearGradientMode;
+                    using (LinearGradientBrush brush = new LinearGradientBrush(rect, startColor, endColor, gradientMode))
+                    {
+                        e.Graphics.FillRectangle(brush, rect);
+                    }
+                }
+            }
+            else
+            {
+                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.StartColor;
+                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.EndColor;
+                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.LinearGradientMode;
+                using (LinearGradientBrush brush = new LinearGradientBrush(rect, startColor, endColor, gradientMode))
+                {
+                    e.Graphics.FillRectangle(brush, rect);
+                }
+            }
+            base.OnPaint(e);
+            CalculateTabs();
+            if (Appearance == DockPane.AppearanceStyle.Document && DockPane.ActiveContent != null)
+            {
+                if (EnsureDocumentTabVisible(DockPane.ActiveContent, false))
+                    CalculateTabs();
+            }
+
+            DrawTabStrip(e.Graphics);
+        }
+
+        protected override void OnRefreshChanges()
+        {
+            SetInertButtons();
+            Invalidate();
+        }
+
+        protected internal override GraphicsPath GetOutline(int index)
+        {
+
+            if (Appearance == DockPane.AppearanceStyle.Document)
+                return GetOutline_Document(index);
+            else
+                return GetOutline_ToolWindow(index);
+
+        }
+
+        private GraphicsPath GetOutline_Document(int index)
+        {
+            Rectangle rectTab = GetTabRectangle(index);
+            rectTab.X -= rectTab.Height / 2;
+            rectTab.Intersect(TabsRectangle);
+            rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab));
+            Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle);
+
+            GraphicsPath path = new GraphicsPath();
+            GraphicsPath pathTab = GetTabOutline_Document(Tabs[index], true, true, true);
+            path.AddPath(pathTab, true);
+
+            if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+            {
+                path.AddLine(rectTab.Right, rectTab.Top, rectPaneClient.Right, rectTab.Top);
+                path.AddLine(rectPaneClient.Right, rectTab.Top, rectPaneClient.Right, rectPaneClient.Top);
+                path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Left, rectPaneClient.Top);
+                path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Left, rectTab.Top);
+                path.AddLine(rectPaneClient.Left, rectTab.Top, rectTab.Right, rectTab.Top);
+            }
+            else
+            {
+                path.AddLine(rectTab.Right, rectTab.Bottom, rectPaneClient.Right, rectTab.Bottom);
+                path.AddLine(rectPaneClient.Right, rectTab.Bottom, rectPaneClient.Right, rectPaneClient.Bottom);
+                path.AddLine(rectPaneClient.Right, rectPaneClient.Bottom, rectPaneClient.Left, rectPaneClient.Bottom);
+                path.AddLine(rectPaneClient.Left, rectPaneClient.Bottom, rectPaneClient.Left, rectTab.Bottom);
+                path.AddLine(rectPaneClient.Left, rectTab.Bottom, rectTab.Right, rectTab.Bottom);
+            }
+            return path;
+        }
+
+        private GraphicsPath GetOutline_ToolWindow(int index)
+        {
+            Rectangle rectTab = GetTabRectangle(index);
+            rectTab.Intersect(TabsRectangle);
+            rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab));
+            Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle);
+
+            GraphicsPath path = new GraphicsPath();
+            GraphicsPath pathTab = GetTabOutline(Tabs[index], true, true);
+            path.AddPath(pathTab, true);
+            path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top);
+            path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top);
+            path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top);
+            path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top);
+            path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top);
+            return path;
+        }
+
+        private void CalculateTabs()
+        {
+            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+                CalculateTabs_ToolWindow();
+            else
+                CalculateTabs_Document();
+        }
+
+        private void CalculateTabs_ToolWindow()
+        {
+            if (Tabs.Count <= 1 || DockPane.IsAutoHide)
+                return;
+
+            Rectangle rectTabStrip = TabStripRectangle;
+
+            // Calculate tab widths
+            int countTabs = Tabs.Count;
+            foreach (TabVS2005 tab in Tabs)
+            {
+                tab.MaxWidth = GetMaxTabWidth(Tabs.IndexOf(tab));
+                tab.Flag = false;
+            }
+
+            // Set tab whose max width less than average width
+            bool anyWidthWithinAverage = true;
+            int totalWidth = rectTabStrip.Width - ToolWindowStripGapLeft - ToolWindowStripGapRight;
+            int totalAllocatedWidth = 0;
+            int averageWidth = totalWidth / countTabs;
+            int remainedTabs = countTabs;
+            for (anyWidthWithinAverage = true; anyWidthWithinAverage && remainedTabs > 0; )
+            {
+                anyWidthWithinAverage = false;
+                foreach (TabVS2005 tab in Tabs)
+                {
+                    if (tab.Flag)
+                        continue;
+
+                    if (tab.MaxWidth <= averageWidth)
+                    {
+                        tab.Flag = true;
+                        tab.TabWidth = tab.MaxWidth;
+                        totalAllocatedWidth += tab.TabWidth;
+                        anyWidthWithinAverage = true;
+                        remainedTabs--;
+                    }
+                }
+                if (remainedTabs != 0)
+                    averageWidth = (totalWidth - totalAllocatedWidth) / remainedTabs;
+            }
+
+            // If any tab width not set yet, set it to the average width
+            if (remainedTabs > 0)
+            {
+                int roundUpWidth = (totalWidth - totalAllocatedWidth) - (averageWidth * remainedTabs);
+                foreach (TabVS2005 tab in Tabs)
+                {
+                    if (tab.Flag)
+                        continue;
+
+                    tab.Flag = true;
+                    if (roundUpWidth > 0)
+                    {
+                        tab.TabWidth = averageWidth + 1;
+                        roundUpWidth--;
+                    }
+                    else
+                        tab.TabWidth = averageWidth;
+                }
+            }
+
+            // Set the X position of the tabs
+            int x = rectTabStrip.X + ToolWindowStripGapLeft;
+            foreach (TabVS2005 tab in Tabs)
+            {
+                tab.TabX = x;
+                x += tab.TabWidth;
+            }
+        }
+
+        private bool CalculateDocumentTab(Rectangle rectTabStrip, ref int x, int index)
+        {
+            bool overflow = false;
+
+            TabVS2005 tab = Tabs[index] as TabVS2005;
+            tab.MaxWidth = GetMaxTabWidth(index);
+            int width = Math.Min(tab.MaxWidth, DocumentTabMaxWidth);
+            if (x + width < rectTabStrip.Right || index == StartDisplayingTab)
+            {
+                tab.TabX = x;
+                tab.TabWidth = width;
+                EndDisplayingTab = index;
+            }
+            else
+            {
+                tab.TabX = 0;
+                tab.TabWidth = 0;
+                overflow = true;
+            }
+            x += width;
+
+            return overflow;
+        }
+
+        /// <summary>
+        /// Calculate which tabs are displayed and in what order.
+        /// </summary>
+        private void CalculateTabs_Document()
+        {
+            if (m_startDisplayingTab >= Tabs.Count)
+                m_startDisplayingTab = 0;
+
+            Rectangle rectTabStrip = TabsRectangle;
+
+            int x = rectTabStrip.X + rectTabStrip.Height / 2;
+            bool overflow = false;
+
+            // Originally all new documents that were considered overflow
+            // (not enough pane strip space to show all tabs) were added to
+            // the far left (assuming not right to left) and the tabs on the
+            // right were dropped from view. If StartDisplayingTab is not 0
+            // then we are dealing with making sure a specific tab is kept in focus.
+            if (m_startDisplayingTab > 0)
+            {
+                int tempX = x;
+                TabVS2005 tab = Tabs[m_startDisplayingTab] as TabVS2005;
+                tab.MaxWidth = GetMaxTabWidth(m_startDisplayingTab);
+
+                // Add the active tab and tabs to the left
+                for (int i = StartDisplayingTab; i >= 0; i--)
+                    CalculateDocumentTab(rectTabStrip, ref tempX, i);
+
+                // Store which tab is the first one displayed so that it
+                // will be drawn correctly (without part of the tab cut off)
+                FirstDisplayingTab = EndDisplayingTab;
+
+                tempX = x; // Reset X location because we are starting over
+
+                // Start with the first tab displayed - name is a little misleading.
+                // Loop through each tab and set its location. If there is not enough
+                // room for all of them overflow will be returned.
+                for (int i = EndDisplayingTab; i < Tabs.Count; i++)
+                    overflow = CalculateDocumentTab(rectTabStrip, ref tempX, i);
+
+                // If not all tabs are shown then we have an overflow.
+                if (FirstDisplayingTab != 0)
+                    overflow = true;
+            }
+            else
+            {
+                for (int i = StartDisplayingTab; i < Tabs.Count; i++)
+                    overflow = CalculateDocumentTab(rectTabStrip, ref x, i);
+                for (int i = 0; i < StartDisplayingTab; i++)
+                    overflow = CalculateDocumentTab(rectTabStrip, ref x, i);
+
+                FirstDisplayingTab = StartDisplayingTab;
+            }
+
+            if (!overflow)
+            {
+                m_startDisplayingTab = 0;
+                FirstDisplayingTab = 0;
+                x = rectTabStrip.X + rectTabStrip.Height / 2;
+                foreach (TabVS2005 tab in Tabs)
+                {
+                    tab.TabX = x;
+                    x += tab.TabWidth;
+                }
+            }
+            DocumentTabsOverflow = overflow;
+        }
+
+        protected internal override void EnsureTabVisible(IDockContent content)
+        {
+            if (Appearance != DockPane.AppearanceStyle.Document || !Tabs.Contains(content))
+                return;
+
+            CalculateTabs();
+            EnsureDocumentTabVisible(content, true);
+        }
+
+        private bool EnsureDocumentTabVisible(IDockContent content, bool repaint)
+        {
+            int index = Tabs.IndexOf(content);
+            TabVS2005 tab = Tabs[index] as TabVS2005;
+            if (tab.TabWidth != 0)
+                return false;
+
+            StartDisplayingTab = index;
+            if (repaint)
+                Invalidate();
+
+            return true;
+        }
+
+        private int GetMaxTabWidth(int index)
+        {
+            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+                return GetMaxTabWidth_ToolWindow(index);
+            else
+                return GetMaxTabWidth_Document(index);
+        }
+
+        private int GetMaxTabWidth_ToolWindow(int index)
+        {
+            IDockContent content = Tabs[index].Content;
+            Size sizeString = TextRenderer.MeasureText(content.DockHandler.TabText, TextFont);
+            return ToolWindowImageWidth + sizeString.Width + ToolWindowImageGapLeft
+                + ToolWindowImageGapRight + ToolWindowTextGapRight;
+        }
+
+        private int GetMaxTabWidth_Document(int index)
+        {
+            IDockContent content = Tabs[index].Content;
+
+            int height = GetTabRectangle_Document(index).Height;
+
+            Size sizeText = TextRenderer.MeasureText(content.DockHandler.TabText, BoldFont, new Size(DocumentTabMaxWidth, height), DocumentTextFormat);
+
+            if (DockPane.DockPanel.ShowDocumentIcon)
+                return sizeText.Width + DocumentIconWidth + DocumentIconGapLeft + DocumentIconGapRight + DocumentTextGapRight;
+            else
+                return sizeText.Width + DocumentIconGapLeft + DocumentTextGapRight;
+        }
+
+        private void DrawTabStrip(Graphics g)
+        {
+            if (Appearance == DockPane.AppearanceStyle.Document)
+                DrawTabStrip_Document(g);
+            else
+                DrawTabStrip_ToolWindow(g);
+        }
+
+        private void DrawTabStrip_Document(Graphics g)
+        {
+            int count = Tabs.Count;
+            if (count == 0)
+                return;
+
+            Rectangle rectTabStrip = TabStripRectangle;
+
+            // Draw the tabs
+            Rectangle rectTabOnly = TabsRectangle;
+            Rectangle rectTab = Rectangle.Empty;
+            TabVS2005 tabActive = null;
+            g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly));
+            for (int i = 0; i < count; i++)
+            {
+                rectTab = GetTabRectangle(i);
+                if (Tabs[i].Content == DockPane.ActiveContent)
+                {
+                    tabActive = Tabs[i] as TabVS2005;
+                    continue;
+                }
+                if (rectTab.IntersectsWith(rectTabOnly))
+                    DrawTab(g, Tabs[i] as TabVS2005, rectTab);
+            }
+
+            g.SetClip(rectTabStrip);
+
+            if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                g.DrawLine(PenDocumentTabActiveBorder, rectTabStrip.Left, rectTabStrip.Top + 1,
+                    rectTabStrip.Right, rectTabStrip.Top + 1);
+            else
+                g.DrawLine(PenDocumentTabActiveBorder, rectTabStrip.Left, rectTabStrip.Bottom - 1,
+                    rectTabStrip.Right, rectTabStrip.Bottom - 1);
+
+            g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly));
+            if (tabActive != null)
+            {
+                rectTab = GetTabRectangle(Tabs.IndexOf(tabActive));
+                if (rectTab.IntersectsWith(rectTabOnly))
+                    DrawTab(g, tabActive, rectTab);
+            }
+        }
+
+        private void DrawTabStrip_ToolWindow(Graphics g)
+        {
+            Rectangle rectTabStrip = TabStripRectangle;
+
+            g.DrawLine(PenToolWindowTabBorder, rectTabStrip.Left, rectTabStrip.Top,
+                rectTabStrip.Right, rectTabStrip.Top);
+
+            for (int i = 0; i < Tabs.Count; i++)
+                DrawTab(g, Tabs[i] as TabVS2005, GetTabRectangle(i));
+        }
+
+        private Rectangle GetTabRectangle(int index)
+        {
+            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+                return GetTabRectangle_ToolWindow(index);
+            else
+                return GetTabRectangle_Document(index);
+        }
+
+        private Rectangle GetTabRectangle_ToolWindow(int index)
+        {
+            Rectangle rectTabStrip = TabStripRectangle;
+
+            TabVS2005 tab = (TabVS2005)(Tabs[index]);
+            return new Rectangle(tab.TabX, rectTabStrip.Y, tab.TabWidth, rectTabStrip.Height);
+        }
+
+        private Rectangle GetTabRectangle_Document(int index)
+        {
+            Rectangle rectTabStrip = TabStripRectangle;
+            TabVS2005 tab = (TabVS2005)Tabs[index];
+
+            Rectangle rect = new Rectangle();
+            rect.X = tab.TabX;
+            rect.Width = tab.TabWidth;
+            rect.Height = rectTabStrip.Height - DocumentTabGapTop;
+
+            if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                rect.Y = rectTabStrip.Y + DocumentStripGapBottom;
+            else
+                rect.Y = rectTabStrip.Y + DocumentTabGapTop;
+
+            return rect;
+        }
+
+        private void DrawTab(Graphics g, TabVS2005 tab, Rectangle rect)
+        {
+            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+                DrawTab_ToolWindow(g, tab, rect);
+            else
+                DrawTab_Document(g, tab, rect);
+        }
+
+        private GraphicsPath GetTabOutline(Tab tab, bool rtlTransform, bool toScreen)
+        {
+            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+                return GetTabOutline_ToolWindow(tab, rtlTransform, toScreen);
+            else
+                return GetTabOutline_Document(tab, rtlTransform, toScreen, false);
+        }
+
+        private GraphicsPath GetTabOutline_ToolWindow(Tab tab, bool rtlTransform, bool toScreen)
+        {
+            Rectangle rect = GetTabRectangle(Tabs.IndexOf(tab));
+            if (rtlTransform)
+                rect = DrawHelper.RtlTransform(this, rect);
+            if (toScreen)
+                rect = RectangleToScreen(rect);
+
+            DrawHelper.GetRoundedCornerTab(GraphicsPath, rect, false);
+            return GraphicsPath;
+        }
+
+        private GraphicsPath GetTabOutline_Document(Tab tab, bool rtlTransform, bool toScreen, bool full)
+        {
+            int curveSize = 6;
+
+            GraphicsPath.Reset();
+            Rectangle rect = GetTabRectangle(Tabs.IndexOf(tab));
+            if (rtlTransform)
+                rect = DrawHelper.RtlTransform(this, rect);
+            if (toScreen)
+                rect = RectangleToScreen(rect);
+
+            // Draws the full angle piece for active content (or first tab)
+            if (tab.Content == DockPane.ActiveContent || full || Tabs.IndexOf(tab) == FirstDisplayingTab)
+            {
+                if (RightToLeft == RightToLeft.Yes)
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    {
+                        // For some reason the next line draws a line that is not hidden like it is when drawing the tab strip on top.
+                        // It is not needed so it has been commented out.
+                        //GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right + rect.Height / 2, rect.Bottom);
+                        GraphicsPath.AddLine(rect.Right + rect.Height / 2, rect.Top, rect.Right - rect.Height / 2 + curveSize / 2, rect.Bottom - curveSize / 2);
+                    }
+                    else
+                    {
+                        GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right + rect.Height / 2, rect.Bottom);
+                        GraphicsPath.AddLine(rect.Right + rect.Height / 2, rect.Bottom, rect.Right - rect.Height / 2 + curveSize / 2, rect.Top + curveSize / 2);
+                    }
+                }
+                else
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    {
+                        // For some reason the next line draws a line that is not hidden like it is when drawing the tab strip on top.
+                        // It is not needed so it has been commented out.
+                        //GraphicsPath.AddLine(rect.Left, rect.Top, rect.Left - rect.Height / 2, rect.Top);
+                        GraphicsPath.AddLine(rect.Left - rect.Height / 2, rect.Top, rect.Left + rect.Height / 2 - curveSize / 2, rect.Bottom - curveSize / 2);
+                    }
+                    else
+                    {
+                        GraphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left - rect.Height / 2, rect.Bottom);
+                        GraphicsPath.AddLine(rect.Left - rect.Height / 2, rect.Bottom, rect.Left + rect.Height / 2 - curveSize / 2, rect.Top + curveSize / 2);
+                    }
+                }
+            }
+            // Draws the partial angle for non-active content
+            else
+            {
+                if (RightToLeft == RightToLeft.Yes)
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    {
+                        GraphicsPath.AddLine(rect.Right, rect.Top, rect.Right, rect.Top + rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Right, rect.Top + rect.Height / 2, rect.Right - rect.Height / 2 + curveSize / 2, rect.Bottom - curveSize / 2);
+                    }
+                    else
+                    {
+                        GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right, rect.Bottom - rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Right, rect.Bottom - rect.Height / 2, rect.Right - rect.Height / 2 + curveSize / 2, rect.Top + curveSize / 2);
+                    }
+                }
+                else
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    {
+                        GraphicsPath.AddLine(rect.Left, rect.Top, rect.Left, rect.Top + rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Left, rect.Top + rect.Height / 2, rect.Left + rect.Height / 2 - curveSize / 2, rect.Bottom - curveSize / 2);
+                    }
+                    else
+                    {
+                        GraphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left, rect.Bottom - rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Left, rect.Bottom - rect.Height / 2, rect.Left + rect.Height / 2 - curveSize / 2, rect.Top + curveSize / 2);
+                    }
+                }
+            }
+
+            if (RightToLeft == RightToLeft.Yes)
+            {
+                if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                {
+                    // Draws the bottom horizontal line (short side)
+                    GraphicsPath.AddLine(rect.Right - rect.Height / 2 - curveSize / 2, rect.Bottom, rect.Left + curveSize / 2, rect.Bottom);
+
+                    // Drawing the rounded corner is not necessary. The path is automatically connected
+                    //GraphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
+                }
+                else
+                {
+                    // Draws the bottom horizontal line (short side)
+                    GraphicsPath.AddLine(rect.Right - rect.Height / 2 - curveSize / 2, rect.Top, rect.Left + curveSize / 2, rect.Top);
+                    GraphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
+                }
+            }
+            else
+            {
+                if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                {
+                    // Draws the bottom horizontal line (short side)
+                    GraphicsPath.AddLine(rect.Left + rect.Height / 2 + curveSize / 2, rect.Bottom, rect.Right - curveSize / 2, rect.Bottom);
+
+                    // Drawing the rounded corner is not necessary. The path is automatically connected
+                    //GraphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Bottom, curveSize, curveSize), 90, -90);
+                }
+                else
+                {
+                    // Draws the top horizontal line (short side)
+                    GraphicsPath.AddLine(rect.Left + rect.Height / 2 + curveSize / 2, rect.Top, rect.Right - curveSize / 2, rect.Top);
+
+                    // Draws the rounded corner oppposite the angled side
+                    GraphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Top, curveSize, curveSize), -90, 90);
+                }
+            }
+
+            if (Tabs.IndexOf(tab) != EndDisplayingTab &&
+                (Tabs.IndexOf(tab) != Tabs.Count - 1 && Tabs[Tabs.IndexOf(tab) + 1].Content == DockPane.ActiveContent)
+                && !full)
+            {
+                if (RightToLeft == RightToLeft.Yes)
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    {
+                        GraphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Bottom - rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Left, rect.Bottom - rect.Height / 2, rect.Left + rect.Height / 2, rect.Top);
+                    }
+                    else
+                    {
+                        GraphicsPath.AddLine(rect.Left, rect.Top + curveSize / 2, rect.Left, rect.Top + rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Left, rect.Top + rect.Height / 2, rect.Left + rect.Height / 2, rect.Bottom);
+                    }
+                }
+                else
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                    {
+                        GraphicsPath.AddLine(rect.Right, rect.Bottom - curveSize / 2, rect.Right, rect.Bottom - rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Right, rect.Bottom - rect.Height / 2, rect.Right - rect.Height / 2, rect.Top);
+                    }
+                    else
+                    {
+                        GraphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Top + rect.Height / 2);
+                        GraphicsPath.AddLine(rect.Right, rect.Top + rect.Height / 2, rect.Right - rect.Height / 2, rect.Bottom);
+                    }
+                }
+            }
+            else
+            {
+                // Draw the vertical line opposite the angled side
+                if (RightToLeft == RightToLeft.Yes)
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                        GraphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Top);
+                    else
+                        GraphicsPath.AddLine(rect.Left, rect.Top + curveSize / 2, rect.Left, rect.Bottom);
+                }
+                else
+                {
+                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+                        GraphicsPath.AddLine(rect.Right, rect.Bottom - curveSize / 2, rect.Right, rect.Top);
+                    else
+                        GraphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Bottom);
+                }
+            }
+
+            return GraphicsPath;
+        }
+
+        private void DrawTab_ToolWindow(Graphics g, TabVS2005 tab, Rectangle rect)
+        {
+            Rectangle rectIcon = new Rectangle(
+                rect.X + ToolWindowImageGapLeft,
+                rect.Y + rect.Height - 1 - ToolWindowImageGapBottom - ToolWindowImageHeight,
+                ToolWindowImageWidth, ToolWindowImageHeight);
+            Rectangle rectText = rectIcon;
+            rectText.X += rectIcon.Width + ToolWindowImageGapRight;
+            rectText.Width = rect.Width - rectIcon.Width - ToolWindowImageGapLeft -
+                ToolWindowImageGapRight - ToolWindowTextGapRight;
+
+            Rectangle rectTab = DrawHelper.RtlTransform(this, rect);
+            rectText = DrawHelper.RtlTransform(this, rectText);
+            rectIcon = DrawHelper.RtlTransform(this, rectIcon);
+            GraphicsPath path = GetTabOutline(tab, true, false);
+            if (DockPane.ActiveContent == tab.Content)
+            {
+                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.StartColor;
+                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.EndColor;
+                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.LinearGradientMode;
+                g.FillPath(new LinearGradientBrush(rectTab, startColor, endColor, gradientMode), path);
+                g.DrawPath(PenToolWindowTabBorder, path);
+
+                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.TextColor;
+                TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, ToolWindowTextFormat);
+            }
+            else
+            {
+                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.StartColor;
+                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.EndColor;
+                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.LinearGradientMode;
+                g.FillPath(new LinearGradientBrush(rectTab, startColor, endColor, gradientMode), path);
+
+                if (Tabs.IndexOf(DockPane.ActiveContent) != Tabs.IndexOf(tab) + 1)
+                {
+                    Point pt1 = new Point(rect.Right, rect.Top + ToolWindowTabSeperatorGapTop);
+                    Point pt2 = new Point(rect.Right, rect.Bottom - ToolWindowTabSeperatorGapBottom);
+                    g.DrawLine(PenToolWindowTabBorder, DrawHelper.RtlTransform(this, pt1), DrawHelper.RtlTransform(this, pt2));
+                }
+
+                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.TextColor;
+                TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, ToolWindowTextFormat);
+            }
+
+            if (rectTab.Contains(rectIcon))
+                g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon);
+        }
+
+        private void DrawTab_Document(Graphics g, TabVS2005 tab, Rectangle rect)
+        {
+            if (tab.TabWidth == 0)
+                return;
+
+            Rectangle rectIcon = new Rectangle(
+                rect.X + DocumentIconGapLeft,
+                rect.Y + rect.Height - 1 - DocumentIconGapBottom - DocumentIconHeight,
+                DocumentIconWidth, DocumentIconHeight);
+            Rectangle rectText = rectIcon;
+            if (DockPane.DockPanel.ShowDocumentIcon)
+            {
+                rectText.X += rectIcon.Width + DocumentIconGapRight;
+                rectText.Y = rect.Y;
+                rectText.Width = rect.Width - rectIcon.Width - DocumentIconGapLeft -
+                    DocumentIconGapRight - DocumentTextGapRight;
+                rectText.Height = rect.Height;
+            }
+            else
+                rectText.Width = rect.Width - DocumentIconGapLeft - DocumentTextGapRight;
+
+            Rectangle rectTab = DrawHelper.RtlTransform(this, rect);
+            Rectangle rectBack = DrawHelper.RtlTransform(this, rect);
+            rectBack.Width += rect.X;
+            rectBack.X = 0;
+
+            rectText = DrawHelper.RtlTransform(this, rectText);
+            rectIcon = DrawHelper.RtlTransform(this, rectIcon);
+            GraphicsPath path = GetTabOutline(tab, true, false);
+            if (DockPane.ActiveContent == tab.Content)
+            {
+                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.StartColor;
+                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.EndColor;
+                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.LinearGradientMode;
+                g.FillPath(new LinearGradientBrush(rectBack, startColor, endColor, gradientMode), path);
+                g.DrawPath(PenDocumentTabActiveBorder, path);
+
+                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.TextColor;
+                if (DockPane.IsActiveDocumentPane)
+                    TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, BoldFont, rectText, textColor, DocumentTextFormat);
+                else
+                    TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, DocumentTextFormat);
+            }
+            else
+            {
+                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.StartColor;
+                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.EndColor;
+                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.LinearGradientMode;
+                g.FillPath(new LinearGradientBrush(rectBack, startColor, endColor, gradientMode), path);
+                g.DrawPath(PenDocumentTabInactiveBorder, path);
+
+                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.TextColor;
+                TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, DocumentTextFormat);
+            }
+
+            if (rectTab.Contains(rectIcon) && DockPane.DockPanel.ShowDocumentIcon)
+                g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon);
+        }
+
+        private void WindowList_Click(object sender, EventArgs e)
+        {
+            int x = 0;
+            int y = ButtonWindowList.Location.Y + ButtonWindowList.Height;
+
+            SelectMenu.Items.Clear();
+            foreach (TabVS2005 tab in Tabs)
+            {
+                IDockContent content = tab.Content;
+                ToolStripItem item = SelectMenu.Items.Add(content.DockHandler.TabText, content.DockHandler.Icon.ToBitmap());
+                item.Tag = tab.Content;
+                item.Click += new EventHandler(ContextMenuItem_Click);
+            }
+            SelectMenu.Show(ButtonWindowList, x, y);
+        }
+
+        private void ContextMenuItem_Click(object sender, EventArgs e)
+        {
+            ToolStripMenuItem item = sender as ToolStripMenuItem;
+            if (item != null)
+            {
+                IDockContent content = (IDockContent)item.Tag;
+                DockPane.ActiveContent = content;
+            }
+        }
+
+        private void SetInertButtons()
+        {
+            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+            {
+                if (m_buttonClose != null)
+                    m_buttonClose.Left = -m_buttonClose.Width;
+
+                if (m_buttonWindowList != null)
+                    m_buttonWindowList.Left = -m_buttonWindowList.Width;
+            }
+            else
+            {
+                ButtonClose.Enabled = DockPane.ActiveContent == null ? true : DockPane.ActiveContent.DockHandler.CloseButton;
+                m_closeButtonVisible = DockPane.ActiveContent == null ? true : DockPane.ActiveContent.DockHandler.CloseButtonVisible;
+                ButtonClose.Visible = m_closeButtonVisible;
+                ButtonClose.RefreshChanges();
+                ButtonWindowList.RefreshChanges();
+            }
+        }
+
+        protected override void OnLayout(LayoutEventArgs levent)
+        {
+            if (Appearance == DockPane.AppearanceStyle.Document)
+            {
+                LayoutButtons();
+                OnRefreshChanges();
+            }
+
+            base.OnLayout(levent);
+        }
+
+        private void LayoutButtons()
+        {
+            Rectangle rectTabStrip = TabStripRectangle;
+
+            // Set position and size of the buttons
+            int buttonWidth = ButtonClose.Image.Width;
+            int buttonHeight = ButtonClose.Image.Height;
+            int height = rectTabStrip.Height - DocumentButtonGapTop - DocumentButtonGapBottom;
+            if (buttonHeight < height)
+            {
+                buttonWidth = buttonWidth * (height / buttonHeight);
+                buttonHeight = height;
+            }
+            Size buttonSize = new Size(buttonWidth, buttonHeight);
+
+            int x = rectTabStrip.X + rectTabStrip.Width - DocumentTabGapLeft
+                - DocumentButtonGapRight - buttonWidth;
+            int y = rectTabStrip.Y + DocumentButtonGapTop;
+            Point point = new Point(x, y);
+            ButtonClose.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+
+            // If the close button is not visible draw the window list button overtop.
+            // Otherwise it is drawn to the left of the close button.
+            if (m_closeButtonVisible)
+                point.Offset(-(DocumentButtonGapBetween + buttonWidth), 0);
+
+            ButtonWindowList.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+        }
+
+        private void Close_Click(object sender, EventArgs e)
+        {
+            DockPane.CloseActiveContent();
+        }
+
+        protected internal override int HitTest(Point ptMouse)
+        {
+            if (!TabsRectangle.Contains(ptMouse))
+                return -1;
+
+            foreach (Tab tab in Tabs)
+            {
+                GraphicsPath path = GetTabOutline(tab, true, false);
+                if (path.IsVisible(ptMouse))
+                    return Tabs.IndexOf(tab);
+            }
+            return -1;
+        }
+
+        protected override void OnMouseHover(EventArgs e)
+        {
+            int index = HitTest(PointToClient(Control.MousePosition));
+            string toolTip = string.Empty;
+
+            base.OnMouseHover(e);
+
+            if (index != -1)
+            {
+                TabVS2005 tab = Tabs[index] as TabVS2005;
+                if (!String.IsNullOrEmpty(tab.Content.DockHandler.ToolTipText))
+                    toolTip = tab.Content.DockHandler.ToolTipText;
+                else if (tab.MaxWidth > tab.TabWidth)
+                    toolTip = tab.Content.DockHandler.TabText;
+            }
+
+            if (m_toolTip.GetToolTip(this) != toolTip)
+            {
+                m_toolTip.Active = false;
+                m_toolTip.SetToolTip(this, toolTip);
+                m_toolTip.Active = true;
+            }
+
+            // requires further tracking of mouse hover behavior,
+            ResetMouseEventArgs();
+        }
+
+        protected override void OnRightToLeftChanged(EventArgs e)
+        {
+            base.OnRightToLeftChanged(e);
+            PerformLayout();
+        }
+    }
+}

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VisibleNestedPaneCollection.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VisibleNestedPaneCollection.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/VisibleNestedPaneCollection.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,168 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+	public sealed class VisibleNestedPaneCollection : ReadOnlyCollection<DockPane>
+	{
+		private NestedPaneCollection m_nestedPanes;
+
+        internal VisibleNestedPaneCollection(NestedPaneCollection nestedPanes)
+            : base(new List<DockPane>())
+        {
+            m_nestedPanes = nestedPanes;
+        }
+
+		public NestedPaneCollection NestedPanes
+		{
+			get	{	return m_nestedPanes;	}
+		}
+
+		public INestedPanesContainer Container
+		{
+			get	{	return NestedPanes.Container;	}
+		}
+
+		public DockState DockState
+		{
+			get	{	return NestedPanes.DockState;	}
+		}
+
+		public bool IsFloat
+		{
+			get	{	return NestedPanes.IsFloat;	}
+		}
+
+		internal void Refresh()
+		{
+			Items.Clear();
+			for (int i=0; i<NestedPanes.Count; i++)
+			{
+				DockPane pane = NestedPanes[i];
+				NestedDockingStatus status = pane.NestedDockingStatus;
+				status.SetDisplayingStatus(true, status.PreviousPane, status.Alignment, status.Proportion);
+				Items.Add(pane);
+			}
+
+			foreach (DockPane pane in NestedPanes)
+				if (pane.DockState != DockState || pane.IsHidden)
+				{
+					pane.Bounds = Rectangle.Empty;
+					pane.SplitterBounds = Rectangle.Empty;
+					Remove(pane);
+				}
+
+			CalculateBounds();
+
+			foreach (DockPane pane in this)
+			{
+				NestedDockingStatus status = pane.NestedDockingStatus;
+				pane.Bounds = status.PaneBounds;
+				pane.SplitterBounds = status.SplitterBounds;
+				pane.SplitterAlignment = status.Alignment;
+			}
+		}
+
+		private void Remove(DockPane pane)
+		{
+			if (!Contains(pane))
+				return;
+
+			NestedDockingStatus statusPane = pane.NestedDockingStatus;
+			DockPane lastNestedPane = null;
+			for (int i=Count - 1; i> IndexOf(pane); i--)
+			{
+				if (this[i].NestedDockingStatus.PreviousPane == pane)
+				{
+					lastNestedPane = this[i];
+					break;
+				}
+			}
+
+			if (lastNestedPane != null)
+			{
+				int indexLastNestedPane = IndexOf(lastNestedPane);
+				Items.Remove(lastNestedPane);
+				Items[IndexOf(pane)] = lastNestedPane;
+				NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus;
+				lastNestedDock.SetDisplayingStatus(true, statusPane.DisplayingPreviousPane, statusPane.DisplayingAlignment, statusPane.DisplayingProportion);
+				for (int i=indexLastNestedPane - 1; i>IndexOf(lastNestedPane); i--)
+				{
+					NestedDockingStatus status = this[i].NestedDockingStatus;
+					if (status.PreviousPane == pane)
+						status.SetDisplayingStatus(true, lastNestedPane, status.DisplayingAlignment, status.DisplayingProportion);
+				}
+			}
+			else
+				Items.Remove(pane);
+
+			statusPane.SetDisplayingStatus(false, null, DockAlignment.Left, 0.5);
+		}
+
+		private void CalculateBounds()
+		{
+			if (Count == 0)
+				return;
+
+			this[0].NestedDockingStatus.SetDisplayingBounds(Container.DisplayingRectangle, Container.DisplayingRectangle, Rectangle.Empty);
+
+			for (int i=1; i<Count; i++)
+			{
+				DockPane pane = this[i];
+				NestedDockingStatus status = pane.NestedDockingStatus;
+				DockPane prevPane = status.DisplayingPreviousPane;
+				NestedDockingStatus statusPrev = prevPane.NestedDockingStatus;
+
+				Rectangle rect = statusPrev.PaneBounds;
+				bool bVerticalSplitter = (status.DisplayingAlignment == DockAlignment.Left || status.DisplayingAlignment == DockAlignment.Right);
+
+				Rectangle rectThis = rect;
+				Rectangle rectPrev = rect;
+				Rectangle rectSplitter = rect;
+				if (status.DisplayingAlignment == DockAlignment.Left)
+				{
+					rectThis.Width = (int)((double)rect.Width * status.DisplayingProportion) - (Measures.SplitterSize / 2);
+					rectSplitter.X = rectThis.X + rectThis.Width;
+					rectSplitter.Width = Measures.SplitterSize;
+					rectPrev.X = rectSplitter.X + rectSplitter.Width;
+					rectPrev.Width = rect.Width - rectThis.Width - rectSplitter.Width;
+				}
+				else if (status.DisplayingAlignment == DockAlignment.Right)
+				{
+					rectPrev.Width = (rect.Width - (int)((double)rect.Width * status.DisplayingProportion)) - (Measures.SplitterSize / 2);
+					rectSplitter.X = rectPrev.X + rectPrev.Width;
+					rectSplitter.Width = Measures.SplitterSize;
+					rectThis.X = rectSplitter.X + rectSplitter.Width;
+					rectThis.Width = rect.Width - rectPrev.Width - rectSplitter.Width;
+				}
+				else if (status.DisplayingAlignment == DockAlignment.Top)
+				{
+					rectThis.Height = (int)((double)rect.Height * status.DisplayingProportion) - (Measures.SplitterSize / 2);
+					rectSplitter.Y = rectThis.Y + rectThis.Height;
+					rectSplitter.Height = Measures.SplitterSize;
+					rectPrev.Y = rectSplitter.Y + rectSplitter.Height;
+					rectPrev.Height = rect.Height - rectThis.Height - rectSplitter.Height;
+				}
+				else if (status.DisplayingAlignment == DockAlignment.Bottom)
+				{
+					rectPrev.Height = (rect.Height - (int)((double)rect.Height * status.DisplayingProportion)) - (Measures.SplitterSize / 2);
+					rectSplitter.Y = rectPrev.Y + rectPrev.Height;
+					rectSplitter.Height = Measures.SplitterSize;
+					rectThis.Y = rectSplitter.Y + rectSplitter.Height;
+					rectThis.Height = rect.Height - rectPrev.Height - rectSplitter.Height;
+				}
+				else
+					rectThis = Rectangle.Empty;
+
+				rectSplitter.Intersect(rect);
+				rectThis.Intersect(rect);
+				rectPrev.Intersect(rect);
+				status.SetDisplayingBounds(rect, rectThis, rectSplitter);
+				statusPrev.SetDisplayingBounds(statusPrev.LogicalBounds, rectPrev, statusPrev.SplitterBounds);
+			}
+		}
+	}
+}


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/Enums.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/Enums.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/Enums.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,369 @@
+using System;
+
+namespace WeifenLuo.WinFormsUI.Docking.Win32
+{
+	[Flags]
+	internal enum FlagsSetWindowPos : uint
+	{
+		SWP_NOSIZE          = 0x0001,
+		SWP_NOMOVE          = 0x0002,
+		SWP_NOZORDER        = 0x0004,
+		SWP_NOREDRAW        = 0x0008,
+		SWP_NOACTIVATE      = 0x0010,
+		SWP_FRAMECHANGED    = 0x0020,
+		SWP_SHOWWINDOW      = 0x0040,
+		SWP_HIDEWINDOW      = 0x0080,
+		SWP_NOCOPYBITS      = 0x0100,
+		SWP_NOOWNERZORDER   = 0x0200, 
+		SWP_NOSENDCHANGING  = 0x0400,
+		SWP_DRAWFRAME       = 0x0020,
+		SWP_NOREPOSITION    = 0x0200,
+		SWP_DEFERERASE      = 0x2000,
+		SWP_ASYNCWINDOWPOS  = 0x4000
+	}
+
+	internal enum ShowWindowStyles : short
+	{
+		SW_HIDE             = 0,
+		SW_SHOWNORMAL       = 1,
+		SW_NORMAL           = 1,
+		SW_SHOWMINIMIZED    = 2,
+		SW_SHOWMAXIMIZED    = 3,
+		SW_MAXIMIZE         = 3,
+		SW_SHOWNOACTIVATE   = 4,
+		SW_SHOW             = 5,
+		SW_MINIMIZE         = 6,
+		SW_SHOWMINNOACTIVE  = 7,
+		SW_SHOWNA           = 8,
+		SW_RESTORE          = 9,
+		SW_SHOWDEFAULT      = 10,
+		SW_FORCEMINIMIZE    = 11,
+		SW_MAX              = 11
+	}
+
+	internal enum WindowStyles : uint
+	{
+		WS_OVERLAPPED       = 0x00000000,
+		WS_POPUP            = 0x80000000,
+		WS_CHILD            = 0x40000000,
+		WS_MINIMIZE         = 0x20000000,
+		WS_VISIBLE          = 0x10000000,
+		WS_DISABLED         = 0x08000000,
+		WS_CLIPSIBLINGS     = 0x04000000,
+		WS_CLIPCHILDREN     = 0x02000000,
+		WS_MAXIMIZE         = 0x01000000,
+		WS_CAPTION          = 0x00C00000,
+		WS_BORDER           = 0x00800000,
+		WS_DLGFRAME         = 0x00400000,
+		WS_VSCROLL          = 0x00200000,
+		WS_HSCROLL          = 0x00100000,
+		WS_SYSMENU          = 0x00080000,
+		WS_THICKFRAME       = 0x00040000,
+		WS_GROUP            = 0x00020000,
+		WS_TABSTOP          = 0x00010000,
+		WS_MINIMIZEBOX      = 0x00020000,
+		WS_MAXIMIZEBOX      = 0x00010000,
+		WS_TILED            = 0x00000000,
+		WS_ICONIC           = 0x20000000,
+		WS_SIZEBOX          = 0x00040000,
+		WS_POPUPWINDOW      = 0x80880000,
+		WS_OVERLAPPEDWINDOW = 0x00CF0000,
+		WS_TILEDWINDOW      = 0x00CF0000,
+		WS_CHILDWINDOW      = 0x40000000
+	}
+
+	internal enum WindowExStyles
+	{
+		WS_EX_DLGMODALFRAME     = 0x00000001,
+		WS_EX_NOPARENTNOTIFY    = 0x00000004,
+		WS_EX_TOPMOST           = 0x00000008,
+		WS_EX_ACCEPTFILES       = 0x00000010,
+		WS_EX_TRANSPARENT       = 0x00000020,
+		WS_EX_MDICHILD          = 0x00000040,
+		WS_EX_TOOLWINDOW        = 0x00000080,
+		WS_EX_WINDOWEDGE        = 0x00000100,
+		WS_EX_CLIENTEDGE        = 0x00000200,
+		WS_EX_CONTEXTHELP       = 0x00000400,
+		WS_EX_RIGHT             = 0x00001000,
+		WS_EX_LEFT              = 0x00000000,
+		WS_EX_RTLREADING        = 0x00002000,
+		WS_EX_LTRREADING        = 0x00000000,
+		WS_EX_LEFTSCROLLBAR     = 0x00004000,
+		WS_EX_RIGHTSCROLLBAR    = 0x00000000,
+		WS_EX_CONTROLPARENT     = 0x00010000,
+		WS_EX_STATICEDGE        = 0x00020000,
+		WS_EX_APPWINDOW         = 0x00040000,
+		WS_EX_OVERLAPPEDWINDOW  = 0x00000300,
+		WS_EX_PALETTEWINDOW     = 0x00000188,
+		WS_EX_LAYERED			= 0x00080000
+	}
+
+	internal enum Msgs
+	{
+		WM_NULL                   = 0x0000,
+		WM_CREATE                 = 0x0001,
+		WM_DESTROY                = 0x0002,
+		WM_MOVE                   = 0x0003,
+		WM_SIZE                   = 0x0005,
+		WM_ACTIVATE               = 0x0006,
+		WM_SETFOCUS               = 0x0007,
+		WM_KILLFOCUS              = 0x0008,
+		WM_ENABLE                 = 0x000A,
+		WM_SETREDRAW              = 0x000B,
+		WM_SETTEXT                = 0x000C,
+		WM_GETTEXT                = 0x000D,
+		WM_GETTEXTLENGTH          = 0x000E,
+		WM_PAINT                  = 0x000F,
+		WM_CLOSE                  = 0x0010,
+		WM_QUERYENDSESSION        = 0x0011,
+		WM_QUIT                   = 0x0012,
+		WM_QUERYOPEN              = 0x0013,
+		WM_ERASEBKGND             = 0x0014,
+		WM_SYSCOLORCHANGE         = 0x0015,
+		WM_ENDSESSION             = 0x0016,
+		WM_SHOWWINDOW             = 0x0018,
+		WM_WININICHANGE           = 0x001A,
+		WM_SETTINGCHANGE          = 0x001A,
+		WM_DEVMODECHANGE          = 0x001B,
+		WM_ACTIVATEAPP            = 0x001C,
+		WM_FONTCHANGE             = 0x001D,
+		WM_TIMECHANGE             = 0x001E,
+		WM_CANCELMODE             = 0x001F,
+		WM_SETCURSOR              = 0x0020,
+		WM_MOUSEACTIVATE          = 0x0021,
+		WM_CHILDACTIVATE          = 0x0022,
+		WM_QUEUESYNC              = 0x0023,
+		WM_GETMINMAXINFO          = 0x0024,
+		WM_PAINTICON              = 0x0026,
+		WM_ICONERASEBKGND         = 0x0027,
+		WM_NEXTDLGCTL             = 0x0028,
+		WM_SPOOLERSTATUS          = 0x002A,
+		WM_DRAWITEM               = 0x002B,
+		WM_MEASUREITEM            = 0x002C,
+		WM_DELETEITEM             = 0x002D,
+		WM_VKEYTOITEM             = 0x002E,
+		WM_CHARTOITEM             = 0x002F,
+		WM_SETFONT                = 0x0030,
+		WM_GETFONT                = 0x0031,
+		WM_SETHOTKEY              = 0x0032,
+		WM_GETHOTKEY              = 0x0033,
+		WM_QUERYDRAGICON          = 0x0037,
+		WM_COMPAREITEM            = 0x0039,
+		WM_GETOBJECT              = 0x003D,
+		WM_COMPACTING             = 0x0041,
+		WM_COMMNOTIFY             = 0x0044 ,
+		WM_WINDOWPOSCHANGING      = 0x0046,
+		WM_WINDOWPOSCHANGED       = 0x0047,
+		WM_POWER                  = 0x0048,
+		WM_COPYDATA               = 0x004A,
+		WM_CANCELJOURNAL          = 0x004B,
+		WM_NOTIFY                 = 0x004E,
+		WM_INPUTLANGCHANGEREQUEST = 0x0050,
+		WM_INPUTLANGCHANGE        = 0x0051,
+		WM_TCARD                  = 0x0052,
+		WM_HELP                   = 0x0053,
+		WM_USERCHANGED            = 0x0054,
+		WM_NOTIFYFORMAT           = 0x0055,
+		WM_CONTEXTMENU            = 0x007B,
+		WM_STYLECHANGING          = 0x007C,
+		WM_STYLECHANGED           = 0x007D,
+		WM_DISPLAYCHANGE          = 0x007E,
+		WM_GETICON                = 0x007F,
+		WM_SETICON                = 0x0080,
+		WM_NCCREATE               = 0x0081,
+		WM_NCDESTROY              = 0x0082,
+		WM_NCCALCSIZE             = 0x0083,
+		WM_NCHITTEST              = 0x0084,
+		WM_NCPAINT                = 0x0085,
+		WM_NCACTIVATE             = 0x0086,
+		WM_GETDLGCODE             = 0x0087,
+		WM_SYNCPAINT              = 0x0088,
+		WM_NCMOUSEMOVE            = 0x00A0,
+		WM_NCLBUTTONDOWN          = 0x00A1,
+		WM_NCLBUTTONUP            = 0x00A2,
+		WM_NCLBUTTONDBLCLK        = 0x00A3,
+		WM_NCRBUTTONDOWN          = 0x00A4,
+		WM_NCRBUTTONUP            = 0x00A5,
+		WM_NCRBUTTONDBLCLK        = 0x00A6,
+		WM_NCMBUTTONDOWN          = 0x00A7,
+		WM_NCMBUTTONUP            = 0x00A8,
+		WM_NCMBUTTONDBLCLK        = 0x00A9,
+		WM_KEYDOWN                = 0x0100,
+		WM_KEYUP                  = 0x0101,
+		WM_CHAR                   = 0x0102,
+		WM_DEADCHAR               = 0x0103,
+		WM_SYSKEYDOWN             = 0x0104,
+		WM_SYSKEYUP               = 0x0105,
+		WM_SYSCHAR                = 0x0106,
+		WM_SYSDEADCHAR            = 0x0107,
+		WM_KEYLAST                = 0x0108,
+		WM_IME_STARTCOMPOSITION   = 0x010D,
+		WM_IME_ENDCOMPOSITION     = 0x010E,
+		WM_IME_COMPOSITION        = 0x010F,
+		WM_IME_KEYLAST            = 0x010F,
+		WM_INITDIALOG             = 0x0110,
+		WM_COMMAND                = 0x0111,
+		WM_SYSCOMMAND             = 0x0112,
+		WM_TIMER                  = 0x0113,
+		WM_HSCROLL                = 0x0114,
+		WM_VSCROLL                = 0x0115,
+		WM_INITMENU               = 0x0116,
+		WM_INITMENUPOPUP          = 0x0117,
+		WM_MENUSELECT             = 0x011F,
+		WM_MENUCHAR               = 0x0120,
+		WM_ENTERIDLE              = 0x0121,
+		WM_MENURBUTTONUP          = 0x0122,
+		WM_MENUDRAG               = 0x0123,
+		WM_MENUGETOBJECT          = 0x0124,
+		WM_UNINITMENUPOPUP        = 0x0125,
+		WM_MENUCOMMAND            = 0x0126,
+		WM_CTLCOLORMSGBOX         = 0x0132,
+		WM_CTLCOLOREDIT           = 0x0133,
+		WM_CTLCOLORLISTBOX        = 0x0134,
+		WM_CTLCOLORBTN            = 0x0135,
+		WM_CTLCOLORDLG            = 0x0136,
+		WM_CTLCOLORSCROLLBAR      = 0x0137,
+		WM_CTLCOLORSTATIC         = 0x0138,
+		WM_MOUSEMOVE              = 0x0200,
+		WM_LBUTTONDOWN            = 0x0201,
+		WM_LBUTTONUP              = 0x0202,
+		WM_LBUTTONDBLCLK          = 0x0203,
+		WM_RBUTTONDOWN            = 0x0204,
+		WM_RBUTTONUP              = 0x0205,
+		WM_RBUTTONDBLCLK          = 0x0206,
+		WM_MBUTTONDOWN            = 0x0207,
+		WM_MBUTTONUP              = 0x0208,
+		WM_MBUTTONDBLCLK          = 0x0209,
+		WM_MOUSEWHEEL             = 0x020A,
+		WM_PARENTNOTIFY           = 0x0210,
+		WM_ENTERMENULOOP          = 0x0211,
+		WM_EXITMENULOOP           = 0x0212,
+		WM_NEXTMENU               = 0x0213,
+		WM_SIZING                 = 0x0214,
+		WM_CAPTURECHANGED         = 0x0215,
+		WM_MOVING                 = 0x0216,
+		WM_DEVICECHANGE           = 0x0219,
+		WM_MDICREATE              = 0x0220,
+		WM_MDIDESTROY             = 0x0221,
+		WM_MDIACTIVATE            = 0x0222,
+		WM_MDIRESTORE             = 0x0223,
+		WM_MDINEXT                = 0x0224,
+		WM_MDIMAXIMIZE            = 0x0225,
+		WM_MDITILE                = 0x0226,
+		WM_MDICASCADE             = 0x0227,
+		WM_MDIICONARRANGE         = 0x0228,
+		WM_MDIGETACTIVE           = 0x0229,
+		WM_MDISETMENU             = 0x0230,
+		WM_ENTERSIZEMOVE          = 0x0231,
+		WM_EXITSIZEMOVE           = 0x0232,
+		WM_DROPFILES              = 0x0233,
+		WM_MDIREFRESHMENU         = 0x0234,
+		WM_IME_SETCONTEXT         = 0x0281,
+		WM_IME_NOTIFY             = 0x0282,
+		WM_IME_CONTROL            = 0x0283,
+		WM_IME_COMPOSITIONFULL    = 0x0284,
+		WM_IME_SELECT             = 0x0285,
+		WM_IME_CHAR               = 0x0286,
+		WM_IME_REQUEST            = 0x0288,
+		WM_IME_KEYDOWN            = 0x0290,
+		WM_IME_KEYUP              = 0x0291,
+		WM_MOUSEHOVER             = 0x02A1,
+		WM_MOUSELEAVE             = 0x02A3,
+		WM_CUT                    = 0x0300,
+		WM_COPY                   = 0x0301,
+		WM_PASTE                  = 0x0302,
+		WM_CLEAR                  = 0x0303,
+		WM_UNDO                   = 0x0304,
+		WM_RENDERFORMAT           = 0x0305,
+		WM_RENDERALLFORMATS       = 0x0306,
+		WM_DESTROYCLIPBOARD       = 0x0307,
+		WM_DRAWCLIPBOARD          = 0x0308,
+		WM_PAINTCLIPBOARD         = 0x0309,
+		WM_VSCROLLCLIPBOARD       = 0x030A,
+		WM_SIZECLIPBOARD          = 0x030B,
+		WM_ASKCBFORMATNAME        = 0x030C,
+		WM_CHANGECBCHAIN          = 0x030D,
+		WM_HSCROLLCLIPBOARD       = 0x030E,
+		WM_QUERYNEWPALETTE        = 0x030F,
+		WM_PALETTEISCHANGING      = 0x0310,
+		WM_PALETTECHANGED         = 0x0311,
+		WM_HOTKEY                 = 0x0312,
+		WM_PRINT                  = 0x0317,
+		WM_PRINTCLIENT            = 0x0318,
+		WM_HANDHELDFIRST          = 0x0358,
+		WM_HANDHELDLAST           = 0x035F,
+		WM_AFXFIRST               = 0x0360,
+		WM_AFXLAST                = 0x037F,
+		WM_PENWINFIRST            = 0x0380,
+		WM_PENWINLAST             = 0x038F,
+		WM_APP                    = 0x8000,
+		WM_USER                   = 0x0400
+	}
+
+	internal enum HitTest
+	{
+		HTERROR			= -2,
+		HTTRANSPARENT   = -1,
+		HTNOWHERE		= 0,
+		HTCLIENT		= 1,
+		HTCAPTION		= 2,
+		HTSYSMENU		= 3,
+		HTGROWBOX		= 4,
+		HTSIZE			= 4,
+		HTMENU			= 5,
+		HTHSCROLL		= 6,
+		HTVSCROLL		= 7,
+		HTMINBUTTON		= 8,
+		HTMAXBUTTON		= 9,
+		HTLEFT			= 10,
+		HTRIGHT			= 11,
+		HTTOP			= 12,
+		HTTOPLEFT		= 13,
+		HTTOPRIGHT		= 14,
+		HTBOTTOM		= 15,
+		HTBOTTOMLEFT	= 16,
+		HTBOTTOMRIGHT	= 17,
+		HTBORDER		= 18,
+		HTREDUCE		= 8,
+		HTZOOM			= 9 ,
+		HTSIZEFIRST		= 10,
+		HTSIZELAST		= 17,
+		HTOBJECT		= 19,
+		HTCLOSE			= 20,
+		HTHELP			= 21
+	}
+
+	internal enum ScrollBars : uint
+	{
+		SB_HORZ = 0,
+		SB_VERT = 1,
+		SB_CTL = 2,
+		SB_BOTH = 3
+	}
+
+	internal enum GetWindowLongIndex : int
+	{
+		GWL_STYLE = -16,
+		GWL_EXSTYLE = -20
+	}
+
+    // Hook Types  
+    internal enum HookType : int
+    {
+        WH_JOURNALRECORD = 0,
+        WH_JOURNALPLAYBACK = 1,
+        WH_KEYBOARD = 2,
+        WH_GETMESSAGE = 3,
+        WH_CALLWNDPROC = 4,
+        WH_CBT = 5,
+        WH_SYSMSGFILTER = 6,
+        WH_MOUSE = 7,
+        WH_HARDWARE = 8,
+        WH_DEBUG = 9,
+        WH_SHELL = 10,
+        WH_FOREGROUNDIDLE = 11,
+        WH_CALLWNDPROCRET = 12,
+        WH_KEYBOARD_LL = 13,
+        WH_MOUSE_LL = 14
+    }
+}
\ No newline at end of file

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/NativeMethods.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/NativeMethods.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Docking/Win32/NativeMethods.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,64 @@
+using System;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using WeifenLuo.WinFormsUI.Docking.Win32;
+
+namespace WeifenLuo.WinFormsUI.Docking
+{
+    internal static class NativeMethods
+    {
+		[DllImport("User32.dll", CharSet=CharSet.Auto)]
+        [return: MarshalAs(UnmanagedType.Bool)]
+		public static extern bool DragDetect(IntPtr hWnd, Point pt);
+
+        [DllImport("User32.dll", CharSet=CharSet.Auto)]
+        public static extern IntPtr GetFocus();
+
+        [DllImport("User32.dll", CharSet=CharSet.Auto)]
+        public static extern IntPtr SetFocus(IntPtr hWnd);
+
+        [DllImport("User32.dll", CharSet=CharSet.Auto)]
+        [return: MarshalAs(UnmanagedType.Bool)]
+        public static extern bool PostMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
+
+        [DllImport("User32.dll", CharSet=CharSet.Auto)]
+        public static extern uint SendMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
+
+        [DllImport("User32.dll", CharSet=CharSet.Auto)]
+        public static extern int ShowWindow(IntPtr hWnd, short cmdShow);
+
+        [DllImport("User32.dll", CharSet=CharSet.Auto)]
+        public static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndAfter, int X, int Y, int Width, int Height, FlagsSetWindowPos flags);
+
+		[DllImport("user32.dll", CharSet = CharSet.Auto)]
+		public static extern int GetWindowLong(IntPtr hWnd, int Index);
+
+		[DllImport("user32.dll", CharSet = CharSet.Auto)]
+		public static extern int SetWindowLong(IntPtr hWnd, int Index, int Value);
+
+		[DllImport("user32.dll", CharSet=CharSet.Auto)]
+		public static extern int ShowScrollBar(IntPtr hWnd, int wBar, int bShow);
+
+		[DllImport("user32.dll", CharSet=CharSet.Auto)]
+        //*********************************
+        // FxCop bug, suppress the message
+        //*********************************
+        [SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", MessageId = "0")]
+		public static extern IntPtr WindowFromPoint(Point point);
+
+        [DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
+        public static extern int GetCurrentThreadId();
+
+        public delegate IntPtr HookProc(int code, IntPtr wParam, IntPtr lParam);
+
+        [DllImport("user32.dll")]
+        public static extern IntPtr SetWindowsHookEx(Win32.HookType code, HookProc func, IntPtr hInstance, int threadID);
+
+        [DllImport("user32.dll")]
+        public static extern int UnhookWindowsHookEx(IntPtr hhook);
+
+        [DllImport("user32.dll")]
+        public static extern IntPtr CallNextHookEx(IntPtr hhook, int code, IntPtr wParam, IntPtr lParam);
+	}
+}
\ No newline at end of file


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Properties
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/Properties/AssemblyInfo.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/Properties/AssemblyInfo.cs	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,28 @@
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+
+[assembly: AssemblyTitle("DockPanel Suite for .Net 2.0")]
+[assembly: AssemblyDescription(".Net Docking Library for Windows Forms")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Weifen Luo")]
+[assembly: AssemblyProduct("DockPanel Suite")]
+[assembly: AssemblyCopyright("Copyright © Weifen Luo 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: CLSCompliant(true)]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("9d690ef9-ce19-4c69-874c-e24d8eb36aff")]
+
+[assembly: AssemblyVersion("2.5.0.*")]
+[assembly: AssemblyFileVersion("2.5.0.0")]
+
+[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Weifen")]
+[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Luo")]
+[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "WeifenLuo.WinFormsUI.Docking.Strings.resources", MessageId = "Weifen")]
+[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "WeifenLuo.WinFormsUI.Docking.Strings.resources", MessageId = "Luo")]
+[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "WeifenLuo.WinFormsUI.Docking.Strings.resources", MessageId = "Dockable")]

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/WinFormsUI.csproj
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/WinFormsUI.csproj	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/WinFormsUI.csproj	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C75532C4-765B-418E-B09B-46D36B2ABDB1}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>WeifenLuo.WinFormsUI</RootNamespace>
+    <AssemblyName>WeifenLuo.WinFormsUI.Docking</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SourceAnalysisOverrideSettingsFile>C:\Users\Administrator\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>dockpanelsuite.snk</AssemblyOriginatorKeyFile>
+    <DelaySign>False</DelaySign>
+    <AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
+    <SccProjectName>
+    </SccProjectName>
+    <SccLocalPath>
+    </SccLocalPath>
+    <SccAuxPath>
+    </SccAuxPath>
+    <SccProvider>
+    </SccProvider>
+    <TargetFrameworkProfile />
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+    <RestorePackages>true</RestorePackages>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Design" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Docking\DockPanel.SplitterDragHandler.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPanel.DragHandler.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DragForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPanel.MdiClientController.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\AutoHideStripBase.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\InertButtonBase.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPanelSkin.cs">
+    </Compile>
+    <Compile Include="Docking\VS2005AutoHideStrip.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPanel.AutoHideWindow.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\VisibleNestedPaneCollection.cs" />
+    <Compile Include="Docking\DockAreasEditor.cs" />
+    <Compile Include="Docking\DockContent.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Docking\DockContentCollection.cs" />
+    <Compile Include="Docking\DockContentHandler.cs" />
+    <Compile Include="Docking\DockPanel.DockDragHandler.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\Helpers\DockHelper.cs" />
+    <Compile Include="Docking\NestedPaneCollection.cs" />
+    <Compile Include="Docking\DockOutlineBase.cs" />
+    <Compile Include="Docking\DockPane.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPaneCaptionBase.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\VS2005DockPaneCaption.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPaneCollection.cs" />
+    <Compile Include="Docking\DockPanel.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPanelExtender.cs" />
+    <Compile Include="Docking\DockPanel.Persistor.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPane.SplitterControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Docking\DockPaneStripBase.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\VS2005DockPaneStrip.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockWindow.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DockWindowCollection.cs" />
+    <Compile Include="Docking\DockWindow.SplitterControl.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\DummyControl.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\Enums.cs" />
+    <Compile Include="Docking\DockContentEventArgs.cs" />
+    <Compile Include="Docking\FloatWindow.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Docking\FloatWindowCollection.cs" />
+    <Compile Include="Docking\DockPanel.FocusManager.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\Interfaces.cs" />
+    <Compile Include="Docking\Measures.cs" />
+    <Compile Include="Docking\NestedDockingStatus.cs" />
+    <Compile Include="Docking\SplitterBase.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Docking\Helpers\DrawHelper.cs" />
+    <Compile Include="Docking\Localization.cs" />
+    <Compile Include="Docking\Helpers\ResourceHelper.cs" />
+    <Compile Include="Docking\Helpers\Win32Helper.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Docking\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Docking\Strings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Strings.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Docking\Win32\Enums.cs" />
+    <Compile Include="Docking\Win32\NativeMethods.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Docking\Resources.resx">
+      <SubType>Designer</SubType>
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Docking\Strings.resx">
+      <SubType>Designer</SubType>
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Docking\Resources\DockIndicator_PaneDiamond.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PaneDiamond_Bottom.bmp" />
+    <None Include="Docking\Resources\Dockindicator_PaneDiamond_Fill.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PaneDiamond_Hotspot.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PaneDiamond_HotspotIndex.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PaneDiamond_Left.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PaneDiamond_Right.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PaneDiamond_Top.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelBottom.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelBottom_Active.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelFill.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelFill_Active.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelLeft.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelLeft_Active.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelRight.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelRight_Active.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelTop.bmp" />
+    <None Include="Docking\Resources\DockIndicator_PanelTop_Active.bmp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="dockpanelsuite.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Docking\Resources\DockPane_AutoHide.bmp" />
+    <None Include="Docking\Resources\DockPane_Close.bmp" />
+    <None Include="Docking\Resources\DockPane_Dock.bmp" />
+    <None Include="Docking\Resources\DockPane_Option.bmp" />
+    <None Include="Docking\Resources\DockPane_OptionOverflow.bmp" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Docking\DockPanel.bmp" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/dockpanelsuite.snk
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Thirdparty/WinFormsUI/dockpanelsuite.snk
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Thirdparty/WinFormsUI/license.txt
===================================================================
--- trunk/Tools/Maestro/Thirdparty/WinFormsUI/license.txt	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/WinFormsUI/license.txt	2012-05-08 17:53:51 UTC (rev 6628)
@@ -0,0 +1,9 @@
+The MIT License
+
+Copyright (c) 2007 Weifen Luo (email: weifenluo at yahoo.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



More information about the mapguide-commits mailing list