C# Class SadConsole.Consoles.Window

Inheritance: ControlsConsole
Afficher le fichier Open project: Thraka/SadConsole Class Usage Examples

Private Properties

Свойство Type Description
AfterDeserialized void
ResetBox void

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
OnVisibleChanged ( ) : void

Private Methods

Méthode Description
AfterDeserialized ( StreamingContext context ) : void
ResetBox ( ) : void

Method Details

Center() public méthode

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

Hide() public méthode

Hides the window.
public Hide ( ) : void
Résultat void

Message() public static méthode

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.
Résultat void

Message() public static méthode

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.
Résultat void

OnVisibleChanged() protected méthode

protected OnVisibleChanged ( ) : void
Résultat void

ProcessKeyboard() public méthode

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.
Résultat bool

ProcessMouse() public méthode

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

Prompt() public static méthode

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.
Résultat void

Prompt() public static méthode

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.
Résultat void

Redraw() public méthode

Redraws the border and title of the window.
public Redraw ( ) : void
Résultat void

Render() public méthode

public Render ( ) : void
Résultat void

Show() public méthode

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

Show() public méthode

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

Window() public méthode

public Window ( int width, int height ) : System
width int
height int
Résultat System