Table of Contents

Class CommandExecutor

Namespace
Bonsai.Design
Assembly
Bonsai.Design.dll

Represents a command execution stack with support for undo and redo operations.

public class CommandExecutor : Component, IComponent, IDisposable
Inheritance
CommandExecutor
Implements
Inherited Members

Properties

CanRedo

Gets a value indicating whether there are any commands available to redo on the command execution stack.

CanUndo

Gets a value indicating whether there are any commands available to undo on the command execution stack.

Methods

BeginCompositeCommand()

Marks the beginning of a composite command execution.

Clear()

Clears the entire command execution history.

EndCompositeCommand()

Marks the end of a composite command execution.

Execute(Action, Action)

Specifies a new action for immediate execution, together with the optional undo action which reverses the effects of the command.

OnStatusChanged(EventArgs)

Raises the StatusChanged event.

Redo()

Redo the effects of the command which was previously undone.

Undo()

Undo the effects of the previously executed command.

Undo(bool)

Undo the effects of the previously executed command, with optional support for redo operations.

Events

StatusChanged

Occurs when the command execution stack has changed, either by executing a new command, or calling undo or redo operations.