C# Class Gearset.UndoEngine

Show file Open project: juancampa/Gearset

Public Methods

Method Description
AddCommand ( IUndoable command ) : void

Adds a command to the history without executing it. This is usefull if the command was executed somewhere else but still needs undo/redo.

Execute ( IUndoable command ) : void

Executes a command and adds it to the command history so it can be undone/redone.

Redo ( ) : void

Redo the last undone command

Undo ( ) : void

Undoes the last done command

UndoEngine ( ) : System

Method Details

AddCommand() public method

Adds a command to the history without executing it. This is usefull if the command was executed somewhere else but still needs undo/redo.
public AddCommand ( IUndoable command ) : void
command IUndoable
return void

Execute() public method

Executes a command and adds it to the command history so it can be undone/redone.
public Execute ( IUndoable command ) : void
command IUndoable The command to execute and keep history of.
return void

Redo() public method

Redo the last undone command
public Redo ( ) : void
return void

Undo() public method

Undoes the last done command
public Undo ( ) : void
return void

UndoEngine() public method

public UndoEngine ( ) : System
return System