C# 클래스 StyleConsole, trivial

The command line interface.
파일 보기 프로젝트 열기: nuscien/trivial 1 사용 예제들

공개 메소드들

메소드 설명
Backspace ( int count = 1, bool doNotRemoveOutput = false ) : void

Enters a backspace to console to remove the last charactor.

BackspaceToBeginning ( ) : void

Enters backspaces to console to remove the charactors to the beginning of the line.

Clear ( RelativeAreas area ) : void

Removes the specific area.

IsBlockOutputOnly ( IConsoleTextCreator instance ) : bool

Tests if the output of the instance always contain a line terminator.

MoveCursorBy ( int x, int y ) : void

Moves cursor by a specific relative position.

MoveCursorTo ( int x, int y ) : void

Moves cursor at a specific position in buffer.

ReadKey ( bool intercept = false ) : ConsoleKeyInfo,

Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window.

ReadLine ( ) : string

Reads the next line of characters from the standard input stream.

ReadPassword ( ) : SecureString,

Obtains the password pressed by the user.

ReadPassword ( ConsoleColor? foreground, char? replaceChar, bool inline = false ) : SecureString,

Obtains the password pressed by the user.

ReadPassword ( char replaceChar, bool inline = false ) : SecureString,

Obtains the password pressed by the user.

비공개 메소드들

메소드 설명
BackspaceInternal ( int count = 1, int keepLevel ) : void

Enters a backspace to console to remove the last charactor.

ClearInCmd ( RelativeAreas area ) : void
ReadLine ( ConsoleColor? foreground, SecureString, str, char? replaceChar, bool inline = false ) : void
TestMode ( ) : void

메소드 상세

Backspace() 공개 메소드

Enters a backspace to console to remove the last charactor.
public Backspace ( int count = 1, bool doNotRemoveOutput = false ) : void
count int The count of the charactor to remove from end.
doNotRemoveOutput bool true if just only move cursor back and keep output; otherwise, false.
리턴 void

BackspaceToBeginning() 공개 메소드

Enters backspaces to console to remove the charactors to the beginning of the line.
public BackspaceToBeginning ( ) : void
리턴 void

Clear() 공개 메소드

Removes the specific area.
public Clear ( RelativeAreas area ) : void
area RelativeAreas The area to remove.
리턴 void

IsBlockOutputOnly() 공개 정적인 메소드

Tests if the output of the instance always contain a line terminator.
public static IsBlockOutputOnly ( IConsoleTextCreator instance ) : bool
instance IConsoleTextCreator The instance of the console handler wrapper.
리턴 bool

MoveCursorBy() 공개 메소드

Moves cursor by a specific relative position.
public MoveCursorBy ( int x, int y ) : void
x int The horizontal translation size.
y int The vertical translation size.
리턴 void

MoveCursorTo() 공개 메소드

Moves cursor at a specific position in buffer.
public MoveCursorTo ( int x, int y ) : void
x int Column (zero-based), the left from the edge of buffer.
y int Row (zero-based) the top from the edge of buffer; or -1 if do not move.
리턴 void

ReadKey() 공개 메소드

Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window.
An I/O error occurred. The input stream is redirected from the one other than the console.
public ReadKey ( bool intercept = false ) : ConsoleKeyInfo,
intercept bool Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false.
리턴 ConsoleKeyInfo,

ReadLine() 공개 메소드

Reads the next line of characters from the standard input stream.
An I/O error occurred. There is insufficient memory to allocate a buffer for the returned string. The number of characters in the next line of characters is greater than max value of 32-bit integer.
public ReadLine ( ) : string
리턴 string

ReadPassword() 공개 메소드

Obtains the password pressed by the user.
public ReadPassword ( ) : SecureString,
리턴 SecureString,

ReadPassword() 공개 메소드

Obtains the password pressed by the user.
public ReadPassword ( ConsoleColor? foreground, char? replaceChar, bool inline = false ) : SecureString,
foreground ConsoleColor? The replace charactor color.
replaceChar char? The optional charactor to output to replace the original one, such as *.
inline bool true if do not follow the line terminator after typing the password; otherwise, false.
리턴 SecureString,

ReadPassword() 공개 메소드

Obtains the password pressed by the user.
public ReadPassword ( char replaceChar, bool inline = false ) : SecureString,
replaceChar char The optional charactor to output to replace the original one, such as *.
inline bool true if do not follow the line terminator after typing the password; otherwise, false.
리턴 SecureString,