C# Class MBC.App.Terminal.Modules.TerminalModule

The base class for a TerminalModule. Used for providing different states of the terminal application. Provides various methods to display information in a TerminalModule buffer. Direct output via the Console class is not to be used.
Mostra file Open project: aiclub/Mohawk_Battleship Class Usage Examples

Public Methods

Method Description
Align ( ) : void
AlignToCoord ( int x, int y ) : bool
AlignToLine ( int line ) : bool
InputEntered ( string input ) : void
IsLayoutSelected ( ControlLayout layout ) : bool
KeyPressed ( ConsoleKeyInfo key ) : bool
NewLine ( int n = 1 ) : void
NextLayout ( ) : void
PreviousLayout ( ) : void
RefreshDisplay ( int x, int y, int w, int h ) : void
WriteCenteredText ( string text ) : void
WriteCharRepeat ( char c, int n ) : void
WriteChars ( char c ) : void
WriteText ( string txt ) : void

Protected Methods

Method Description
AddControlLayout ( ControlLayout ctrl ) : void
Display ( ) : void
RemoveControlLayout ( ControlLayout ctrl ) : void

Method Details

AddControlLayout() protected method

protected AddControlLayout ( ControlLayout ctrl ) : void
ctrl MBC.App.Terminal.Layouts.ControlLayout
return void

Align() public method

public Align ( ) : void
return void

AlignToCoord() public method

public AlignToCoord ( int x, int y ) : bool
x int
y int
return bool

AlignToLine() public method

public AlignToLine ( int line ) : bool
line int
return bool

Display() protected abstract method

protected abstract Display ( ) : void
return void

InputEntered() public method

public InputEntered ( string input ) : void
input string
return void

IsLayoutSelected() public method

public IsLayoutSelected ( ControlLayout layout ) : bool
layout MBC.App.Terminal.Layouts.ControlLayout
return bool

KeyPressed() public method

public KeyPressed ( ConsoleKeyInfo key ) : bool
key System.ConsoleKeyInfo
return bool

NewLine() public method

public NewLine ( int n = 1 ) : void
n int
return void

NextLayout() public method

public NextLayout ( ) : void
return void

PreviousLayout() public method

public PreviousLayout ( ) : void
return void

RefreshDisplay() public method

public RefreshDisplay ( int x, int y, int w, int h ) : void
x int
y int
w int
h int
return void

RemoveControlLayout() protected method

protected RemoveControlLayout ( ControlLayout ctrl ) : void
ctrl MBC.App.Terminal.Layouts.ControlLayout
return void

WriteCenteredText() public method

public WriteCenteredText ( string text ) : void
text string
return void

WriteCharRepeat() public method

public WriteCharRepeat ( char c, int n ) : void
c char
n int
return void

WriteChars() public method

public WriteChars ( char c ) : void
c char
return void

WriteText() public method

public WriteText ( string txt ) : void
txt string
return void