Information Displays – Part 2

Time to code … I suspect it wont take too long to get something up and running. For this I will use Visual Studio 2013 Express and code in C#, that way anyone can grab the code from Github and use it for themselves.

Get The Screen Up

LCD screens come in all sorts of resolutions and sizes, so to make this useful we need to able support different configurations. For development and testing we probably want it to run in window mode with smaller fonts, if you have a multi-screen setup maybe you want to to run full screen on your second screen, for installation full screen with larger fonts sounds good, portrait mode maybe?

I chose to have the configuration in an XML file so its relatively easy to edit and parse.

I added the ability to specify the background image at this point. Nothing particularly tricky so far but it loads and re-sizes the form,  and goes full screen on the required screen if needed. 

Adding Some Labels

We could just add Label controls to the Form inside VS2013 but that doesn’t really allow us to change the layout for our different setups. The simplest way to add text to the screen will be to define labels in the XML – It will be slightly painful to do x, y, width and height maths in your head but it will do for now. Hint: Someone could write an WYSIWYG editor I guess or something else?

Initial Label Types

  • static – Just static text – well duh
  • time – Using a timer update the label and print the current time in using the given format.
  • file – Update the label with the contents of a file with configurable refresh rate.

Check out the screen shot so far in window mode. The temperature, light and voltage data is read from files created by another application.

Next up well add code to connect to the server, and display the currently active events in a configurable “list like” view.

 Display Part 1

Configuration Part 1


Leave a Reply