C# Class dd.logilcd.LogiLcd

Inheritance: IDisposable
显示文件 Open project: TheSatoshiChiba/LogiLCD.net

Public Methods

Method Description
Dispose ( ) : void

Disposes the objects and also calls Shutdown().

Initialize ( string friendlyName, LCD_TYPE lcdType ) : bool

Initializes the LogiLcd system. You must call this function prior to any other function.

IsColorButtonPressed ( COLOR_BUTTON button ) : bool

Checks if a specific button of the Color LCD is pressed.

IsConnected ( LCD_TYPE lcdType ) : bool

Checks if a specific LCD_TYPE is connected to the system.

IsMonoButtonPressed ( MONO_BUTTON button ) : bool

Checks if a specific button of the Mono LCD is pressed.

LogiLcd ( ) : System

Creates a new instance of the LogiLCD interface class

SetColorBackground ( Bitmap bitmap ) : bool

Sets the Background of the Color LCD to a specific bitmap. The bitmap will be converted to a 320x240x32 image.

SetColorBackground ( byte data ) : bool

Sets the Background of the Color LCD to a specific byte array. The data needs to be a 320x240x32 Bitmap.

SetColorText ( COLOR_TEXT_LINE line, string text, int r = 255, int g = 255, int b = 255 ) : bool

Displays a speific line of text on the Color LCD.

SetColorTitle ( string text, int r = 255, int g = 255, int b = 255 ) : bool

Displays a title text on the Color LCD.

SetMonoBackground ( byte data ) : bool

Sets the Background of the Mono LCD to a specific byte array. The data needs to be a 160x43x8 Bitmap.

SetMonoText ( MONO_TEXT_LINE line, string text ) : bool

Displays a speific line of text on the Mono LCD.

Shutdown ( ) : void

Shuts down the LogiLCD System and frees all the resources.

Update ( ) : void

Updates the whole LCD Screen. You have to call this function every frame of your main loop, to keep the lcd updated.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes the objects and also calls Shutdown().

Method Details

Dispose() public method

Disposes the objects and also calls Shutdown().
public Dispose ( ) : void
return void

Dispose() protected method

Disposes the objects and also calls Shutdown().
protected Dispose ( bool disposing ) : void
disposing bool true if this method has been called by hand. false if not.
return void

Initialize() public method

Initializes the LogiLcd system. You must call this function prior to any other function.
public Initialize ( string friendlyName, LCD_TYPE lcdType ) : bool
friendlyName string the name of your applet, you can’t change it after initialization.
lcdType LCD_TYPE defines the type of your applet lcd target. Is has to e of type LCD_TYPE.
return bool

IsColorButtonPressed() public method

Checks if a specific button of the Color LCD is pressed.
public IsColorButtonPressed ( COLOR_BUTTON button ) : bool
button COLOR_BUTTON The button whe want to check. It has to be of type COLOR_BUTTON.
return bool

IsConnected() public method

Checks if a specific LCD_TYPE is connected to the system.
public IsConnected ( LCD_TYPE lcdType ) : bool
lcdType LCD_TYPE The LCD_TYPE for which we want to check the connection.
return bool

IsMonoButtonPressed() public method

Checks if a specific button of the Mono LCD is pressed.
public IsMonoButtonPressed ( MONO_BUTTON button ) : bool
button MONO_BUTTON The button whe want to check. It has to be of type MONO_BUTTON.
return bool

LogiLcd() public method

Creates a new instance of the LogiLCD interface class
public LogiLcd ( ) : System
return System

SetColorBackground() public method

Sets the Background of the Color LCD to a specific bitmap. The bitmap will be converted to a 320x240x32 image.
public SetColorBackground ( Bitmap bitmap ) : bool
bitmap System.Drawing.Bitmap The bitmap we want to use as background
return bool

SetColorBackground() public method

Sets the Background of the Color LCD to a specific byte array. The data needs to be a 320x240x32 Bitmap.
public SetColorBackground ( byte data ) : bool
data byte The 320x240x32 Bitmap data as array
return bool

SetColorText() public method

Displays a speific line of text on the Color LCD.
public SetColorText ( COLOR_TEXT_LINE line, string text, int r = 255, int g = 255, int b = 255 ) : bool
line COLOR_TEXT_LINE The line index where we want the text to show up. It has to be of Type COLOR_TEXT_LINE
text string The line of text we want to show on the screen
r int The Red color bit. Should be between 0 and 255.
g int The Green color bit. Should be between 0 and 255.
b int The Blue color bit. Should be between 0 and 255.
return bool

SetColorTitle() public method

Displays a title text on the Color LCD.
public SetColorTitle ( string text, int r = 255, int g = 255, int b = 255 ) : bool
text string The title text we want to show.
r int The Red color bit. Should be between 0 and 255.
g int The Green color bit. Should be between 0 and 255.
b int The Blue color bit. Should be between 0 and 255.
return bool

SetMonoBackground() public method

Sets the Background of the Mono LCD to a specific byte array. The data needs to be a 160x43x8 Bitmap.
public SetMonoBackground ( byte data ) : bool
data byte The 160x43x8 Bitmap data as array
return bool

SetMonoText() public method

Displays a speific line of text on the Mono LCD.
public SetMonoText ( MONO_TEXT_LINE line, string text ) : bool
line MONO_TEXT_LINE The line index where we want the text to show up. It has to be of Type MONO_TEXT_LINE
text string The line of text we want to show on the screen
return bool

Shutdown() public method

Shuts down the LogiLCD System and frees all the resources.
public Shutdown ( ) : void
return void

Update() public method

Updates the whole LCD Screen. You have to call this function every frame of your main loop, to keep the lcd updated.
public Update ( ) : void
return void