Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Newbie question - How to create a custom plugin using C#

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
dotnetlcdhelp
Posts: 3
Joined: February 26th, 2007, 6:20 pm

Newbie question - How to create a custom plugin using C#

Post by dotnetlcdhelp »

Hi, I have an application written in c sharp and need at certain times to output some info to a LCD. Is this possible using LCDSmartie and by writing a plugin? How do I call my code to write the text out from within my application?

Are there any c sharp examples? I am using .net 2.0

Thanks in advance.

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Re: Newbie question

Post by limbo »

dotnetlcdhelp wrote:Hi, I have an application written in c sharp and need at certain times to output some info to a LCD. Is this possible using LCDSmartie and by writing a plugin? How do I call my code to write the text out from within my application?

Are there any c sharp examples? I am using .net 2.0

Thanks in advance.
Since you're an experienced to .net (visual studio) this is the most simplest thing!

C# plugins are supported by LCD Smartie:
http://lcdsmartie.sourceforge.net/plugins.html
http://sourceforge.net/project/download ... plugin.zip
If you need extra help feel free to add a post here.

dotnetlcdhelp
Posts: 3
Joined: February 26th, 2007, 6:20 pm

Post by dotnetlcdhelp »

Thanks for the prompt reply.

Is there any documentation on how and what I need to put into the "actions" tab within LCDSmartie in order for my code to get called?

and how would I specifically make a call from my application to produce a message on the LCD display?

Thanks

dotnetlcdhelp
Posts: 3
Joined: February 26th, 2007, 6:20 pm

Post by dotnetlcdhelp »

I understand I can build a c# plugin, add it to the plugins directory and add this to a line in LCDSmartie:

$dll(csharpplugin.dll,1,"hello","paul")

but how can I trigger a message to be displayed from my custom windows application written in c#?

I basically want to query a database and display a string returned from the database.

Thanks

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

From my point of view there are several ways to achieve this.
One of them is to create a plugin like my warnifplugin. :D

In this case you can code your plugin to check if there is a value available from your application and dislpay it otherwise a parameter on plugin should me used to return any other LCD Smartie data (e.g. computer name)


Another way is to make this plugin to return an integer (or any other type of value) in case of data available and put this function to actions pane of LCD Smartie.
In this case you can use one function to display the data and another function to check and enable-disable the screen. This is quite good solution in order to enable the screen only whe you really need it.

Post Reply