diff ServerMonitor/Helpers.cs @ 8:052aa62cb42a

Single instance. Add autorun option. Add icons. General enhancements.
author Brad Greco <brad@bgreco.net>
date Sat, 09 Mar 2019 20:14:03 -0500
parents b6fe203af9d5
children 68d7834dc28e
line wrap: on
line diff
--- a/ServerMonitor/Helpers.cs	Fri Mar 01 21:39:22 2019 -0500
+++ b/ServerMonitor/Helpers.cs	Sat Mar 09 20:14:03 2019 -0500
@@ -44,7 +44,7 @@
             return type.GetCustomAttributes(typeof(T), false).SingleOrDefault() as T;
         }
 
-        public static Image GetIcon(this CheckStatus checkStatus)
+        public static Image GetImage(this CheckStatus checkStatus)
         {
             switch (checkStatus)
             {
@@ -58,6 +58,17 @@
             }
         }
 
+        public static Icon GetIcon(this CheckStatus checkStatus)
+        {
+            switch (checkStatus)
+            {
+                case CheckStatus.Error: return Resources.icon_error;
+                case CheckStatus.Warning: return Resources.icon_warning;
+                case CheckStatus.Information: return Resources.icon_info;
+                default: return Resources.icon;
+            }
+        }
+
         public static bool In(this Enum value, params Enum[] values) {
             return values.Contains(value);
         }