LcdConsole Class

Definition

This is a high-level interface to an LCD display. It supports automatic wrapping of text, automatic scrolling and code page mappings. This class is thread safe, however using Write from different threads may lead to unexpected results, since the order is not guaranteed.

public sealed class LcdConsole : IDisposable
type LcdConsole = class
    interface IDisposable
Public NotInheritable Class LcdConsole
Implements IDisposable
Inheritance
LcdConsole
Implements

Constructors

LcdConsole(ICharacterLcd, String, Boolean)

Creates a new instance of the LcdConsole class using the specified LCD low-level interface. This class automatically configures the low-level interface. Do not use the low-level interface at the same time.

Properties

BacklightOn

Enables or disables the backlight

CursorLeft

Position of the cursor, from left. Note: May be outside the bounds of the display.

CursorTop

Position of the cursor, from top Note: May be outside the bounds of the display.

DisplayOn

Enables or disables the display

LineFeedMode

Sets the Line Feed Mode. This defines what happens when writting past the end of the line/screen.

ScrollUpDelay

If this is larger than zero, an a wait is introduced each time the display wraps to the next line or scrolls up. Can be used to print long texts to the display, but keeping it readable.

Size

Size of the display

Methods

BlinkDisplay(Int32)

Blinks the display text (and the backlight, if available). Can be used to get user attention. Operation is synchronous.

BlinkDisplayAsync(Int32)

Blinks the display in the background

Clear()

Clears the screen and sets the cursor back to the start.

CreateEncoding(CultureInfo, String, Char, Int32, LcdCharacterEncodingFactory)

Creates an encoding that can be used for an LCD display. Typically, the returned value will be loaded using LoadEncoding(LcdCharacterEncoding).

CreateEncoding(CultureInfo, String, Char, Int32, LcdCharacterEncodingFactory)

Creates an encoding that can be used for an LCD display. Typically, the returned value will be loaded using LoadEncoding(LcdCharacterEncoding).

Dispose()

Disposes this instance.

LoadEncoding(Encoding)

Loads the specified encoding. This behaves as LoadEncoding(LcdCharacterEncoding) when the argument is of the dynamic type LcdCharacterEncoding, otherwise like an encding with no special characters.

LoadEncoding(LcdCharacterEncoding)

Loads the specified character encoding. This loads any custom characters from the encoding to the display.

LoadEncoding(LcdCharacterEncoding)

Loads the specified character encoding. This loads any custom characters from the encoding to the display.

ReplaceLine(Int32, String)

Replaces the text of the given line. This will overwrite the text in the given line, filling up with spaces, if needed. This will never wrap to the next line, and line feeds in the input string are not allowed.

ResetEncoding()

Resets the character encoding to hardware defaults (using simply the lower byte of a char).

SetCursorPosition(Int32, Int32)

Moves the cursor to an explicit column and row position. The position may be outside the bounds of the display. Any subsequent writes will then have no effect, unless LineFeedMode allows it or a newline character is written.

Write(String)

Write text to display.

WriteLine(String)

Writes the given text to the current position, then wraps to the next line.

Applies to