C# Класс 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. ====================================================================
Наследование: IActionHistory
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
RaiseUndoBufferChanged ( ) : void

Raises the undo buffer changed.

Приватные методы

Метод Описание
Init ( ) : void

Inits this instance.

System ( ) : System.Collections.IEnumerator

Описание методов

AppendAction() публичный Метод

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.
Результат bool

Clear() публичный Метод

All existing Nodes and Actions are garbage collected.
public Clear ( ) : void
Результат void

EnumUndoableActions() публичный Метод

Enums the undoable actions.
public EnumUndoableActions ( ) : IEnumerable
Результат IEnumerable

GetEnumerator() публичный Метод

public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

MoveBack() публичный Метод

Moves the back.
public MoveBack ( ) : void
Результат void

MoveForward() публичный Метод

Moves the forward.
public MoveForward ( ) : void
Результат void

RaiseUndoBufferChanged() защищенный Метод

Raises the undo buffer changed.
protected RaiseUndoBufferChanged ( ) : void
Результат void

SimpleHistory() публичный Метод

Initializes a new instance of the SimpleHistory class.
public SimpleHistory ( ) : System
Результат System