using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LcdWriter.SDK;
using System.IO.Ports;
namespace netduinolcd
{
public interface ILcdWriter : IDisposable
{
void Clear();
void Init();
void Render();
void RenderString(byte row, string buffer);
void ReviseString(int index, string buffer);
void SetString(int index, string buffer, bool scroll, string sep, long rate, int repeat);
void SetIcons(LcdIconCollection icons);
int GetColumns();
int GetRows();
void Standby();
}
public abstract class netduinowriter : ILcdWriter
{
private string[ rowText = new string[2];
private SerialPort serialport;
public void Clear()
{
//Clear the display
rowText[0] = "";
rowText[1] = "";
Render();
}
public void Init()
{
//Initialize the serial port
//Initialize display
}
public void Render()
{
//Send strings to the display
}
public void RenderString(byte row, string buffer)
{
/* For row 0 = top, 1 = bottom
* buffer is what we want to write to that row.
*/
rowText[row] = buffer;
Render();
}
public void ReviseString(int index, string buffer)
{
//What does this do?
}
public void SetString(int index, string buffer, bool scrooll, string sep, long rate, int repeat)
{
//And what are those variables?
}
public void SetIcons(LcdIconCollection icons)
{
//And this?
}
public int GetColumns()
{
//Return the number of columns on the display?
return 16;
}
public int GetRows()
{
//Return the number of rows on the display?
return 2;
}
public void Standby()
{
//Clear the screen, turn off the backlight
}
public void Dispose()
{
Standby();
//close the serial port
this.Dispose();
}
}
}
Any help would be great!