From fc52fe3236dbff18360660bf870da201ab44eb98 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Wed, 14 Jun 2017 11:34:39 -0500 Subject: [PATCH] Add func to determine if we are using mono. --- EduNetworkBuilder/NB.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index 7a8c9b2..921dff8 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -358,6 +358,15 @@ namespace EduNetworkBuilder return myresource; } + /// + /// Determine if we are using Mono or .Net. Some things get killed using Mono. + /// + /// True if we are using Mono + public static bool IsRunningOnMono() + { + return Type.GetType("Mono.Runtime") != null; + } + public static Point GetSnapped(Point Location) { int x = (Location.X / NB.GridSize) * NB.GridSize;