Paint.NET

Welcome to the Paint.NET forum!
It is currently Sun Nov 22, 2009 10:53 am

All times are UTC


Forum rules


Questions or problems with plugin installation? Click here.



Post new topic Reply to topic  [ 63 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Toli's Effects (v2.0.2, 20 Jan. 2008)
PostPosted: Tue Nov 13, 2007 9:54 pm 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
I decided to make a separate post about all my effects and make some changes in order to be able to easily maintain them.

The effects are:
1. Mirror / Rotate
2. Mirror / Rotate Menu
3. Engrave / Emboss
4. Smooth

The links are for you to read the discussion about these effects, if you are interested.
However, you cannot download the effects from there any more. The only place from where you can download the effects is from below:
Attachment:
ToliEffects_v202.zip [76.08 KiB]
Downloaded 11670 times

The zip file contains:
1. IniFile.dll
This is a common required library, used by all my effects, which must be copied in the Effects folder if you want to use any or all the effects.
This library provides to my effects localization support (the effect in your language) and the ability to "remember" on-screen position and the options you selected.
Effect programmers, feel free to use IniFile.dll (ask me for technical support). Just don't credit yourselves for coding it.

2. MirrorRotate.dll
The Mirror / Rotate Effect

3. MirrorRotateMenu.dll
All 4 mirrors and 3 rotates from the previous plugin, now as MenuItems in a Mirror / Rotate Submenu
You should install either MirrorRotate.dll or MirrorRotateMenu.dll

4. EngraveEmboss.dll
The Engrave / Emboss Effect

5. Smooth.dll
The Smooth Effect

6. MirrorRotate.ini
7. MirrorRotateMenu.ini
8. EngraveEmboss.ini
9. Smooth.ini
Language Ini Files used by my effects for localization.
You should copy them along with the corresponding effects to the Effects folder.
(this folder should usually be: "C:\Program Files\Paint.NET\Effects", without the quotes)

10. License.txt
GNU Public License

If someone would like a Setup (an Installer for the plugins), here it is:
Attachment:
ToliEffectsSetup_v202.zip [218.89 KiB]
Downloaded 1961 times

And this zip file contains the C# sources. It is for effect programmers only.
Attachment:
ToliEffectsSource_v202.zip [114.46 KiB]
Downloaded 515 times

Enjoy!
Toli Cuturicu


Last edited by Toli on Sat Jan 19, 2008 11:39 pm, edited 5 times in total.

Top
 Profile  
 
 Post subject: Re: Toli's Effects
PostPosted: Tue Nov 13, 2007 10:04 pm 
Offline
User avatar

Joined: Fri Sep 02, 2005 4:44 pm
Posts: 2835
Location: Lyon, France
Quote:
The only place from where you can download the effects is the link below:

*tearful absence of any download link*


Top
 Profile  
 
 Post subject: Re: Toli's Effects
PostPosted: Tue Nov 13, 2007 10:10 pm 
Offline
2008 "GE Award for Plugin Brilliance" Winner
User avatar

Joined: Tue Apr 17, 2007 10:51 pm
Posts: 7288
Location: Colorado
There's no link there... Also, you should probably keep your source code and compiled DLLs in separate ZIPs to avoid confusion.

_________________
I'm Bike-Stick-Man and I approve this message I am right, so shut up.


Top
 Profile  
 
 Post subject: Re: Toli's Effects
PostPosted: Tue Nov 13, 2007 10:14 pm 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
Done.


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Tue Nov 13, 2007 10:46 pm 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
Note to effect programmers:
To use my IniFile.dll, you should:
1. In your project, add a refference to IniFile.dll
2. Add a using Toli; directive
3. In your class which inherits PaintDotNet.Effects.Effect, instantiate the class IniFile
ex: public static IniFile Ini = new IniFile();
4. In the Effect Constructor, instead of the Effect English name, put: Ini.PluginName
5. In your EffectConfigDialog use the same IniFile created before:
ex: private IniFile Ini = YourEffect.Ini;
6. Use it to retrieve localized Control.Text:
ex: this.Ini.GetResourceString(this.YourControl);
7. Use it to retrieve other strings:
ex: string YourString = this.Ini.GetResourceString(YourStringKey, YourStringDefault);
8. Use it to retrieve integers:
ex: int YourInteger = this.Ini.GetResourceInteger(YourIntegerKey, YourIntegerDefault);
9. Make the Form remember its Location:
9.1. Put in Form_Load: this.Ini.ReadFormLocation(this);
9.2. Put in Form_FormClosing: this.Ini.WriteFormLocation(this);
10. Make the Form remember its Size:
10.1. Put in Form_Load: this.Ini.ReadFormSize(this);
10.2. Put in Form_FormClosing: this.Ini.WriteFormSize(this);
... and so on.

Your initial Ini File should look like this:
YourEffect.ini
[Encoding]
CodePage=Your CodePage

[en]
PluginName=Your Plugin Name
YourControl=Your Control Text
...

[fr]
PluginName=Votre Plugin Nom
YourControl=Votre Control Texte
...

[de]
...

[and so on]
...


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Tue Nov 13, 2007 11:03 pm 
Offline
Paint.NET Lead Developer
User avatar

Joined: Tue Jul 19, 2005 6:22 pm
Posts: 8878
Location: Kirkland, WA
Saving preferences in a sub-directory of Program Files is a very bad thing to do. That won't work in any non-Administrator account, such as Standard User in XP, or in Vista at all.

_________________
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html
Paint.NET Search Engine: http://searchpaint.net

Image


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Tue Nov 13, 2007 11:06 pm 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
1. That's right, but if the user doesn't have permission to write there, how on Earth did he put the *.dll there in the first place?
2. Ok, then. Where should I put the Ini Files?


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Tue Nov 13, 2007 11:24 pm 
Offline
Paint.NET Lead Developer
User avatar

Joined: Tue Jul 19, 2005 6:22 pm
Posts: 8878
Location: Kirkland, WA
It doesn't matter how the file got there in the first place. The permissions you have when you place the file could be radically different than when you access it. Or it could be a completely different user, etc.

Place it somewhere in AppData, like in Environment.GetFolderPath(ApplicationData). Usually that's C:/Documents and Settings/username/Application Data, or C:/Users/username/AppData/Roaming. Localization should definitely be separate from per-user data. I have no idea why you're implementing INI stuff when the ResourceManager class is just fine.

_________________
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html
Paint.NET Search Engine: http://searchpaint.net

Image


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Tue Nov 13, 2007 11:52 pm 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
Because I don't know how to use ResourceManager (I can learn, though) and I know how to use Ini Files.
And I cannot write my own strings in Paint.NET *.resources files. So, what else can I do?
Anyway, I read for example OK and Cancel from Resources. But what about my own strings?


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Wed Nov 14, 2007 12:18 am 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
I added a Setup for the plugins in the first post.
I don't want regular computer users to complain like "But how do I install the plugins?! :-("


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Wed Nov 14, 2007 12:23 am 
Offline
Paint.NET Lead Developer
User avatar

Joined: Tue Jul 19, 2005 6:22 pm
Posts: 8878
Location: Kirkland, WA
Not knowing something really isn't an excuse, like you said you can learn it just fine. Do not read strings from PdnResources. It is not meant for use by plugins, and will be removed in a future version. And then your plugins will break.

_________________
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html
Paint.NET Search Engine: http://searchpaint.net

Image


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Wed Nov 14, 2007 12:36 am 
Offline
2008 "GE Award for Plugin Brilliance" Winner
User avatar

Joined: Tue Apr 17, 2007 10:51 pm
Posts: 7288
Location: Colorado
Considering there are only 3 plugins in there, and the installer is only 355KB, it's ridiculously slow... Also, if you're gonna go with an installer, you should provide checkboxes so users can choose which plugins they want.

_________________
I'm Bike-Stick-Man and I approve this message I am right, so shut up.


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Wed Nov 14, 2007 12:38 am 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
Ok.
But... how can I know which of your public classes can I count on and which should I just ignore?
Only what is in PaintDotNet.Effects and PaintDotNet.Core?


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Wed Nov 14, 2007 12:41 am 
Offline

Joined: Mon Nov 05, 2007 7:33 pm
Posts: 94
Location: Romania
To: pyrochild
It certainly is slow. Blame Microsoft and Windows Installer for this!
I can add checkboxes and I probably will.
However, you can download ToliEffects_v200.zip, which has no setup, only the dlls to choose from.


Top
 Profile  
 
 Post subject: Re: Toli's Effects (v2.0.0, 14 Nov. 2007)
PostPosted: Wed Nov 14, 2007 12:43 am 
Offline
2008 "GE Award for Plugin Brilliance" Winner
User avatar

Joined: Tue Apr 17, 2007 10:51 pm
Posts: 7288
Location: Colorado
Toli wrote:
However, you can download ToliEffects_v200.zip, which has no setup, only the dlls to choose from.

That defeats the purpose of having an installer in the first place, doesn't it? ;)

_________________
I'm Bike-Stick-Man and I approve this message I am right, so shut up.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 63 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: georgian, Yahoo [Bot] and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosted by Forumer & phpBB

Get your Forumer™ today!

Adding a forum to your website is a great way to get return visitors.

» Get your own Free Forum!

Terms of Use

Privacy Policy

Report Abuse

Copyright © 2003-2009 Forumer. All Rights Reserved. | Copyright © paint.NET