C# Class IronPythonConsoleControl.IronPythonConsoleControl

The IronPythonConsoleControl is a reusable control for implementing the IConsole interface used by IronPython.
Inheritance: System.Windows.Forms.Control, IConsole
Show file Open project: pterelaos/revitpythonshell

Public Methods

Method Description
IronPythonConsoleControl ( ) : System
ReadLine ( int autoIndentSize ) : string

Blocks until the user has entered a line in the console. Returns null when the user enters CTRL+Z.

Write ( string text, Style style ) : void

Write some text to the output. We need to take care to remember the lines, so we can reproduce the text later on. For now, we just ignore "style".

WriteLine ( ) : void
WriteLine ( string text, Style style ) : void

Protected Methods

Method Description
OnKeyPress ( KeyPressEventArgs e ) : void
OnPaint ( PaintEventArgs e ) : void

Update the output to reflect the text written so far. First, we figure out what the whole text looks like, then which portion we can display.

Method Details

IronPythonConsoleControl() public method

public IronPythonConsoleControl ( ) : System
return System

OnKeyPress() protected method

protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
return void

OnPaint() protected method

Update the output to reflect the text written so far. First, we figure out what the whole text looks like, then which portion we can display.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

ReadLine() public method

Blocks until the user has entered a line in the console. Returns null when the user enters CTRL+Z.
public ReadLine ( int autoIndentSize ) : string
autoIndentSize int
return string

Write() public method

Write some text to the output. We need to take care to remember the lines, so we can reproduce the text later on. For now, we just ignore "style".
public Write ( string text, Style style ) : void
text string
style Style
return void

WriteLine() public method

public WriteLine ( ) : void
return void

WriteLine() public method

public WriteLine ( string text, Style style ) : void
text string
style Style
return void