| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: Apr 2006 Location: London
Posts: 320
Thanks: 2
Thanked 4 Times in 4 Posts
Country: | Could someone give me the quick code layout for a process plugin (just copy a paste the start page if you are developing) I have looked at the WIKI but it only shows the code for developing a plugin with GUI. Thanks.
__________________ Ben Barron's Online Web Design & Applications Portfolio |
| | |
| | #2 (permalink) |
| Portal Member Join Date: Apr 2006 Location: London
Posts: 320
Thanks: 2
Thanked 4 Times in 4 Posts
Country: | Specifically, the bit i am after, is which method actually starts the plugin?
__________________ Ben Barron's Online Web Design & Applications Portfolio |
| | |
| | #4 (permalink) |
| Portal Member Join Date: Apr 2006 Location: London
Posts: 320
Thanks: 2
Thanked 4 Times in 4 Posts
Country: | Thanks but it was the Start() and Stop() methods i was after - turns out i wasn't inheriting everything i needed. What you mentioned was already in the wiki i read.
__________________ Ben Barron's Online Web Design & Applications Portfolio |
| | |
| | #5 (permalink) |
| Portal Member Join Date: Apr 2006 Location: France
Posts: 161
Thanks: 0
Thanked 2 Times in 2 Posts
Country: | Sorry, I didn't read this part of wiki. ![]() I could put code here but, I would be too long. Better is to look in MP code, in some process plugins, to see how it works or, taking a look in some MP plugins which already use it. here : SourceForge.net Repository - [mp-plugins] Index of /trunk/plugins Edit : it's a good day, today. ![]() Here is a sample code : Code: using System.Threading;
bool _run;
Thread _thread;
public void Start()
{
_run = true;
_thread = new Thread(new ThreadStart(Run));
_thread.IsBackground = true;
_thread.Name = "plugin thread";
_thread.Priority = ThreadPriority.Lowest;
_thread.Start();
}
public void Stop()
{
_run = false;
}
private void Run()
{
while (_run)
{
// your treatment
}
}
Last edited by framug; 2008-05-30 at 13:37. Reason: add source code |
| | |
![]() |
| Bookmarks |
| Tags |
| plugin, process |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WindowsMediaPlayerOSD process plugin. | nshvydky | Plugins | 18 | 2008-07-22 13:47 |
| FileSystemWatcher in a process plugin? | MoPhat | General Development (no feature request here!) | 2 | 2008-05-31 20:37 |
| Window plugin showing up as process | Hesse | Plugins | 8 | 2006-08-31 04:34 |
| WinLIRC process plugin will not load with RC3 | z3gator | Codecs, External Players | 4 | 2006-04-01 03:44 |
| WindowsProgressDialog in process plugin | STSC | Plugins | 3 | 2005-02-28 14:59 |