C# Class IronTextBox.IronTextBoxControl

Summary description for IronTextBoxControl.
Inheritance: System.Windows.Forms.UserControl
Show file Open project: pterelaos/revitpythonshell

Public Properties

Property Type Description
Engine ScriptEngine
Scope ScriptScope

Public Methods

Method Description
Clear ( ) : void

Clear the current text in the IronTextBox.

Convert_StringCollectiontoArrayList ( StringCollection StringColin ) : ArrayList

Returns aa ArrayList from a StringCollection

ExecuteFile ( string pyfile ) : object

Executes the Python file within the IronTextBox environment. A nice way to quickly get a Python module in CLI to test or use.

ExecuteSingleStatement ( string pycode ) : object

Executes the code in SourceCodeKind.SingleStatement to fire the command event Use Evaluate if you do not wish to fire the command event

GetCommandHistory ( ) : string[]

Returns the string array of the command history.

GetHelpText ( ) : string

Displays information about IronTextBox and user's IronPython version.

GetTextAtPrompt ( ) : string

Return the text at the prompt.

ImportPaths ( string arg ) : void

ImportPaths

IronTextBoxControl ( ) : System

IronTextBoxControl

IsSingleCommentLine ( string line ) : bool

RewritePyFiletoSB ( StringBuilder &sbCode ) : void

Opens a Python file and reads line by line into a StringBuilder.

Runfile ( ) : void

Run a .Py file. Calls OpenFileDialog to PythonEngine.RunFile.

SetTextAtPrompt ( string text ) : void
SimEnter ( ) : void

Simulate the Enter KeyPress event.

WalkPythonFile ( ) : void

Opens a FolderBrowserDialog to load a Python file to read it line by line into IronTextBox.

WalkPythonFile ( string fullpathfilename ) : void

Opens a Python files and reads line by line into IronTextBox.

WriteText ( string text ) : void

Send text to the IronTextBox.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnCommandEntered ( string command ) : void

Creates new EventCommandEntered event.

OnCompletionRequested ( CompletionRequestedEventArgs args ) : void

Private Methods

Method Description
CompletionCallback ( string uncompleted ) : string

The child control "ironTextBox" calls this, whenever a TAB key is pressed. We just relay this information via the standard event mechanism to listeners.

Evaluate ( string pycode ) : object

Executes the code in SourceCodeKind.Expression not to fire the command event Use ExecuteSingleStatement if you do wish to fire the command event

FireCommandEntered ( string command ) : void

Run the command.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

IronTextBoxControlCommandEntered ( object sender, CommandEnteredEventArgs e ) : void

IronTextBoxControlCommandEntered

Method Details

Clear() public method

Clear the current text in the IronTextBox.
public Clear ( ) : void
return void

Convert_StringCollectiontoArrayList() public method

Returns aa ArrayList from a StringCollection
public Convert_StringCollectiontoArrayList ( StringCollection StringColin ) : ArrayList
StringColin System.Collections.Specialized.StringCollection Incoming StringCollection.
return System.Collections.ArrayList

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

ExecuteFile() public method

Executes the Python file within the IronTextBox environment. A nice way to quickly get a Python module in CLI to test or use.
public ExecuteFile ( string pyfile ) : object
pyfile string Python file (.py)
return object

ExecuteSingleStatement() public method

Executes the code in SourceCodeKind.SingleStatement to fire the command event Use Evaluate if you do not wish to fire the command event
public ExecuteSingleStatement ( string pycode ) : object
pycode string python statement
return object

GetCommandHistory() public method

Returns the string array of the command history.
public GetCommandHistory ( ) : string[]
return string[]

GetHelpText() public method

Displays information about IronTextBox and user's IronPython version.
public GetHelpText ( ) : string
return string

GetTextAtPrompt() public method

Return the text at the prompt.
public GetTextAtPrompt ( ) : string
return string

ImportPaths() public method

ImportPaths
public ImportPaths ( string arg ) : void
arg string
return void

IronTextBoxControl() public method

IronTextBoxControl
public IronTextBoxControl ( ) : System
return System

IsSingleCommentLine() public method

public IsSingleCommentLine ( string line ) : bool
line string
return bool

OnCommandEntered() protected method

Creates new EventCommandEntered event.
protected OnCommandEntered ( string command ) : void
command string Command line string.
return void

OnCompletionRequested() protected method

protected OnCompletionRequested ( CompletionRequestedEventArgs args ) : void
args CompletionRequestedEventArgs
return void

RewritePyFiletoSB() public method

Opens a Python file and reads line by line into a StringBuilder.
public RewritePyFiletoSB ( StringBuilder &sbCode ) : void
sbCode StringBuilder out StringBuilder
return void

Runfile() public method

Run a .Py file. Calls OpenFileDialog to PythonEngine.RunFile.
public Runfile ( ) : void
return void

SetTextAtPrompt() public method

public SetTextAtPrompt ( string text ) : void
text string
return void

SimEnter() public method

Simulate the Enter KeyPress event.
public SimEnter ( ) : void
return void

WalkPythonFile() public method

Opens a FolderBrowserDialog to load a Python file to read it line by line into IronTextBox.
public WalkPythonFile ( ) : void
return void

WalkPythonFile() public method

Opens a Python files and reads line by line into IronTextBox.
public WalkPythonFile ( string fullpathfilename ) : void
fullpathfilename string fullpathfilename
return void

WriteText() public method

Send text to the IronTextBox.
public WriteText ( string text ) : void
text string
return void

Property Details

Engine public property

Main IronPython ScriptEngine
public ScriptEngine Engine
return ScriptEngine

Scope public property

Main IronPython ScriptScope
public ScriptScope Scope
return ScriptScope