C# Class PowerArgs.Cli.ConsoleApp

A class representing a console application that uses a message pump to synchronize work on a UI thread
Inheritance: CliMessagePump
Exibir arquivo Open project: adamabdelhamed/PowerArgs Class Usage Examples

Public Methods

Method Description
ConsoleApp ( ) : System

Creates a full screen console app that will automatically adjust its layout if the window size changes

ConsoleApp ( int x, int y, int w, int h ) : System

Creates a new console app given a set of boundaries

FromMvVm ( string markup, object viewModel ) : ConsoleApp

Creates a ConsoleApp from markup and a view model

Paint ( ) : void

Queues up a request to paint the app. The system will dedupe multiple paint requests when there are multiple in the pump's work queue

Start ( ) : Task

Starts the app, asynchronously.

Protected Methods

Method Description
HandleKeyInput ( ConsoleKeyInfo info ) : void

Handles key input for the application

Private Methods

Method Description
ControlAddedToVisualTree ( ConsoleControl c ) : void
ControlRemovedFromVisualTree ( ConsoleControl c ) : void
ControlRemovedFromVisualTreeRecursive ( ConsoleControl c ) : bool
Event ( ) : System

Method Details

ConsoleApp() public method

Creates a full screen console app that will automatically adjust its layout if the window size changes
public ConsoleApp ( ) : System
return System

ConsoleApp() public method

Creates a new console app given a set of boundaries
public ConsoleApp ( int x, int y, int w, int h ) : System
x int The left position on the target console to bound this app
y int The right position on the target console to bound this app
w int The width of the app
h int The height of the app
return System

FromMvVm() public static method

Creates a ConsoleApp from markup and a view model
public static FromMvVm ( string markup, object viewModel ) : ConsoleApp
markup string The xml markup that defines the app's view
viewModel object The view model object that defines the code behind the view
return ConsoleApp

HandleKeyInput() protected method

Handles key input for the application
protected HandleKeyInput ( ConsoleKeyInfo info ) : void
info ConsoleKeyInfo The key that was pressed
return void

Paint() public method

Queues up a request to paint the app. The system will dedupe multiple paint requests when there are multiple in the pump's work queue
public Paint ( ) : void
return void

Start() public method

Starts the app, asynchronously.
public Start ( ) : Task
return Task