C# Class ICSharpCode.TextEditor.TextEditorControlBase

Inheritance: System.Windows.Forms.UserControl
显示文件 Open project: Clancey/MonoMac.Windows.Form Class Usage Examples

Protected Properties

Property Type Description
editactions IEditAction>.Dictionary

Private Properties

Property Type Description
GenerateDefaultActions void
GetEditAction IEditAction
OnDocumentChanged void
ParseFont System.Drawing.Font

Public Methods

Method Description
BeginUpdate ( ) : void Call this method before a long update operation this 'locks' the text area so that no screen update occurs.
CanSaveWithCurrentEncoding ( ) : bool

Gets if the document can be saved with the current encoding without losing data.

EndUpdate ( ) : void Call this method to 'unlock' the text area. After this call screen update can occur. But no automatical refresh occurs you have to commit the updates in the queue.
GetRangeDescription ( int selectedItem, int itemCount ) : string
IsEditAction ( Keys keyData ) : bool
LoadFile ( string fileName ) : void
LoadFile ( string fileName, Stream stream, bool autoLoadHighlighting, bool autodetectEncoding ) : void Loads a file from the specified stream.
LoadFile ( string fileName, bool autoLoadHighlighting, bool autodetectEncoding ) : void Loads a file given by fileName
OptionsChanged ( ) : void
Refresh ( ) : void Overwritten refresh method that does nothing if the control is in an update cycle.
SaveFile ( Stream stream ) : void Saves the text editor content into the specified stream. Does not close the stream.
SaveFile ( string fileName ) : void Saves the text editor content into the file.

Protected Methods

Method Description
Dispose ( bool disposing ) : void
OnFileNameChanged ( EventArgs e ) : void
OnReloadHighlighting ( object sender, EventArgs e ) : void
TextEditorControlBase ( ) : System

Private Methods

Method Description
GenerateDefaultActions ( ) : void
GetEditAction ( Keys keyData ) : IEditAction
OnDocumentChanged ( object sender, EventArgs e ) : void
ParseFont ( string font ) : Font

Method Details

BeginUpdate() public method

Call this method before a long update operation this 'locks' the text area so that no screen update occurs.
public BeginUpdate ( ) : void
return void

CanSaveWithCurrentEncoding() public method

Gets if the document can be saved with the current encoding without losing data.
public CanSaveWithCurrentEncoding ( ) : bool
return bool

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndUpdate() public method

Call this method to 'unlock' the text area. After this call screen update can occur. But no automatical refresh occurs you have to commit the updates in the queue.
public EndUpdate ( ) : void
return void

GetRangeDescription() public method

public GetRangeDescription ( int selectedItem, int itemCount ) : string
selectedItem int
itemCount int
return string

IsEditAction() public method

public IsEditAction ( Keys keyData ) : bool
keyData Keys
return bool

LoadFile() public method

public LoadFile ( string fileName ) : void
fileName string
return void

LoadFile() public method

Loads a file from the specified stream.
public LoadFile ( string fileName, Stream stream, bool autoLoadHighlighting, bool autodetectEncoding ) : void
fileName string The name of the file to open. Used to find the correct highlighting strategy /// if autoLoadHighlighting is active, and sets the filename property to this value.
stream Stream The stream to actually load the file content from.
autoLoadHighlighting bool Automatically load the highlighting for the file
autodetectEncoding bool Automatically detect file encoding and set Encoding property to the detected encoding.
return void

LoadFile() public method

Loads a file given by fileName
public LoadFile ( string fileName, bool autoLoadHighlighting, bool autodetectEncoding ) : void
fileName string The name of the file to open
autoLoadHighlighting bool Automatically load the highlighting for the file
autodetectEncoding bool Automatically detect file encoding and set Encoding property to the detected encoding.
return void

OnFileNameChanged() protected method

protected OnFileNameChanged ( EventArgs e ) : void
e System.EventArgs
return void

OnReloadHighlighting() protected method

protected OnReloadHighlighting ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

OptionsChanged() public abstract method

public abstract OptionsChanged ( ) : void
return void

Refresh() public method

Overwritten refresh method that does nothing if the control is in an update cycle.
public Refresh ( ) : void
return void

SaveFile() public method

Saves the text editor content into the specified stream. Does not close the stream.
public SaveFile ( Stream stream ) : void
stream Stream
return void

SaveFile() public method

Saves the text editor content into the file.
public SaveFile ( string fileName ) : void
fileName string
return void

TextEditorControlBase() protected method

protected TextEditorControlBase ( ) : System
return System

Property Details

editactions protected_oe property

This hashtable contains all editor keys, where the key is the key combination and the value the action.
protected Dictionary editactions
return IEditAction>.Dictionary