[mapguide-commits] r5279 - in sandbox/maestro-3.0: Maestro
Maestro.Base Maestro.Base/Services Maestro.Login
OSGeo.MapGuide.MaestroAPI
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Oct 13 01:59:23 EDT 2010
Author: jng
Date: 2010-10-12 22:59:23 -0700 (Tue, 12 Oct 2010)
New Revision: 5279
Modified:
sandbox/maestro-3.0/Maestro.Base/Services/UrlLauncherService.cs
sandbox/maestro-3.0/Maestro.Base/TabFactory.cs
sandbox/maestro-3.0/Maestro.Login/LoginDialog.cs
sandbox/maestro-3.0/Maestro/Program.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs
sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Platform.cs
Log:
3.0 sandbox changes:
- Tweak the platform check. It *is* the mono runtime we are concerned about here.
Modified: sandbox/maestro-3.0/Maestro/Program.cs
===================================================================
--- sandbox/maestro-3.0/Maestro/Program.cs 2010-10-13 02:32:42 UTC (rev 5278)
+++ sandbox/maestro-3.0/Maestro/Program.cs 2010-10-13 05:59:23 UTC (rev 5279)
@@ -57,7 +57,7 @@
// to System.Diagnostics.Trace.
LoggingService.Info("Application start");
- if (!Platform.IsWindows)
+ if (Platform.IsRunningOnMono)
{
LoggingService.Info(Properties.Resources.Warn_Mono);
}
Modified: sandbox/maestro-3.0/Maestro.Base/Services/UrlLauncherService.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/Services/UrlLauncherService.cs 2010-10-13 02:32:42 UTC (rev 5278)
+++ sandbox/maestro-3.0/Maestro.Base/Services/UrlLauncherService.cs 2010-10-13 05:59:23 UTC (rev 5279)
@@ -45,7 +45,7 @@
public bool CanUseEmbeddedWebBrowser
{
//Mono's web browser is too unwieldy
- get { return Platform.IsWindows; }
+ get { return !Platform.IsRunningOnMono; }
}
/// <summary>
Modified: sandbox/maestro-3.0/Maestro.Base/TabFactory.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Base/TabFactory.cs 2010-10-13 02:32:42 UTC (rev 5278)
+++ sandbox/maestro-3.0/Maestro.Base/TabFactory.cs 2010-10-13 05:59:23 UTC (rev 5279)
@@ -95,7 +95,7 @@
var tabs = page.Parent as TabControl;
if (tabs != null && tabs.TabPages.Contains(page))
{
- if (Platform.IsWindows)
+ if (!Platform.IsRunningOnMono)
{
var idx = tabs.TabPages.IndexOf(page);
tabs.TabPages.Remove(page);
Modified: sandbox/maestro-3.0/Maestro.Login/LoginDialog.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Login/LoginDialog.cs 2010-10-13 02:32:42 UTC (rev 5278)
+++ sandbox/maestro-3.0/Maestro.Login/LoginDialog.cs 2010-10-13 05:59:23 UTC (rev 5279)
@@ -96,7 +96,7 @@
rdHttp.Checked = true;
//Mono = No LocalNativeConnection for you (for now...)
- if (!Platform.IsWindows)
+ if (Platform.IsRunningOnMono)
{
rdTcpIp.Enabled = false;
}
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs 2010-10-13 02:32:42 UTC (rev 5278)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs 2010-10-13 05:59:23 UTC (rev 5279)
@@ -143,7 +143,7 @@
throw new ArgumentException("Provider not registered: " + provider);
ConnectionProviderEntry prv = FindProvider(provider);
- if (prv != null && !prv.IsMultiPlatform && !Platform.IsWindows)
+ if (prv != null && !prv.IsMultiPlatform && Platform.IsRunningOnMono)
throw new NotSupportedException("The specified provider is not usable in your operating system");
Type t = _ctors[name];
Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Platform.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Platform.cs 2010-10-13 02:32:42 UTC (rev 5278)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/Platform.cs 2010-10-13 05:59:23 UTC (rev 5279)
@@ -25,9 +25,19 @@
{
public static class Platform
{
- public static bool IsWindows
+ static Platform()
{
- get { return Environment.OSVersion.Platform != PlatformID.Unix && Environment.OSVersion.Platform != PlatformID.MacOSX; }
+ _mrtType = Type.GetType("Mono.Runtime");
}
+
+ private static Type _mrtType;
+
+ public static bool IsRunningOnMono
+ {
+ get
+ {
+ return _mrtType != null;
+ }
+ }
}
}
More information about the mapguide-commits
mailing list