MJW Posted September 23, 2016 Share Posted September 23, 2016 In looking more closely at the PluginSupportInfo properties, I'm a little confused. In one of my plugins it is: [assembly: AssemblyTitle("HsvEraser Plugin for Paint.NET")] [assembly: AssemblyDescription("Erase pixels of selected HSV value.")] [assembly: AssemblyConfiguration("hsv erase")] [assembly: AssemblyCompany("MJW")] [assembly: AssemblyProduct("HsvEraser")] [assembly: AssemblyCopyright("Copyright © MJW")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: AssemblyVersion("1.0.*")] namespace HsvEraserEffect { public class PluginSupportInfo : IPluginSupportInfo { public string Author { get { return ((AssemblyCopyrightAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright; } } public string Copyright { get { return ((AssemblyDescriptionAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description; } } public string DisplayName { get { return ((AssemblyProductAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]).Product; } } public Version Version { get { return base.GetType().Assembly.GetName().Version; } } public Uri WebsiteUri { get { return new Uri("http://www.getpaint.net/redirect/plugins.html"); } } } I've looked at other plugins, such as BoltBait's HueSatPlus, and it seems to be the same. I find it odd that Author returns the Copyright attribute, and Copyright returns the Description attribute. I'd expect Author to return AssemblyCompany, and Copyright to return AssemblyCopyright. Also, as an added bonus comment, I assume there's no appropriate Assembly property for the URI, but it'd be nice if there were. (I don't know much about the Assembly attributes -- to say the least.) Quote Link to comment Share on other sites More sharing options...
BoltBait Posted September 23, 2016 Share Posted September 23, 2016 I designed these to return the information based on how paint.net 4.0 shows the tooltip when you hover over a plugin entry in the Effects menu instead of the proper definitions. 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
MJW Posted September 23, 2016 Author Share Posted September 23, 2016 Thanks, BoltBait. I'll leave them as they are then. I'd never bothered looking at he stuff before, and it seemed slightly weird. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 23, 2016 Share Posted September 23, 2016 Here's how I use these fields public class PluginSupportInfo : IPluginSupportInfo { public string Author { get { return "Your Name"; } } public string Copyright { get { return "© 2016 Your Name / Companyname"; } } public string DisplayName { get { return "The name of your plugin goes here"; } } public Version Version { get { return base.GetType().Assembly.GetName().Version; } } public Uri WebsiteUri { get { return new Uri("http://www.getpaint.net/redirect/plugins.html"); } } } If you have a website which supports your plugins, or a github repository, the URI can replace the standard forum URI. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
BoltBait Posted September 23, 2016 Share Posted September 23, 2016 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 23, 2016 Share Posted September 23, 2016 That makes sense. I don't have a company to put in there, and the description is more valuable info. I'm convinced! Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.