[mapguide-commits] r5665 - in trunk/Tools/Maestro/Maestro.Base: .
Commands Properties
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Mar 28 09:40:36 EDT 2011
Author: jng
Date: 2011-03-28 06:40:36 -0700 (Mon, 28 Mar 2011)
New Revision: 5665
Added:
trunk/Tools/Maestro/Maestro.Base/Commands/SiteAdministratorCommand.cs
Modified:
trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin
trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
Log:
Add missing Site Administrator command that was in the previous version but not this one
Added: trunk/Tools/Maestro/Maestro.Base/Commands/SiteAdministratorCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteAdministratorCommand.cs (rev 0)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteAdministratorCommand.cs 2011-03-28 13:40:36 UTC (rev 5665)
@@ -0,0 +1,47 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+using Maestro.Base.Services;
+using System.Diagnostics;
+
+namespace Maestro.Base.Commands
+{
+ internal class SiteAdministratorCommand : AbstractMenuCommand
+ {
+ public override void Run()
+ {
+ var wb = Workbench.Instance;
+ var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
+ var conn = mgr.GetConnection(wb.ActiveSiteExplorer.ConnectionName);
+
+ if (conn.ProviderName.ToUpper() == "MAESTRO.HTTP")
+ {
+ string baseUrl = conn.GetCustomProperty("BaseUrl").ToString();
+ if (!baseUrl.EndsWith("/"))
+ baseUrl += "/";
+
+ Process.Start(baseUrl + "mapadmin/login.php");
+ }
+ }
+ }
+}
Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin 2011-03-28 12:23:13 UTC (rev 5664)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin 2011-03-28 13:40:36 UTC (rev 5665)
@@ -183,6 +183,9 @@
<MenuItem id="Menu_Tools"
type="Menu"
label="${res:Menu_Tools}">
+ <MenuItem id="SiteAdmin"
+ label="${res:SiteAdministrator}"
+ class="Maestro.Base.Commands.SiteAdministratorCommand"/>
<MenuItem id="MgCooker"
label="${res:MgCooker}"
class="Maestro.Base.Commands.MgCookerCommand"/>
Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj 2011-03-28 12:23:13 UTC (rev 5664)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj 2011-03-28 13:40:36 UTC (rev 5665)
@@ -101,6 +101,7 @@
<Compile Include="Commands\SaveResourceAsCommand.cs" />
<Compile Include="Commands\SaveResourceCommand.cs" />
<Compile Include="Commands\ServerMonitorCommand.cs" />
+ <Compile Include="Commands\SiteAdministratorCommand.cs" />
<Compile Include="Commands\SiteExplorer\DeleteSelectedItemsCommand.cs" />
<Compile Include="Commands\SiteExplorer\DisconnectCommand.cs" />
<Compile Include="Commands\SiteExplorer\CopyMoveToAnotherServerCommand.cs" />
Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs 2011-03-28 12:23:13 UTC (rev 5664)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs 2011-03-28 13:40:36 UTC (rev 5665)
@@ -1553,6 +1553,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to Site Administrator.
+ /// </summary>
+ internal static string SiteAdministrator {
+ get {
+ return ResourceManager.GetString("SiteAdministrator", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Copy/Move selected items to another server.
/// </summary>
internal static string SiteExplorer_CopyMoveToServer {
Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx 2011-03-28 12:23:13 UTC (rev 5664)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx 2011-03-28 13:40:36 UTC (rev 5665)
@@ -877,4 +877,7 @@
<data name="NoFiniteDisplayScalesSpecified" xml:space="preserve">
<value>This Map Definition has tiled layers but has no finite display scales defined. Define some display scales.</value>
</data>
+ <data name="SiteAdministrator" xml:space="preserve">
+ <value>Site Administrator</value>
+ </data>
</root>
\ No newline at end of file
More information about the mapguide-commits
mailing list