private static void GetPluginDescription(Type t, PluginBaseAttribute attr, out string name, out BaseBitmap bmp) { name = attr.Name; if (string.IsNullOrEmpty(name)) { name = t.Name; } // Falback icon String iconFile = null; if (!string.IsNullOrEmpty(attr.IconFile)) { iconFile = Path.Combine(Path.GetDirectoryName(t.Assembly.Location), "res", attr.IconFile); if (!File.Exists(iconFile)) { iconFile = null; } } if (string.IsNullOrEmpty(iconFile)) { iconFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "res", "CSharp.tif"); } bmp = BaseBitmap.AutoBitmap(iconFile); }
private static void GetPluginDescription(Type t, PluginBaseAttribute attr, out string name, out BaseBitmap bmp) { name = attr.Name; if (string.IsNullOrEmpty(name)) name = t.Name; // Falback icon String iconFile = null; if (!string.IsNullOrEmpty(attr.IconFile)) { iconFile = Path.Combine(Path.GetDirectoryName(t.Assembly.Location), "res", attr.IconFile); if (!File.Exists(iconFile)) iconFile = null; } if (string.IsNullOrEmpty(iconFile)) iconFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "res", "CSharp.tif"); bmp = BaseBitmap.AutoBitmap(iconFile); }