diff options
Diffstat (limited to 'ShiftOS.WinForms/Program.cs')
| -rw-r--r-- | ShiftOS.WinForms/Program.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Program.cs b/ShiftOS.WinForms/Program.cs index 0ed5b02..06f495f 100644 --- a/ShiftOS.WinForms/Program.cs +++ b/ShiftOS.WinForms/Program.cs @@ -33,6 +33,7 @@ using Newtonsoft.Json; using static ShiftOS.Objects.ShiftFS.Utils; using ShiftOS.WinForms.Applications; using ShiftOS.WinForms.Tools; +using System.Reflection; namespace ShiftOS.WinForms { @@ -71,6 +72,26 @@ namespace ShiftOS.WinForms } } + internal class ShiftOSIconProvider : IIconProber + { + public Image GetIcon(DefaultIconAttribute attr) + { + + var res = typeof(Properties.Resources); + foreach(var prop in res.GetProperties(BindingFlags.NonPublic | BindingFlags.Static)) + { + if(prop.PropertyType.BaseType == typeof(Image)) + { + if(prop.Name == attr.ID) + { + return prop.GetValue(null) as Image; + } + } + } + return new Bitmap(16, 16); + } + } + internal class WinformsShiftoriumProvider : IShiftoriumProvider { public List<ShiftoriumUpgrade> GetDefaults() |
