C# Class IrcShark.Extensions.Terminal.ConsoleTerminal.Handler

The Handler struct is used to save a special key and its handlermethod.
Mostrar archivo Open project: hapm/IrcShark

Public Properties

Property Type Description
CKI System.ConsoleKeyInfo
KeyHandler KeyHandler

Public Methods

Method Description
Alt ( char c, ConsoleKey k, KeyHandler h ) : Handler

Creates a Handler, that reacts on a key pressed in combination with the alt key.

Control ( char c, KeyHandler h ) : Handler

Creates a Handler, that reacts on a key pressed in combination with the control key.

Handler ( ConsoleKey key, KeyHandler h ) : System

Initializes a new instance of the Handler struct.

Handler ( ConsoleKeyInfo cki, KeyHandler h ) : System

Initializes a new instance of the Handler struct.

Handler ( char c, KeyHandler h ) : System

Initializes a new instance of the Handler struct.

Method Details

Alt() public static method

Creates a Handler, that reacts on a key pressed in combination with the alt key.
public static Alt ( char c, ConsoleKey k, KeyHandler h ) : Handler
c char The character of the key to look for.
k ConsoleKey
h KeyHandler The handler to call.
return Handler

Control() public static method

Creates a Handler, that reacts on a key pressed in combination with the control key.
public static Control ( char c, KeyHandler h ) : Handler
c char The character of the key to look for.
h KeyHandler The handler to call.
return Handler

Handler() public method

Initializes a new instance of the Handler struct.
public Handler ( ConsoleKey key, KeyHandler h ) : System
key ConsoleKey The key to look for.
h KeyHandler The handler to call.
return System

Handler() public method

Initializes a new instance of the Handler struct.
public Handler ( ConsoleKeyInfo cki, KeyHandler h ) : System
cki System.ConsoleKeyInfo The key combination to look for.
h KeyHandler The handler to call.
return System

Handler() public method

Initializes a new instance of the Handler struct.
public Handler ( char c, KeyHandler h ) : System
c char The character of the key to look for.
h KeyHandler The handler to call.
return System

Property Details

CKI public_oe property

Saves the key, that is watched.
public ConsoleKeyInfo,System CKI
return System.ConsoleKeyInfo

KeyHandler public_oe property

Saves the handler that is called when the key is pressed.
public KeyHandler KeyHandler
return KeyHandler