With the closing of the LCDStudio forums (at least for now), a lot of valuable information has been lost in the void, including the DataPlugin SDK Quick start Guide, and the WidgetPlugin Quickstart Guide, both written byt Ray himself.
Without these guides, it would be difficult for users to develop their own plugins, and widgets, so we have recovered the guides for your viewing pleasure.
DataPlugin SDK Quickstart
1) Open up vs.net and click New Project
2) Choose the language of your choice and create a new Class library project and call it MyPlugin
3) Add a reference to CoreInterfaces.dll located in your lcdstudio folder.
4) Paste the following code into class1.cs (C# is used but this code is that basic it shoudn't be hard to convert to VB.Net)
Code: Select all
using System;
using LcdStudio.CoreInterfaces;
namespace MyPlugin
{
public class Plugin :
AbstractDataPlugin
{
public override void RegisterData(IDataService ds)
{
ds.RegisterVariable(Group,"MyPlugin.HelloWorld","MyPlugin\\\\Hello world");
ds.RegisterVariable(Group,"MyPlugin.TimeMsg","MyPlugin\\\\Time");
this.UpdateInterval = 10000; //Update every 10000ms (10 sec)
}
public override void UpdateData(IDataService ds)
{
ds.SetValue("MyPlugin.HelloWorld","Hello world");
ds.SetValue("MyPlugin.TimeMsg",string.Format("The time is {0} ",DateTime.Now.ToShortTimeString()));
}
}
}
6) Create a file in your LcdStudio folder called MyPlugin.Plugin with the following lines
Code: Select all
<?xml version="1.0"; encoding="utf-8" ?>
<Plugins>;
<Plugin ID="My Plugin" Type="MyPlugin.Plugin, MyPlugin" Visible="Yes" >
<Depends ID="DataService" />
<Depends ID="DispatchService" />
</Plugin>
</Plugins>
Can't make it any easier to extend LcdStudio.
If you guys have questions or need help feel free to ask.
You'll find a how-to guide to creating WidgetPlugin SDK's here.
Cheers,
Daniel