C# Class SadConsole.Consoles.Window

Inheritance: ControlsConsole
Mostra file Open project: Thraka/SadConsole Class Usage Examples

Private Properties

Property Type Description
AfterDeserialized void
ResetBox void

Public Methods

Method Description
Center ( ) : void

Centers the window according to the SadConsole.Engine.Device.Viewport size.

Hide ( ) : void

Hides the window.

Message ( ColoredString message, string closeButtonText, System.Action closedCallback = null ) : void

Displays a dialog to the user with a specific message.

Message ( string message, string closeButtonText, System.Action closedCallback = null ) : void

Displays a dialog to the user with a specific message.

ProcessKeyboard ( Input info ) : bool

Processes the keyboard looking for the ESC key press to close the console, if required. Otherwise the base ControlsConsole will process the keyboard.

ProcessMouse ( Input info ) : bool

Processes the mouse. If allowed, will move the console around with the mouse.

Prompt ( ColoredString message, string yesPrompt, string noPrompt, Action resultCallback ) : void

Shows a window prompt with two buttons for the user to click.

Prompt ( string message, string yesPrompt, string noPrompt, Action resultCallback ) : void

Shows a window prompt with two buttons for the user to click.

Redraw ( ) : void

Redraws the border and title of the window.

Render ( ) : void
Show ( ) : void

Displays this window using the modal value of the ModalIsDefault property.

Show ( bool modal ) : void

Displays this window.

Window ( int width, int height ) : System

Protected Methods

Method Description
OnVisibleChanged ( ) : void

Private Methods

Method Description
AfterDeserialized ( StreamingContext context ) : void
ResetBox ( ) : void

Method Details

Center() public method

Centers the window according to the SadConsole.Engine.Device.Viewport size.
public Center ( ) : void
return void

Hide() public method

Hides the window.
public Hide ( ) : void
return void

Message() public static method

Displays a dialog to the user with a specific message.
public static Message ( ColoredString message, string closeButtonText, System.Action closedCallback = null ) : void
message ColoredString The message. (background color is ignored)
closeButtonText string The text of the dialog's close button.
closedCallback System.Action A callback indicating the message was dismissed.
return void

Message() public static method

Displays a dialog to the user with a specific message.
public static Message ( string message, string closeButtonText, System.Action closedCallback = null ) : void
message string The message.
closeButtonText string The text of the dialog's close button.
closedCallback System.Action A callback indicating the message was dismissed.
return void

OnVisibleChanged() protected method

protected OnVisibleChanged ( ) : void
return void

ProcessKeyboard() public method

Processes the keyboard looking for the ESC key press to close the console, if required. Otherwise the base ControlsConsole will process the keyboard.
public ProcessKeyboard ( Input info ) : bool
info Input Keyboard state.
return bool

ProcessMouse() public method

Processes the mouse. If allowed, will move the console around with the mouse.
public ProcessMouse ( Input info ) : bool
info Input The mouse state.
return bool

Prompt() public static method

Shows a window prompt with two buttons for the user to click.
public static Prompt ( ColoredString message, string yesPrompt, string noPrompt, Action resultCallback ) : void
message ColoredString The text to display. (background color is ignored)
yesPrompt string The yes button's text.
noPrompt string The no button's text.
resultCallback Action Callback with the yes (true) or no (false) result.
return void

Prompt() public static method

Shows a window prompt with two buttons for the user to click.
public static Prompt ( string message, string yesPrompt, string noPrompt, Action resultCallback ) : void
message string The text to display.
yesPrompt string The yes button's text.
noPrompt string The no button's text.
resultCallback Action Callback with the yes (true) or no (false) result.
return void

Redraw() public method

Redraws the border and title of the window.
public Redraw ( ) : void
return void

Render() public method

public Render ( ) : void
return void

Show() public method

Displays this window using the modal value of the ModalIsDefault property.
public Show ( ) : void
return void

Show() public method

Displays this window.
public Show ( bool modal ) : void
modal bool When true, the window will be displayed as modal; otherwise false.
return void

Window() public method

public Window ( int width, int height ) : System
width int
height int
return System