C# Class Intninety.TemporalTextBox

Represents a Windows text box control capable of both undo and redo operations.
Inheritance: System.Windows.Forms.TextBox
Show file Open project: rastating/yaircc Class Usage Examples

Public Methods

Method Description
ClearStack ( ) : void

Clears both the undo and redo stack.

Redo ( ) : void

Restores the text removed by the last undo operation in the text box.

TemporalTextBox ( ) : System

Initialises a new instance of the TemporalTextBox class.

Transform ( TextBox source ) : void

Transform the text box to be identical to source.

Transform ( TextBox source, bool hideSource ) : void

Transform the text box to be identical to source.

Undo ( ) : void

Undoes the last edit operation in the text box.

Private Methods

Method Description
TemporalTextBox_KeyDown ( object sender, KeyEventArgs e ) : void

Occurs when a key is pressed while the control has focus.

TemporalTextBox_TextChanged ( object sender, EventArgs e ) : void

Occurs when content changes in the text box.

Method Details

ClearStack() public method

Clears both the undo and redo stack.
public ClearStack ( ) : void
return void

Redo() public method

Restores the text removed by the last undo operation in the text box.
public Redo ( ) : void
return void

TemporalTextBox() public method

Initialises a new instance of the TemporalTextBox class.
public TemporalTextBox ( ) : System
return System

Transform() public method

Transform the text box to be identical to source.
public Transform ( TextBox source ) : void
source System.Windows.Forms.TextBox The text box to transform into
return void

Transform() public method

Transform the text box to be identical to source.
public Transform ( TextBox source, bool hideSource ) : void
source System.Windows.Forms.TextBox The text box to transform into
hideSource bool Hide the source text box after the transformation is complete
return void

Undo() public method

Undoes the last edit operation in the text box.
public Undo ( ) : void
return void