C# Класс SadConsole.Consoles.Window

Наследование: ControlsConsole
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AfterDeserialized void
ResetBox void

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
OnVisibleChanged ( ) : void

Приватные методы

Метод Описание
AfterDeserialized ( StreamingContext context ) : void
ResetBox ( ) : void

Описание методов

Center() публичный Метод

Centers the window according to the SadConsole.Engine.Device.Viewport size.
public Center ( ) : void
Результат void

Hide() публичный Метод

Hides the window.
public Hide ( ) : void
Результат void

Message() публичный статический Метод

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.
Результат void

Message() публичный статический Метод

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.
Результат void

OnVisibleChanged() защищенный Метод

protected OnVisibleChanged ( ) : void
Результат void

ProcessKeyboard() публичный Метод

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.
Результат bool

ProcessMouse() публичный Метод

Processes the mouse. If allowed, will move the console around with the mouse.
public ProcessMouse ( Input info ) : bool
info Input The mouse state.
Результат bool

Prompt() публичный статический Метод

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.
Результат void

Prompt() публичный статический Метод

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.
Результат void

Redraw() публичный Метод

Redraws the border and title of the window.
public Redraw ( ) : void
Результат void

Render() публичный Метод

public Render ( ) : void
Результат void

Show() публичный Метод

Displays this window using the modal value of the ModalIsDefault property.
public Show ( ) : void
Результат void

Show() публичный Метод

Displays this window.
public Show ( bool modal ) : void
modal bool When true, the window will be displayed as modal; otherwise false.
Результат void

Window() публичный Метод

public Window ( int width, int height ) : System
width int
height int
Результат System