[mapguide-commits] r4849 -
sandbox/maestro-2.5/Thirdparty/SharpDevelop/ICSharpCode.Core.WinForms
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue May 11 07:07:14 EDT 2010
Author: jng
Date: 2010-05-11 07:07:12 -0400 (Tue, 11 May 2010)
New Revision: 4849
Modified:
sandbox/maestro-2.5/Thirdparty/SharpDevelop/ICSharpCode.Core.WinForms/WinFormsResourceService.cs
Log:
Mono compatibility patch. This was the only P/Invoke detected by MoMa, so we'll only execute that if we're on windows.
Modified: sandbox/maestro-2.5/Thirdparty/SharpDevelop/ICSharpCode.Core.WinForms/WinFormsResourceService.cs
===================================================================
--- sandbox/maestro-2.5/Thirdparty/SharpDevelop/ICSharpCode.Core.WinForms/WinFormsResourceService.cs 2010-05-11 09:21:32 UTC (rev 4848)
+++ sandbox/maestro-2.5/Thirdparty/SharpDevelop/ICSharpCode.Core.WinForms/WinFormsResourceService.cs 2010-05-11 11:07:12 UTC (rev 4849)
@@ -179,6 +179,18 @@
return ico;
}
}
+
+ /// <summary>
+ /// A simple check to determine if we're running in windows
+ /// </summary>
+ private static bool IsWindows
+ {
+ get
+ {
+ var id = Environment.OSVersion.Platform;
+ return id != PlatformID.Unix && id != PlatformID.Unix;
+ }
+ }
/// <summary>
/// Converts a bitmap into an icon.
@@ -198,7 +210,8 @@
return new Icon(tempIco, tempIco.Width, tempIco.Height);
} // dispose tempico, doesn't do much because the icon isn't owned
} finally {
- NativeMethods.DestroyIcon(hIcon);
+ if (IsWindows)
+ NativeMethods.DestroyIcon(hIcon);
}
}
More information about the mapguide-commits
mailing list