C# Class WebApplications.Utilities.ConsoleHelper

ファイルを表示 Open project: webappsuk/CoreLibraries

Public Properties

Property Type Description
IsConsole bool

Public Methods

Method Description
Maximise ( ) : void

Maximises the console window.

ToColor ( ConsoleColor color ) : Color

Get's the Color of a ConsoleColor.

ToConsoleColor ( Color color ) : ConsoleColor

Converts a Color to the nearest ConsoleColor.

Private Methods

Method Description
AttachConsole ( uint dwProcessId ) : bool
ConsoleHelper ( ) : System

Initializes static members of the ConsoleHelper class.

Distance ( Color a, Color b ) : double
GetConsoleScreenBufferInfoEx ( IntPtr hConsoleOutput, ConsoleScreenBufferInfoEx &csbe ) : bool
GetStdHandle ( int stdHandle ) : IntPtr
ReadPassword ( char mask = '*' ) : string
ShowWindow ( IntPtr hWnd, int cmdShow ) : bool

Method Details

Maximise() public static method

Maximises the console window.
public static Maximise ( ) : void
return void

ToColor() public static method

Get's the Color of a ConsoleColor.
public static ToColor ( ConsoleColor color ) : Color
color ConsoleColor The color.
return Color

ToConsoleColor() public static method

Converts a Color to the nearest ConsoleColor.
public static ToConsoleColor ( Color color ) : ConsoleColor
color Color The color.
return ConsoleColor

Property Details

IsConsole public_oe static_oe property

Whether the current application is running in a console.
public static bool IsConsole
return bool