[mapguide-commits] r4859 - in sandbox/maestro-2.5: Maestro.Base MaestroAPITests OSGeo.MapGuide.MaestroAPI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 12 12:55:36 EDT 2010


Author: jng
Date: 2010-05-12 12:55:36 -0400 (Wed, 12 May 2010)
New Revision: 4859

Added:
   sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs
Modified:
   sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj
   sandbox/maestro-2.5/Maestro.Base/Workbench.cs
   sandbox/maestro-2.5/MaestroAPITests/
   sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
Log:
- Add a platform detection class (ie. To check whether we're running in Mono)
- Allow toolbar visibility to be tweaked on the Workbench even if there is no visible toolbars.

Modified: sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj	2010-05-12 16:16:21 UTC (rev 4858)
+++ sandbox/maestro-2.5/Maestro.Base/Maestro.Base.csproj	2010-05-12 16:55:36 UTC (rev 4859)
@@ -109,6 +109,10 @@
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\OSGeo.MapGuide.MaestroAPI\OSGeo.MapGuide.MaestroAPI.csproj">
+      <Project>{80FA3158-8B5F-48D1-A393-0378AFE48A7E}</Project>
+      <Name>OSGeo.MapGuide.MaestroAPI</Name>
+    </ProjectReference>
     <ProjectReference Include="..\Thirdparty\SharpDevelop\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj">
       <Project>{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}</Project>
       <Name>ICSharpCode.Core.WinForms</Name>

Modified: sandbox/maestro-2.5/Maestro.Base/Workbench.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Workbench.cs	2010-05-12 16:16:21 UTC (rev 4858)
+++ sandbox/maestro-2.5/Maestro.Base/Workbench.cs	2010-05-12 16:55:36 UTC (rev 4859)
@@ -99,14 +99,16 @@
             this.Controls.Add(toolStripContainer);
 
             ctxToolbar = new ContextMenuStrip();
+            menu.ContextMenuStrip = ctxToolbar;
             toolStripContainer.TopToolStripPanel.ContextMenuStrip = ctxToolbar;
             toolStripContainer.BottomToolStripPanel.ContextMenuStrip = ctxToolbar;
             toolStripContainer.LeftToolStripPanel.ContextMenuStrip = ctxToolbar;
             toolStripContainer.RightToolStripPanel.ContextMenuStrip = ctxToolbar;
 
             toolbar = ToolbarService.CreateToolStrip(this, "/Maestro/Shell/Toolbars/Main");
-            AddToolbar("Base", toolbar, ToolbarRegion.Top, false);
-
+            
+            AddToolbar("Base", toolbar, ToolbarRegion.Top, true);
+            
             status = new StatusStrip();
             statusLabel = new ToolStripStatusLabel();
             status.Items.Add(statusLabel);
@@ -294,28 +296,6 @@
                     (item as IStatusUpdate).UpdateStatus();
             }
         }
-
-        /*
-        /// <summary>
-        /// </summary>
-        /// <param name="m"></param>
-        protected override void WndProc(ref Message m)
-        {
-            if (m.Msg == NativeMethods.WM_SHOWME)
-            {
-                if (WindowState == FormWindowState.Minimized)
-                {
-                    WindowState = FormWindowState.Normal;
-                }
-                // get our current "TopMost" value (ours will always be false though)
-                bool top = TopMost;
-                // make our form jump to the top of everything
-                TopMost = true;
-                // set it back to whatever it was
-                TopMost = top;
-            }
-            base.WndProc(ref m);
-        }*/
     }
 
     /// <summary>


Property changes on: sandbox/maestro-2.5/MaestroAPITests
___________________________________________________________________
Added: svn:ignore
   + bin
obj


Modified: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-05-12 16:16:21 UTC (rev 4858)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-05-12 16:55:36 UTC (rev 4859)
@@ -193,6 +193,7 @@
     <Compile Include="ObjectModels\SymbolDefinition.cs" />
     <Compile Include="ObjectModels\SymbolLibrary.cs" />
     <Compile Include="ObjectModels\WebLayout.cs" />
+    <Compile Include="Platform.cs" />
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
       <DesignTime>True</DesignTime>

Added: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs	                        (rev 0)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Platform.cs	2010-05-12 16:55:36 UTC (rev 4859)
@@ -0,0 +1,33 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace OSGeo.MapGuide.MaestroAPI
+{
+    public static class Platform
+    {
+        public static bool IsWindows
+        {
+            get { return Environment.OSVersion.Platform != PlatformID.Unix || Environment.OSVersion.Platform != PlatformID.MacOSX; }
+        }
+    }
+}



More information about the mapguide-commits mailing list