C# 클래스 PoshCode.Controls.ConsoleControl

파일 보기 프로젝트 열기: Jaykul/PoshConsole 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
BackgroundColorProperty System.Windows.DependencyProperty
CaretColorProperty System.Windows.DependencyProperty
ForegroundColorProperty System.Windows.DependencyProperty
TabExpansionTrace TraceSource
TitleProperty DependencyProperty
WaitingForInput bool

Private Properties

프로퍼티 타입 설명
BackgroundColorPropertyChanged void
ConsoleControl System
ForegroundColorPropertyChanged void
ISupportInitialize void
InitializeCommands void
OnApplicationStop void
OnCanExecuteCut void
OnCanExecutePaste void
OnCommandFinished void
OnDownPressed void
OnEnterPressed void
OnExecuteCut void
OnExecutePaste void
OnHistoryMenu void
OnPageDownPressed void
OnPageUpPressed void
OnTabPressed void
OnUpPressed void
ScrollViewer_SizeChanged void
ShouldEcho void
UpdateCharacterWidth void
Write void
Write void

공개 메소드들

메소드 설명
ClearInput ( ) : void
ClearScreen ( ) : void

Implements the CLS command the way most command-lines do: Scroll the Window until the prompt is at the top ... (as opposed to clearing the screen and leaving the prompt at the bottom)

CompleteBackgroundWorkItems ( ) : void

Complete all work queued at background priority

Dispose ( ) : void
FindNext ( TextPointer &position, String input ) : TextRange

Find the input string within the document, starting at the specified position.

FindText ( String input ) : bool

Find all instances of the given text

FlushInputBuffer ( ) : void
FocusInput ( ) : void
GetBufferContents ( Rectangle rectangle ) : ].BufferCell[
NewParagraph ( ) : void

News the paragraph.

ReadKey ( ReadKeyOptions options ) : KeyInfo
ReadLine ( ) : string

Provides a way for scripts to request user input ...

ReadLineAsSecureString ( ) : SecureString
SetPrompt ( string prompt = null ) : void
Write ( string message, Block target = null ) : void
_commandBox_PreviewKeyDown ( object sender, KeyEventArgs e ) : void

Lets us intercept special keys for the control

_passwordBox_PreviewKeyDown ( object sender, KeyEventArgs e ) : void

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
OnCommand ( CommandEventArgs command ) : void

Handles the CommandEntered event of the Console buffer

OnDragEnter ( System.Windows.DragEventArgs e ) : void
OnDrop ( System.Windows.DragEventArgs e ) : void
OnMouseRightButtonUp ( System.Windows.Input.MouseButtonEventArgs e ) : void

Implement right-click the way the normal console does: paste into the prompt.

OnPreviewKeyDown ( KeyEventArgs e ) : void
OnPreviewKeyUp ( KeyEventArgs e ) : void
OnPreviewMouseLeftButtonUp ( MouseButtonEventArgs e ) : void
OnPreviewMouseWheel ( MouseWheelEventArgs e ) : void
OnPreviewTextInput ( TextCompositionEventArgs e ) : void
OnRenderSizeChanged ( SizeChangedInfo sizeInfo ) : void

비공개 메소드들

메소드 설명
BackgroundColorPropertyChanged ( DependencyObject depObj, System.Windows.DependencyPropertyChangedEventArgs e ) : void
ConsoleControl ( ) : System
ForegroundColorPropertyChanged ( DependencyObject depObj, System.Windows.DependencyPropertyChangedEventArgs e ) : void
ISupportInitialize ( ) : void
InitializeCommands ( ) : void
OnApplicationStop ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

A handler for the Application.Stop event...

OnCanExecuteCut ( object target, System.Windows.Input.CanExecuteRoutedEventArgs args ) : void
OnCanExecutePaste ( object target, System.Windows.Input.CanExecuteRoutedEventArgs args ) : void
OnCommandFinished ( IEnumerable command, PipelineState results ) : void

Right before a prompt we want to insert a new paragraph... But we want to trim any whitespace off the end of the output first because the paragraph mark makes plenty of whitespace

OnDownPressed ( System.Windows.Input.KeyEventArgs e ) : void
OnEnterPressed ( System.Windows.Input.KeyEventArgs e ) : void
OnExecuteCut ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnExecutePaste ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnHistoryMenu ( System.Windows.Input.KeyEventArgs e ) : void
OnPageDownPressed ( KeyEventArgs e ) : void
OnPageUpPressed ( KeyEventArgs e ) : void
OnTabPressed ( KeyEventArgs e ) : void
OnUpPressed ( KeyEventArgs e ) : void
ScrollViewer_SizeChanged ( object sender, SizeChangedEventArgs e ) : void
ShouldEcho ( char ch, bool echo ) : void
UpdateCharacterWidth ( ) : void

Updates the value of the CharacterWidthRatio Called each time the font-family changes

Write ( Brush foreground, Brush background, string text, Block target = null ) : void
Write ( ConsoleColor foreground, ConsoleColor background, string text, Block target = null ) : void

메소드 상세

ClearInput() 공개 메소드

public ClearInput ( ) : void
리턴 void

ClearScreen() 공개 메소드

Implements the CLS command the way most command-lines do: Scroll the Window until the prompt is at the top ... (as opposed to clearing the screen and leaving the prompt at the bottom)
public ClearScreen ( ) : void
리턴 void

CompleteBackgroundWorkItems() 공개 메소드

Complete all work queued at background priority
public CompleteBackgroundWorkItems ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

FindNext() 공개 메소드

Find the input string within the document, starting at the specified position.
public FindNext ( TextPointer &position, String input ) : TextRange
position TextPointer the current text position
input String input text
리턴 TextRange

FindText() 공개 메소드

Find all instances of the given text
public FindText ( String input ) : bool
input String text to search for (null or empty clears search)
리턴 bool

FlushInputBuffer() 공개 메소드

public FlushInputBuffer ( ) : void
리턴 void

FocusInput() 공개 메소드

public FocusInput ( ) : void
리턴 void

GetBufferContents() 공개 메소드

public GetBufferContents ( Rectangle rectangle ) : ].BufferCell[
rectangle Rectangle
리턴 ].BufferCell[

NewParagraph() 공개 메소드

News the paragraph.
public NewParagraph ( ) : void
리턴 void

OnCommand() 보호된 메소드

Handles the CommandEntered event of the Console buffer
protected OnCommand ( CommandEventArgs command ) : void
command CommandEventArgs The command.
리턴 void

OnDragEnter() 보호된 메소드

protected OnDragEnter ( System.Windows.DragEventArgs e ) : void
e System.Windows.DragEventArgs
리턴 void

OnDrop() 보호된 메소드

protected OnDrop ( System.Windows.DragEventArgs e ) : void
e System.Windows.DragEventArgs
리턴 void

OnMouseRightButtonUp() 보호된 메소드

Implement right-click the way the normal console does: paste into the prompt.
protected OnMouseRightButtonUp ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs
리턴 void

OnPreviewKeyDown() 보호된 메소드

protected OnPreviewKeyDown ( KeyEventArgs e ) : void
e KeyEventArgs
리턴 void

OnPreviewKeyUp() 보호된 메소드

protected OnPreviewKeyUp ( KeyEventArgs e ) : void
e KeyEventArgs
리턴 void

OnPreviewMouseLeftButtonUp() 보호된 메소드

protected OnPreviewMouseLeftButtonUp ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs
리턴 void

OnPreviewMouseWheel() 보호된 메소드

protected OnPreviewMouseWheel ( MouseWheelEventArgs e ) : void
e MouseWheelEventArgs
리턴 void

OnPreviewTextInput() 보호된 메소드

protected OnPreviewTextInput ( TextCompositionEventArgs e ) : void
e TextCompositionEventArgs
리턴 void

OnRenderSizeChanged() 보호된 메소드

protected OnRenderSizeChanged ( SizeChangedInfo sizeInfo ) : void
sizeInfo SizeChangedInfo
리턴 void

ReadKey() 공개 메소드

public ReadKey ( ReadKeyOptions options ) : KeyInfo
options ReadKeyOptions
리턴 KeyInfo

ReadLine() 공개 메소드

Provides a way for scripts to request user input ...
public ReadLine ( ) : string
리턴 string

ReadLineAsSecureString() 공개 메소드

public ReadLineAsSecureString ( ) : SecureString
리턴 SecureString

SetPrompt() 공개 메소드

public SetPrompt ( string prompt = null ) : void
prompt string
리턴 void

Write() 공개 메소드

public Write ( string message, Block target = null ) : void
message string
target Block
리턴 void

_commandBox_PreviewKeyDown() 공개 메소드

Lets us intercept special keys for the control
public _commandBox_PreviewKeyDown ( object sender, KeyEventArgs e ) : void
sender object
e KeyEventArgs
리턴 void

_passwordBox_PreviewKeyDown() 공개 메소드

public _passwordBox_PreviewKeyDown ( object sender, KeyEventArgs e ) : void
sender object
e KeyEventArgs
리턴 void

프로퍼티 상세

BackgroundColorProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows BackgroundColorProperty
리턴 System.Windows.DependencyProperty

CaretColorProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows CaretColorProperty
리턴 System.Windows.DependencyProperty

ForegroundColorProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ForegroundColorProperty
리턴 System.Windows.DependencyProperty

TabExpansionTrace 공개적으로 정적으로 프로퍼티

public static TraceSource TabExpansionTrace
리턴 TraceSource

TitleProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty TitleProperty
리턴 DependencyProperty

WaitingForInput 공개적으로 프로퍼티

public bool WaitingForInput
리턴 bool