[mapguide-commits] r9110 - in trunk/Tools/Maestro: Maestro/packages Maestro.AddIn.Rest/UI Maestro.AddIn.Scripting/UI Maestro.Base Maestro.Base/Commands Maestro.Base/Events Maestro.Base/UI Maestro.Base/UI/Preferences Maestro.Shared.UI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Dec 31 08:53:51 PST 2016


Author: jng
Date: 2016-12-31 08:53:51 -0800 (Sat, 31 Dec 2016)
New Revision: 9110

Added:
   trunk/Tools/Maestro/Maestro.Base/UI/Themes.cs
   trunk/Tools/Maestro/Maestro.Shared.UI/app.config
Modified:
   trunk/Tools/Maestro/Maestro.AddIn.Rest/UI/RestExplorer.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs
   trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs
   trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs
   trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
   trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs
   trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.Designer.cs
   trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.cs
   trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.resx
   trunk/Tools/Maestro/Maestro.Base/UI/ResourceIdNavigator.cs
   trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs
   trunk/Tools/Maestro/Maestro.Base/Workbench.cs
   trunk/Tools/Maestro/Maestro.Base/packages.config
   trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs
   trunk/Tools/Maestro/Maestro/packages/
Log:
Add theming support enabled by the latest release of DockPanel

Fixes #2755


Property changes on: trunk/Tools/Maestro/Maestro/packages
___________________________________________________________________
Modified: svn:ignore
   - DockPanelSuite.2.9.0.0
GeoAPI.1.7.3
GeoAPI.1.7.3.1
IronPython.2.7.4
IronPython.2.7.5
IronPython.StdLib.2.7.4
IronPython.StdLib.2.7.5
Irony.0.9.0
Microsoft.CodeAnalysis.Analyzers.1.0.0
Microsoft.CodeAnalysis.CSharp.1.0.0
Microsoft.CodeAnalysis.Common.1.0.0
Moq.4.2.1409.1722
Moq.4.2.1507.0118
NUnit.2.6.2
NUnit.2.6.3
NUnit.2.6.4
NetTopologySuite.1.13.3.2
Newtonsoft.Json.6.0.8
Newtonsoft.Json.7.0.1
ProjNET4GeoAPI.1.3.0.4
RefactoringEssentials.1.1.0
RefactoringEssentials.1.2.0
RefactoringEssentials.2.0.0
RestSharp.105.0.1
RestSharp.105.2.1
SharpZipLib.0.86.0
System.Collections.Immutable.1.1.36
System.Reflection.Metadata.1.0.21
TreeViewAdv.1.7.0.0
fleesharp.0.9.27-pre
mapguide-api-base-x86.2.5.2.7949
mapguide-api-base-x86.2.6.0.8316
mapguide-api-base-x86.3.0.0.8701
mg-desktop-net40-x86.2.5.2.7949
mg-desktop-viewer-net40-x86.2.5.2.7949
mg-desktop-viewer-x86.2.6.0.8316
mg-desktop-viewer-x86.3.0.0.8701
mg-desktop-x86.2.6.0.8316
mg-desktop-x86.3.0.0.8701
RestSharp.105.2.3
GeoAPI.1.7.4
Irony.0.9.1
Microsoft.CodeAnalysis.Analyzers.1.1.0
Microsoft.CodeAnalysis.Common.1.2.1
Microsoft.CodeAnalysis.CSharp.1.2.1
Moq.4.2.1510.2205
NetTopologySuite.1.14
Newtonsoft.Json.8.0.3
NUnit.3.2.0
RefactoringEssentials.4.0.0
System.Collections.4.0.0
System.Collections.Immutable.1.1.37
System.Diagnostics.Debug.4.0.0
System.Globalization.4.0.0
System.Linq.4.0.0
System.Reflection.Metadata.1.2.0
System.Resources.ResourceManager.4.0.0
System.Runtime.4.0.0
System.Runtime.Extensions.4.0.0
System.Threading.4.0.0
Castle.Core.3.3.3
DockPanelSuite.2.12.0
DynamicLanguageRuntime.1.1.2
IronPython.2.7.7
IronPython.StdLib.2.7.7
Microsoft.CodeAnalysis.Common.1.3.2
Microsoft.CodeAnalysis.CSharp.1.3.2
Moq.4.5.29
Newtonsoft.Json.9.0.1
NUnit.3.5.0
System.Collections.4.3.0
System.Collections.Immutable.1.3.0
System.Diagnostics.Debug.4.3.0
System.Globalization.4.3.0
System.Linq.4.3.0
System.Reflection.Metadata.1.4.1
System.Resources.ResourceManager.4.3.0
System.Runtime.4.3.0
System.Runtime.Extensions.4.3.0
System.Threading.4.3.0

   + DockPanelSuite.2.9.0.0
GeoAPI.1.7.3
GeoAPI.1.7.3.1
IronPython.2.7.4
IronPython.2.7.5
IronPython.StdLib.2.7.4
IronPython.StdLib.2.7.5
Irony.0.9.0
Microsoft.CodeAnalysis.Analyzers.1.0.0
Microsoft.CodeAnalysis.CSharp.1.0.0
Microsoft.CodeAnalysis.Common.1.0.0
Moq.4.2.1409.1722
Moq.4.2.1507.0118
NUnit.2.6.2
NUnit.2.6.3
NUnit.2.6.4
NetTopologySuite.1.13.3.2
Newtonsoft.Json.6.0.8
Newtonsoft.Json.7.0.1
ProjNET4GeoAPI.1.3.0.4
RefactoringEssentials.1.1.0
RefactoringEssentials.1.2.0
RefactoringEssentials.2.0.0
RestSharp.105.0.1
RestSharp.105.2.1
SharpZipLib.0.86.0
System.Collections.Immutable.1.1.36
System.Reflection.Metadata.1.0.21
TreeViewAdv.1.7.0.0
fleesharp.0.9.27-pre
mapguide-api-base-x86.2.5.2.7949
mapguide-api-base-x86.2.6.0.8316
mapguide-api-base-x86.3.0.0.8701
mg-desktop-net40-x86.2.5.2.7949
mg-desktop-viewer-net40-x86.2.5.2.7949
mg-desktop-viewer-x86.2.6.0.8316
mg-desktop-viewer-x86.3.0.0.8701
mg-desktop-x86.2.6.0.8316
mg-desktop-x86.3.0.0.8701
RestSharp.105.2.3
GeoAPI.1.7.4
Irony.0.9.1
Microsoft.CodeAnalysis.Analyzers.1.1.0
Microsoft.CodeAnalysis.Common.1.2.1
Microsoft.CodeAnalysis.CSharp.1.2.1
Moq.4.2.1510.2205
NetTopologySuite.1.14
Newtonsoft.Json.8.0.3
NUnit.3.2.0
RefactoringEssentials.4.0.0
System.Collections.4.0.0
System.Collections.Immutable.1.1.37
System.Diagnostics.Debug.4.0.0
System.Globalization.4.0.0
System.Linq.4.0.0
System.Reflection.Metadata.1.2.0
System.Resources.ResourceManager.4.0.0
System.Runtime.4.0.0
System.Runtime.Extensions.4.0.0
System.Threading.4.0.0
Castle.Core.3.3.3
DockPanelSuite.2.12.0
DynamicLanguageRuntime.1.1.2
IronPython.2.7.7
IronPython.StdLib.2.7.7
Microsoft.CodeAnalysis.Common.1.3.2
Microsoft.CodeAnalysis.CSharp.1.3.2
Moq.4.5.29
Newtonsoft.Json.9.0.1
NUnit.3.5.0
System.Collections.4.3.0
System.Collections.Immutable.1.3.0
System.Diagnostics.Debug.4.3.0
System.Globalization.4.3.0
System.Linq.4.3.0
System.Reflection.Metadata.1.4.1
System.Resources.ResourceManager.4.3.0
System.Runtime.4.3.0
System.Runtime.Extensions.4.3.0
System.Threading.4.3.0
DockPanelSuite.ThemeVS2003.2.12.0
DockPanelSuite.ThemeVS2012.2.12.0
DockPanelSuite.ThemeVS2013.2.12.0
DockPanelSuite.ThemeVS2015.2.12.0


Modified: trunk/Tools/Maestro/Maestro.AddIn.Rest/UI/RestExplorer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Rest/UI/RestExplorer.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.AddIn.Rest/UI/RestExplorer.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -20,6 +20,7 @@
 
 #endregion Disclaimer / License
 using Maestro.AddIn.Rest.Model;
+using Maestro.Base;
 using Maestro.Base.Services;
 using Maestro.Shared.UI;
 using OSGeo.MapGuide.MaestroAPI;
@@ -41,6 +42,12 @@
             this.Title = this.Description = Strings.RestExplorer;
         }
 
+        protected override void OnLoad(EventArgs e)
+        {
+            Workbench.Instance.ApplyThemeTo(toolStrip1);
+            base.OnLoad(e);
+        }
+
         public override ViewRegion DefaultRegion => ViewRegion.Right;
 
         public override bool AllowUserClose => false;

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -1,5 +1,6 @@
 using ICSharpCode.Core;
 using Maestro.AddIn.Scripting.Lang.Python;
+using Maestro.Base;
 using Maestro.Editors.Common;
 using Maestro.Shared.UI;
 using Microsoft.Scripting.Hosting.Shell;
@@ -48,6 +49,7 @@
         protected override void OnLoad(EventArgs e)
         {
             textEditor.SetParent(this.ParentForm);
+            Workbench.Instance.ApplyThemeTo(toolStrip1);
             base.OnLoad(e);
         }
 

Modified: trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -51,6 +51,10 @@
 
                 ServiceRegistry.GetService<NewItemTemplateService>().InitUserTemplates();
                 var wb = Workbench.Instance;
+
+                Themes.CurrentTheme = Props.Get<string>(ConfigProperties.SelectedTheme, null);
+                wb.ApplyTheme(Themes.Get(Themes.CurrentTheme));
+
                 wb.FormClosing += new System.Windows.Forms.FormClosingEventHandler(OnWorkbenchClosing);
                 wb.Text = "MapGuide Maestro"; //NOXLATE
 

Modified: trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/Events/EventWatcher.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -157,7 +157,7 @@
                 var openMgr = ServiceRegistry.GetService<OpenResourceManager>();
                 var siteExp = wb.ActiveSiteExplorer;
 
-                var nav = new ResourceIdNavigator(connMgr, openMgr, viewMgr, siteExp);
+                var nav = new ResourceIdNavigator(connMgr, openMgr, viewMgr, siteExp, wb);
                 wb.AddToolbar("Resource ID Bar", nav.NavigatorToolStrip, ToolbarRegion.Top, true);
             }
 

Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj	2016-12-31 16:53:51 UTC (rev 9110)
@@ -71,6 +71,21 @@
     <Reference Include="System.Web" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
+    <Reference Include="WeifenLuo.WinFormsUI.Docking, Version=2.11.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
+      <HintPath>..\Maestro\packages\DockPanelSuite.2.12.0\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
+    </Reference>
+    <Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2003, Version=2.11.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
+      <HintPath>..\Maestro\packages\DockPanelSuite.ThemeVS2003.2.12.0\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2003.dll</HintPath>
+    </Reference>
+    <Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2012, Version=2.11.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
+      <HintPath>..\Maestro\packages\DockPanelSuite.ThemeVS2012.2.12.0\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2012.dll</HintPath>
+    </Reference>
+    <Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2013, Version=2.11.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
+      <HintPath>..\Maestro\packages\DockPanelSuite.ThemeVS2013.2.12.0\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2013.dll</HintPath>
+    </Reference>
+    <Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015, Version=2.11.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
+      <HintPath>..\Maestro\packages\DockPanelSuite.ThemeVS2015.2.12.0\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="..\Properties\CodeAnalysisRules.cs">
@@ -440,6 +455,7 @@
     <Compile Include="UI\TestResourceCompatibilityDialog.Designer.cs">
       <DependentUpon>TestResourceCompatibilityDialog.cs</DependentUpon>
     </Compile>
+    <Compile Include="UI\Themes.cs" />
     <Compile Include="UI\TipOfTheDayDialog.cs">
       <SubType>Form</SubType>
     </Compile>

Modified: trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Preferences/ConfigProperties.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -33,6 +33,11 @@
     public static class ConfigProperties
     {
         /// <summary>
+        /// The selected theme
+        /// </summary>
+        public const string SelectedTheme = "General.SelectedTheme"; //NOXLATE
+
+        /// <summary>
         /// The locale to preview in
         /// </summary>
         public const string PreviewLocale = "General.PreviewLocale"; //NOXLATE

Modified: trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.Designer.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.Designer.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -40,6 +40,9 @@
             this.chkOutbound = new System.Windows.Forms.CheckBox();
             this.chkMessages = new System.Windows.Forms.CheckBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.btnBrowseLiveMapEditor = new System.Windows.Forms.Button();
+            this.txtLiveMapEditor = new System.Windows.Forms.TextBox();
             this.label7 = new System.Windows.Forms.Label();
             this.btnBrowseRtMapInspector = new System.Windows.Forms.Button();
             this.txtRtMapInspector = new System.Windows.Forms.TextBox();
@@ -54,9 +57,8 @@
             this.cmbOpenedColor = new Maestro.Editors.Common.ColorComboBox();
             this.label6 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
-            this.label8 = new System.Windows.Forms.Label();
-            this.btnBrowseLiveMapEditor = new System.Windows.Forms.Button();
-            this.txtLiveMapEditor = new System.Windows.Forms.TextBox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.cmbTheme = new System.Windows.Forms.ComboBox();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -144,6 +146,24 @@
             this.groupBox2.Name = "groupBox2";
             this.groupBox2.TabStop = false;
             // 
+            // label8
+            // 
+            resources.ApplyResources(this.label8, "label8");
+            this.label8.Name = "label8";
+            // 
+            // btnBrowseLiveMapEditor
+            // 
+            resources.ApplyResources(this.btnBrowseLiveMapEditor, "btnBrowseLiveMapEditor");
+            this.btnBrowseLiveMapEditor.Name = "btnBrowseLiveMapEditor";
+            this.btnBrowseLiveMapEditor.UseVisualStyleBackColor = true;
+            this.btnBrowseLiveMapEditor.Click += new System.EventHandler(this.btnBrowseLiveMapEditor_Click);
+            // 
+            // txtLiveMapEditor
+            // 
+            resources.ApplyResources(this.txtLiveMapEditor, "txtLiveMapEditor");
+            this.txtLiveMapEditor.Name = "txtLiveMapEditor";
+            this.txtLiveMapEditor.ReadOnly = true;
+            // 
             // label7
             // 
             resources.ApplyResources(this.label7, "label7");
@@ -230,27 +250,23 @@
             resources.ApplyResources(this.label5, "label5");
             this.label5.Name = "label5";
             // 
-            // label8
+            // label9
             // 
-            resources.ApplyResources(this.label8, "label8");
-            this.label8.Name = "label8";
+            resources.ApplyResources(this.label9, "label9");
+            this.label9.Name = "label9";
             // 
-            // btnBrowseLiveMapEditor
+            // cmbTheme
             // 
-            resources.ApplyResources(this.btnBrowseLiveMapEditor, "btnBrowseLiveMapEditor");
-            this.btnBrowseLiveMapEditor.Name = "btnBrowseLiveMapEditor";
-            this.btnBrowseLiveMapEditor.UseVisualStyleBackColor = true;
-            this.btnBrowseLiveMapEditor.Click += new System.EventHandler(this.btnBrowseLiveMapEditor_Click);
+            resources.ApplyResources(this.cmbTheme, "cmbTheme");
+            this.cmbTheme.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbTheme.FormattingEnabled = true;
+            this.cmbTheme.Name = "cmbTheme";
             // 
-            // txtLiveMapEditor
-            // 
-            resources.ApplyResources(this.txtLiveMapEditor, "txtLiveMapEditor");
-            this.txtLiveMapEditor.Name = "txtLiveMapEditor";
-            this.txtLiveMapEditor.ReadOnly = true;
-            // 
             // GeneralPreferencesCtrl
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            this.Controls.Add(this.cmbTheme);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.groupBox3);
             this.Controls.Add(this.groupBox2);
             this.Controls.Add(this.groupBox1);
@@ -303,5 +319,7 @@
         private System.Windows.Forms.Label label8;
         private System.Windows.Forms.Button btnBrowseLiveMapEditor;
         private System.Windows.Forms.TextBox txtLiveMapEditor;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.ComboBox cmbTheme;
     }
 }

Modified: trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -25,6 +25,7 @@
 using System;
 using System.Drawing;
 using System.IO;
+using System.Linq;
 using System.Windows.Forms;
 using Props = ICSharpCode.Core.PropertyService;
 
@@ -49,6 +50,9 @@
             else
                 rdFusion.Checked = true;
 
+            cmbTheme.DataSource = new string[] { "(none)" }.Concat(Themes.List).ToArray();
+            cmbTheme.SelectedItem = Props.Get<string>(ConfigProperties.SelectedTheme, null);
+
             var path = Props.Get(ConfigProperties.UserTemplatesDirectory, Path.Combine(FileUtility.ApplicationRootPath, "UserTemplates")); //NOXLATE
             txtTemplatePath.Text = path;
             var msg = Props.Get(ConfigProperties.ShowMessages, true);
@@ -96,6 +100,8 @@
             else
                 Apply(ConfigProperties.PreviewViewerType, "AJAX"); //NOXLATE
 
+            var themeName = cmbTheme.SelectedItem?.ToString();
+            Apply(ConfigProperties.SelectedTheme, themeName);
             Apply(ConfigProperties.UserTemplatesDirectory, txtTemplatePath.Text);
             Apply(ConfigProperties.MgCookerPath, txtMgCooker.Text);
             Apply(ConfigProperties.LocalFsPreviewPath, txtFsPreview.Text);
@@ -106,6 +112,9 @@
             Apply(ConfigProperties.ShowTipOfTheDay, chkShowTipOfTheDay.Checked);
 
             //These changes require restart
+            if (themeName != Themes.CurrentTheme)
+                restart = true;
+
             if (Apply(ConfigProperties.ShowMessages, chkMessages.Checked ? "True" : "False")) //NOXLATE
                 restart = true;
 

Modified: trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.resx	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Preferences/GeneralPreferencesCtrl.resx	2016-12-31 16:53:51 UTC (rev 9110)
@@ -123,7 +123,7 @@
   </data>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>13, 14</value>
+    <value>13, 40</value>
   </data>
   <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
     <value>182, 13</value>
@@ -144,13 +144,13 @@
     <value>$this</value>
   </data>
   <data name=">>label1.ZOrder" xml:space="preserve">
-    <value>8</value>
+    <value>10</value>
   </data>
   <data name="rdAjax.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
   </data>
   <data name="rdAjax.Location" type="System.Drawing.Point, System.Drawing">
-    <value>226, 12</value>
+    <value>226, 38</value>
   </data>
   <data name="rdAjax.Size" type="System.Drawing.Size, System.Drawing">
     <value>86, 17</value>
@@ -171,7 +171,7 @@
     <value>$this</value>
   </data>
   <data name=">>rdAjax.ZOrder" xml:space="preserve">
-    <value>7</value>
+    <value>9</value>
   </data>
   <data name="rdFusion.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
@@ -180,7 +180,7 @@
     <value>False</value>
   </data>
   <data name="rdFusion.Location" type="System.Drawing.Point, System.Drawing">
-    <value>318, 12</value>
+    <value>318, 38</value>
   </data>
   <data name="rdFusion.Size" type="System.Drawing.Size, System.Drawing">
     <value>56, 17</value>
@@ -201,13 +201,13 @@
     <value>$this</value>
   </data>
   <data name=">>rdFusion.ZOrder" xml:space="preserve">
-    <value>6</value>
+    <value>8</value>
   </data>
   <data name="label2.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
   </data>
   <data name="label2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>13, 52</value>
+    <value>13, 68</value>
   </data>
   <data name="label2.Size" type="System.Drawing.Size, System.Drawing">
     <value>101, 13</value>
@@ -228,14 +228,14 @@
     <value>$this</value>
   </data>
   <data name=">>label2.ZOrder" xml:space="preserve">
-    <value>5</value>
+    <value>7</value>
   </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="txtTemplatePath.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
   </data>
   <data name="txtTemplatePath.Location" type="System.Drawing.Point, System.Drawing">
-    <value>120, 49</value>
+    <value>120, 65</value>
   </data>
   <data name="txtTemplatePath.Size" type="System.Drawing.Size, System.Drawing">
     <value>291, 20</value>
@@ -253,13 +253,13 @@
     <value>$this</value>
   </data>
   <data name=">>txtTemplatePath.ZOrder" xml:space="preserve">
-    <value>4</value>
+    <value>6</value>
   </data>
   <data name="btnBrowseTemplatePath.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Right</value>
   </data>
   <data name="btnBrowseTemplatePath.Location" type="System.Drawing.Point, System.Drawing">
-    <value>417, 47</value>
+    <value>417, 63</value>
   </data>
   <data name="btnBrowseTemplatePath.Size" type="System.Drawing.Size, System.Drawing">
     <value>25, 23</value>
@@ -280,71 +280,11 @@
     <value>$this</value>
   </data>
   <data name=">>btnBrowseTemplatePath.ZOrder" xml:space="preserve">
-    <value>3</value>
+    <value>5</value>
   </data>
   <data name="groupBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
   </data>
-  <data name=">>chkShowTipOfTheDay.Name" xml:space="preserve">
-    <value>chkShowTipOfTheDay</value>
-  </data>
-  <data name=">>chkShowTipOfTheDay.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=">>chkShowTipOfTheDay.Parent" xml:space="preserve">
-    <value>groupBox1</value>
-  </data>
-  <data name=">>chkShowTipOfTheDay.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name=">>chkOutbound.Name" xml:space="preserve">
-    <value>chkOutbound</value>
-  </data>
-  <data name=">>chkOutbound.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=">>chkOutbound.Parent" xml:space="preserve">
-    <value>groupBox1</value>
-  </data>
-  <data name=">>chkOutbound.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <data name=">>chkMessages.Name" xml:space="preserve">
-    <value>chkMessages</value>
-  </data>
-  <data name=">>chkMessages.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=">>chkMessages.Parent" xml:space="preserve">
-    <value>groupBox1</value>
-  </data>
-  <data name=">>chkMessages.ZOrder" xml:space="preserve">
-    <value>2</value>
-  </data>
-  <data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>16, 93</value>
-  </data>
-  <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>426, 50</value>
-  </data>
-  <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
-    <value>6</value>
-  </data>
-  <data name="groupBox1.Text" xml:space="preserve">
-    <value>Show on Startup</value>
-  </data>
-  <data name=">>groupBox1.Name" xml:space="preserve">
-    <value>groupBox1</value>
-  </data>
-  <data name=">>groupBox1.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=">>groupBox1.Parent" xml:space="preserve">
-    <value>$this</value>
-  </data>
-  <data name=">>groupBox1.ZOrder" xml:space="preserve">
-    <value>2</value>
-  </data>
   <data name="chkShowTipOfTheDay.AutoSize" type="System.Boolean, mscorlib">
     <value>True</value>
   </data>
@@ -426,6 +366,30 @@
   <data name=">>chkMessages.ZOrder" xml:space="preserve">
     <value>2</value>
   </data>
+  <data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>16, 93</value>
+  </data>
+  <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>426, 50</value>
+  </data>
+  <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
+    <value>6</value>
+  </data>
+  <data name="groupBox1.Text" xml:space="preserve">
+    <value>Show on Startup</value>
+  </data>
+  <data name=">>groupBox1.Name" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name=">>groupBox1.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=">>groupBox1.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name=">>groupBox1.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
   <data name="groupBox2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
   </data>
@@ -772,83 +736,11 @@
     <value>$this</value>
   </data>
   <data name=">>groupBox2.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>3</value>
   </data>
   <data name="groupBox3.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
     <value>Top, Left, Right</value>
   </data>
-  <data name=">>cmbModifiedColor.Name" xml:space="preserve">
-    <value>cmbModifiedColor</value>
-  </data>
-  <data name=">>cmbModifiedColor.Type" xml:space="preserve">
-    <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=5.0.0.6640, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
-  </data>
-  <data name=">>cmbModifiedColor.Parent" xml:space="preserve">
-    <value>groupBox3</value>
-  </data>
-  <data name=">>cmbModifiedColor.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
-  <data name=">>cmbOpenedColor.Name" xml:space="preserve">
-    <value>cmbOpenedColor</value>
-  </data>
-  <data name=">>cmbOpenedColor.Type" xml:space="preserve">
-    <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=5.0.0.6640, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
-  </data>
-  <data name=">>cmbOpenedColor.Parent" xml:space="preserve">
-    <value>groupBox3</value>
-  </data>
-  <data name=">>cmbOpenedColor.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <data name=">>label6.Name" xml:space="preserve">
-    <value>label6</value>
-  </data>
-  <data name=">>label6.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=">>label6.Parent" xml:space="preserve">
-    <value>groupBox3</value>
-  </data>
-  <data name=">>label6.ZOrder" xml:space="preserve">
-    <value>2</value>
-  </data>
-  <data name=">>label5.Name" xml:space="preserve">
-    <value>label5</value>
-  </data>
-  <data name=">>label5.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=">>label5.Parent" xml:space="preserve">
-    <value>groupBox3</value>
-  </data>
-  <data name=">>label5.ZOrder" xml:space="preserve">
-    <value>3</value>
-  </data>
-  <data name="groupBox3.Location" type="System.Drawing.Point, System.Drawing">
-    <value>16, 149</value>
-  </data>
-  <data name="groupBox3.Size" type="System.Drawing.Size, System.Drawing">
-    <value>426, 90</value>
-  </data>
-  <data name="groupBox3.TabIndex" type="System.Int32, mscorlib">
-    <value>8</value>
-  </data>
-  <data name="groupBox3.Text" xml:space="preserve">
-    <value>Site Explorer</value>
-  </data>
-  <data name=">>groupBox3.Name" xml:space="preserve">
-    <value>groupBox3</value>
-  </data>
-  <data name=">>groupBox3.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=">>groupBox3.Parent" xml:space="preserve">
-    <value>$this</value>
-  </data>
-  <data name=">>groupBox3.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
   <data name="cmbModifiedColor.Location" type="System.Drawing.Point, System.Drawing">
     <value>187, 49</value>
   </data>
@@ -862,7 +754,7 @@
     <value>cmbModifiedColor</value>
   </data>
   <data name=">>cmbModifiedColor.Type" xml:space="preserve">
-    <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=5.0.0.6640, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
+    <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name=">>cmbModifiedColor.Parent" xml:space="preserve">
     <value>groupBox3</value>
@@ -883,7 +775,7 @@
     <value>cmbOpenedColor</value>
   </data>
   <data name=">>cmbOpenedColor.Type" xml:space="preserve">
-    <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=5.0.0.6640, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
+    <value>Maestro.Editors.Common.ColorComboBox, Maestro.Editors, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f526c48929fda856</value>
   </data>
   <data name=">>cmbOpenedColor.Parent" xml:space="preserve">
     <value>groupBox3</value>
@@ -945,6 +837,84 @@
   <data name=">>label5.ZOrder" xml:space="preserve">
     <value>3</value>
   </data>
+  <data name="groupBox3.Location" type="System.Drawing.Point, System.Drawing">
+    <value>16, 149</value>
+  </data>
+  <data name="groupBox3.Size" type="System.Drawing.Size, System.Drawing">
+    <value>426, 90</value>
+  </data>
+  <data name="groupBox3.TabIndex" type="System.Int32, mscorlib">
+    <value>8</value>
+  </data>
+  <data name="groupBox3.Text" xml:space="preserve">
+    <value>Site Explorer</value>
+  </data>
+  <data name=">>groupBox3.Name" xml:space="preserve">
+    <value>groupBox3</value>
+  </data>
+  <data name=">>groupBox3.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=">>groupBox3.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name=">>groupBox3.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="label9.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="label9.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="label9.Location" type="System.Drawing.Point, System.Drawing">
+    <value>13, 11</value>
+  </data>
+  <data name="label9.Size" type="System.Drawing.Size, System.Drawing">
+    <value>162, 13</value>
+  </data>
+  <data name="label9.TabIndex" type="System.Int32, mscorlib">
+    <value>9</value>
+  </data>
+  <data name="label9.Text" xml:space="preserve">
+    <value>Theme (restart to apply changes)</value>
+  </data>
+  <data name=">>label9.Name" xml:space="preserve">
+    <value>label9</value>
+  </data>
+  <data name=">>label9.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=">>label9.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name=">>label9.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="cmbTheme.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Left, Right</value>
+  </data>
+  <data name="cmbTheme.Location" type="System.Drawing.Point, System.Drawing">
+    <value>226, 8</value>
+  </data>
+  <data name="cmbTheme.Size" type="System.Drawing.Size, System.Drawing">
+    <value>216, 21</value>
+  </data>
+  <data name="cmbTheme.TabIndex" type="System.Int32, mscorlib">
+    <value>10</value>
+  </data>
+  <data name=">>cmbTheme.Name" xml:space="preserve">
+    <value>cmbTheme</value>
+  </data>
+  <data name=">>cmbTheme.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name=">>cmbTheme.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name=">>cmbTheme.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>

Modified: trunk/Tools/Maestro/Maestro.Base/UI/ResourceIdNavigator.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/ResourceIdNavigator.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/UI/ResourceIdNavigator.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -55,7 +55,8 @@
         public ResourceIdNavigator(ServerConnectionManager connMgr,
                                    OpenResourceManager omgr,
                                    ViewContentManager viewMgr,
-                                   ISiteExplorer siteExp)
+                                   ISiteExplorer siteExp,
+                                   Workbench wb)
         {
             _connMgr = connMgr;
             _connMgr.ConnectionAdded += WeakEventHandler.Wrap<ServerConnectionEventHandler>(OnConnectionAdded, (eh) => _connMgr.ConnectionAdded -= eh);
@@ -112,6 +113,8 @@
                 _btnGo,
                 _btnOpenAsXml
             });
+
+            wb.Theme?.ApplyTo(_strip);
         }
 
         private void OnSiteExplorerItemsSelected(object sender, RepositoryItemEventArgs e)

Modified: trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -37,6 +37,7 @@
 using System.Drawing;
 using System.Linq;
 using System.Windows.Forms;
+using WeifenLuo.WinFormsUI.Docking;
 
 namespace Maestro.Base.UI
 {
@@ -82,6 +83,11 @@
             }
         }
 
+        internal void AcceptTheme(ThemeBase theme)
+        {
+            theme.ApplyTo(tsSiteExplorer);
+        }
+
         private void OnIdle(object sender, EventArgs e)
         {
             foreach (var item in tsSiteExplorer.Items)

Added: trunk/Tools/Maestro/Maestro.Base/UI/Themes.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/Themes.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Base/UI/Themes.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -0,0 +1,88 @@
+#region Disclaimer / License
+
+// Copyright (C) 2016, 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 Disclaimer / License
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace Maestro.Base.UI
+{
+    //NOTE: Dark themes disabled as they don't properly mesh with toolstrips (esp wrt label colors)
+    //Possibly related to: https://github.com/dockpanelsuite/dockpanelsuite/issues/415
+
+    /// <summary>
+    /// Available themes
+    /// </summary>
+    public static class Themes
+    {
+        public static string CurrentTheme { get; internal set; }
+
+        public const string VS2012Blue = nameof(VS2012Blue);
+        //public const string VS2012Dark = nameof(VS2012Dark);
+        public const string VS2012Light = nameof(VS2012Light);
+
+        public const string VS2013Blue = nameof(VS2013Blue);
+        //public const string VS2013Dark = nameof(VS2013Dark);
+        public const string VS2013Light = nameof(VS2013Light);
+
+        public const string VS2015Blue = nameof(VS2015Blue);
+        //public const string VS2015Dark = nameof(VS2015Dark);
+        public const string VS2015Light = nameof(VS2015Light);
+
+        public static string[] List { get; } = new string[]
+        {
+            VS2012Blue,
+            //VS2012Dark,
+            VS2012Light,
+            VS2013Blue,
+            //VS2013Dark,
+            VS2013Light,
+            VS2015Blue,
+            //VS2015Dark,
+            VS2015Light
+        };
+
+        public static ThemeBase Get(string key)
+        {
+            switch (key)
+            {
+                case VS2012Blue:
+                    return new VS2012BlueTheme();
+                //case VS2012Dark:
+                //    return new VS2012DarkTheme();
+                case VS2012Light:
+                    return new VS2012LightTheme();
+                case VS2013Blue:
+                    return new VS2013BlueTheme();
+                //case VS2013Dark:
+                //    return new VS2013DarkTheme();
+                case VS2013Light:
+                    return new VS2013LightTheme();
+                case VS2015Blue:
+                    return new VS2015BlueTheme();
+                //case VS2015Dark:
+                //    return new VS2015DarkTheme();
+                case VS2015Light:
+                    return new VS2015LightTheme();
+                default:
+                    return null;
+            }
+        }
+    }
+}

Modified: trunk/Tools/Maestro/Maestro.Base/Workbench.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Workbench.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/Workbench.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -24,6 +24,8 @@
 using Maestro.Base.UI;
 using Maestro.Shared.UI;
 using System;
+using WeifenLuo.WinFormsUI.Docking;
+using System.Windows.Forms;
 
 namespace Maestro.Base
 {
@@ -53,6 +55,11 @@
 
         private static bool _init = false;
 
+        public void ApplyThemeTo(ToolStrip ts)
+        {
+            this.Theme?.ApplyTo(ts);
+        }
+
         /// <summary>
         /// Initializes the workbench.
         /// </summary>
@@ -83,9 +90,25 @@
                     current.Close();
                     //CheckContainerStatus();
                 }
+                var theme = this.Theme;
+                var exp = _siteExp as SiteExplorer;
+                if (exp != null && theme != null)
+                {
+                    exp.AcceptTheme(theme);
+                }
             }
         }
 
+        public override void ApplyTheme(ThemeBase theme)
+        {
+            base.ApplyTheme(theme);
+            var exp = _siteExp as SiteExplorer;
+            if (exp != null && theme != null)
+            {
+                exp.AcceptTheme(theme);
+            }
+        }
+
         /// <summary>
         /// Gets the active editor view
         /// </summary>

Modified: trunk/Tools/Maestro/Maestro.Base/packages.config
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/packages.config	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Base/packages.config	2016-12-31 16:53:51 UTC (rev 9110)
@@ -1,4 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
+  <package id="DockPanelSuite" version="2.12.0" targetFramework="net45" />
+  <package id="DockPanelSuite.ThemeVS2003" version="2.12.0" targetFramework="net45" />
+  <package id="DockPanelSuite.ThemeVS2012" version="2.12.0" targetFramework="net45" />
+  <package id="DockPanelSuite.ThemeVS2013" version="2.12.0" targetFramework="net45" />
+  <package id="DockPanelSuite.ThemeVS2015" version="2.12.0" targetFramework="net45" />
   <package id="TreeViewAdv" version="1.7.0.0" targetFramework="net4" />
 </packages>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs	2016-12-31 15:42:49 UTC (rev 9109)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs	2016-12-31 16:53:51 UTC (rev 9110)
@@ -22,6 +22,7 @@
 
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Windows.Forms;
 using WeifenLuo.WinFormsUI.Docking;
 
@@ -105,6 +106,40 @@
             Application.Idle += OnApplicationIdle;
         }
 
+        public ThemeBase Theme => contentPanel.Theme;
+
+        public virtual void ApplyTheme(ThemeBase theme)
+        {
+            contentPanel.Theme = theme;
+            if (theme != null)
+            {
+                var toolstrips = toolStripContainer
+                                    .TopToolStripPanel
+                                    .Controls
+                                    .OfType<ToolStrip>()
+                                .Concat(toolStripContainer
+                                    .BottomToolStripPanel
+                                    .Controls
+                                    .OfType<ToolStrip>())
+                                .Concat(toolStripContainer
+                                    .LeftToolStripPanel
+                                    .Controls
+                                    .OfType<ToolStrip>())
+                                .Concat(toolStripContainer
+                                    .RightToolStripPanel
+                                    .Controls
+                                    .OfType<ToolStrip>());
+
+                foreach (var ts in toolstrips)
+                {
+                    theme.ApplyTo(ts);
+                }
+                theme.ApplyTo(menu);
+                theme.ApplyTo(status);
+                theme.ApplyTo(ctxToolbar);
+            }
+        }
+
         private void OnActiveDocumentChanged(object sender, EventArgs e)
         {
             var doc = contentPanel.ActiveDocument as DockContent;

Added: trunk/Tools/Maestro/Maestro.Shared.UI/app.config
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/app.config	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/app.config	2016-12-31 16:53:51 UTC (rev 9110)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="WeifenLuo.WinFormsUI.Docking" publicKeyToken="5cded1a1a0a7b481" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2.11.0.0" newVersion="2.11.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>
\ No newline at end of file



More information about the mapguide-commits mailing list