Andrew D Posted November 22, 2007 Share Posted November 22, 2007 Well, to be honest, I'm just wondering how you can use tools in the PaintDotNet.Resources file in VS C# Express 2008. I can use the normal design tools pretty well, but when I'd want to add something which aren't in the usual toolbox, how can you use them, such as the angle slider, and also the other tools which you can use? Or, of course, I'm talking a load of nonsense Quote Link to comment Share on other sites More sharing options...
MadJik Posted November 22, 2007 Share Posted November 22, 2007 (with my words, forgive my english) You use the code to describe the controls you need. You don't use the usual form... there is +/- advantage... + faster to code easier to code really easy to modify - controls are limited in choice (no radio button for instance) controls are listed from up to bottom, you can't place them left or right... highly depending on the program (paint.net) so an update (sooner or later) could disable the plugin... no preview in the form editor... BTW, as now I've done/changed some of my plugin, I think I will use this way for most of them... It's really make me focus on the code of the effect instead of boringly create the UI and every controls rules... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Andrew D Posted November 23, 2007 Author Share Posted November 23, 2007 (with my words, forgive my english)You use the code to describe the controls you need. You don't use the usual form... there is +/- advantage... + faster to code easier to code really easy to modify - controls are limited in choice (no radio button for instance) controls are listed from up to bottom, you can't place them left or right... highly depending on the program (paint.net) so an update (sooner or later) could disable the plugin... no preview in the form editor... BTW, as now I've done/changed some of my plugin, I think I will use this way for most of them... It's really make me focus on the code of the effect instead of boringly create the UI and every controls rules... So, which .dll extention would I need to browse through the Object Manager to see the controls you'd want to use? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 23, 2007 Share Posted November 23, 2007 I really recommend just using the IndirectUI stuff in 3.20. Otherwise you'll be spending years inside Visual Studio trying to write your plugin's UI. Use IndirectUI and tell me what features you'd like in the next release. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Andrew D Posted November 23, 2007 Author Share Posted November 23, 2007 I really recommend just using the IndirectUI stuff in 3.20. Otherwise you'll be spending years inside Visual Studio trying to write your plugin's UI. Use IndirectUI and tell me what features you'd like in the next release. I'll browse the IndirectUI in the Object Browser now..... EDIT: I still don't really get it. How exactly do you use the controls? I see the same commands repeated over and over and over again. I'll just check the blog for when you showed it when making the "Mandelbrot Fractal" plug-in.... protected override PropertyCollection CreatePropertyCollection() { List props = new List(); props.Add(new Int32Property(PropertyNames.Factor, 1, 1, 10)); props.Add(new DoubleProperty(PropertyNames.Zoom, 10, 0, 100)); props.Add(new AngleProperty(PropertyNames.Angle)); props.Add(new DoubleVectorProperty( PropertyNames.Offset, Pair.MakePair(0.0, 0.0), Pair.MakePair(-1.0, -1.0), Pair.MakePair(1.0, 1.0))); props.Add(new Int32Property(PropertyNames.Quality, 2, 1, 4)); props.Add(new BooleanProperty(PropertyNames.InvertColors)); return new PropertyCollection(props, new PropertyCollectionRule[0]); I'm hoping that's an example of using the IndirectUI system, right? EDIT2: I have a request aswell, allow us to have more than one column for designing UI's using it? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 23, 2007 Share Posted November 23, 2007 I have a request aswell, allow us to have more than one column for designing UI's using it? Yes, that's an example of a request for a future version This and more is planned, I just had to keep the scope of the system small enough for the first release in order to release something soon. Small and stable beats large and buggy any day. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Andrew D Posted November 23, 2007 Author Share Posted November 23, 2007 I have a request aswell, allow us to have more than one column for designing UI's using it? Yes, that's an example of a request for a future version This and more is planned, I just had to keep the scope of the system small enough for the first release in order to release something soon. Small and stable beats large and buggy any day. Ah, I see. So, in the code sample I put in my post, is that the way you would use the IndirectUI system? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 24, 2007 Share Posted November 24, 2007 Mostly. It's changed a little though, mostly in the sense that I've renamed a few things. Derive from PropertyBasedEffect, then override OnCreatePropertyCollection() and OnRender(). To customize the UI, override OnCreateConfigUI() where I recommend you first call CreateDefaultConfigUI() (that's all that the base implementation of OnCreateConfigUI() does). Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
MadJik Posted November 24, 2007 Share Posted November 24, 2007 As a template for actual version of PDN 3.20B1, you could use this source: Read this as well: viewtopic.php?p=116505#p116505 Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal 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.