Dependencies
Required assemblies you will have to add as dependencies for the project:
- TrottleLauncher.exe
- ThrottleLibrary.dll
Steps
- Create a dinamic library NET.CF project (y use C# but any .NET lang will be ok)
- Create a class (or reuse the one created automatically by the wizzard)
- The class has to extend from BackgroundExtension
- Create a Constructor that receives System.Xml.XmlNode and ThrottleLibrary.util.PageContainerWrapper. Do not perform any initializations here other than the Dock.
1 |
public Bubbles(System.Xml.XmlNode node, PageContainerWrapper pcw) |
- Override the Init function to perform initalizations:
1 |
public override void Init(ThrottleLibrary.Util.ListenerPool lp) |
- Implement the events.
Loading graphic resources (images).
- To load graphics resources it's strongly recomended to use the ThrottleLibrary.Util.Images.ImageFactory class by the GetInstance method passing the full path.
- ImageFactory will return a ThrottleImage class. You can use that class to render graphics independently of it's type or the rendering engine.
- Remember to call Dispose on the ThrottleImage instance if you don't plan to use it anymore.
Using ThrottleLauncher native elements
- You can also use the Classes at ThrottleLibrary.model.inst to add persistent graphic entries to your background. For example, if during the initialization you perform the following:
1 |
ThrottleLibrary.model.inst.Text text = new ThrottleLibrary.model.inst.Text(); |
- You will get the phrase "Hello World" inside your live background.
- You can move it arround by using the text.Move(X,Y) method or by setting X,Y properties.
- Check the Lights background sample for more info on this.
The manifest file
The last step is creating a manifest.xml file following this syntax:
1 |
<?xml version="1.0" encoding="utf-8"?> |
You can add as much plugin items as you wish.
Deployment
- Create a folder inside the plugins directory of the ThrottleLauncher instalation path. (i.e. \ProgramFiles\ThrottleLaunche\Plugins\MyPlugin\)
- Copy the dll, the manifest.xml and the resources inside that folder.
- Now open the config of a theme that supports Live backgorunds and you should see your plugin on the list :).
Important info
- The painting events (TLPaintEventArgs) contains an offset you will have to take into account in order to draw correcly aligned coordinates.
- The ITLGraphics interface provides means of accesing the drawing engine independently of the device. Check the methods it provides. You can obtain that object in the TLPaintEventArgs.G property in the paint event.
- ThrottleLauncher is not a development API but a full product so you may find a lot of methods and classes that actually is better not to mess with ;).
Full samples
Check the attached VS2008 project that contains also the Snakes sample.



Twitter
Digg
Del.icio.us
StumbleUpon
Slashdot
Yahoo
Googlize this
Blinklist
Facebook
Wikio















