C# Class Illusion.SimpleHistory

IActionHistory represents a recorded list of actions undertaken by user. This class implements a usual, linear action sequence. You can move back and forth changing the state of the respective document. When you move forward, you execute a respective action, when you move backward, you Undo it (UnExecute). Implemented through a double linked-list of SimpleHistoryNode objects. ====================================================================
Inheritance: IActionHistory
Exibir arquivo Open project: kasicass/kasicass Class Usage Examples

Public Methods

Method Description
AppendAction ( IAction newAction ) : bool

Adds a new action to the tail after current state. If there exist more actions after this, they're lost (Garbage Collected). This is the only method of this class that actually modifies the linked-list.

Clear ( ) : void

All existing Nodes and Actions are garbage collected.

EnumUndoableActions ( ) : IEnumerable

Enums the undoable actions.

GetEnumerator ( ) : IEnumerator
MoveBack ( ) : void

Moves the back.

MoveForward ( ) : void

Moves the forward.

SimpleHistory ( ) : System

Initializes a new instance of the SimpleHistory class.

Protected Methods

Method Description
RaiseUndoBufferChanged ( ) : void

Raises the undo buffer changed.

Private Methods

Method Description
Init ( ) : void

Inits this instance.

System ( ) : System.Collections.IEnumerator

Method Details

AppendAction() public method

Adds a new action to the tail after current state. If there exist more actions after this, they're lost (Garbage Collected). This is the only method of this class that actually modifies the linked-list.
public AppendAction ( IAction newAction ) : bool
newAction IAction Action to be added.
return bool

Clear() public method

All existing Nodes and Actions are garbage collected.
public Clear ( ) : void
return void

EnumUndoableActions() public method

Enums the undoable actions.
public EnumUndoableActions ( ) : IEnumerable
return IEnumerable

GetEnumerator() public method

public GetEnumerator ( ) : IEnumerator
return IEnumerator

MoveBack() public method

Moves the back.
public MoveBack ( ) : void
return void

MoveForward() public method

Moves the forward.
public MoveForward ( ) : void
return void

RaiseUndoBufferChanged() protected method

Raises the undo buffer changed.
protected RaiseUndoBufferChanged ( ) : void
return void

SimpleHistory() public method

Initializes a new instance of the SimpleHistory class.
public SimpleHistory ( ) : System
return System