[]
        
(Showing Draft Content)

FarPoint.Win.Chart.UndoRedoManager

UndoRedoManager Class

Represents the manager of the undo actions for the FpChart component.

Inheritance
UndoRedoManager
Namespace: FarPoint.Win.Chart
Assembly: FarPoint.Win.Chart.dll
Syntax
public class UndoRedoManager
Public Class UndoRedoManager

Constructors

Name Description
UndoRedoManager(FpChart, int)

Creates a new undo action manager.

Fields

Name Description
actionPending

Specifies whether an action is in progress (to prevent recursion).

chart

Fpchart control which can be used to fire events when executing actions.

maxLength

Specifies the maximum number of UndoAction objects to keep on the undo or redo stacks.

redoList

Specifies the redo stack (last element is on top).

undoList

Specifies the undo stack (last element is on top).

Properties

Name Description
CanRedo

Gets whether Redo manager can redo an action, which depends on redo list is empty or not.

CanUndo

Gets whether Undo manager can undo an action, which depends on undo list is empty or not.

Methods

Name Description
Clear()

Clears out current Undo and Redo stacks

PerformUndoAction(UndoAction)

Performs the specified action (it can then be undone with Undo).

PopRedo()

Pops the top action from the redo stack.

PopUndo()

Pops the top action from the undo stack.

PushRedo(UndoAction)

Pushes the specified action onto the redo stack.

PushUndo(UndoAction, bool)

Pushes the specified action onto the undo stack.

Redo()

Redoes the last action undone with Undo and adds it to the undo list.

Redo(UndoAction)

Redoes all actions in the redo stack up to and including the specified action and adds it to the undo list.

Redo(int)

Redoes the specified number of actions and adds them to the undo list.

Undo()

Undoes the last action done with PerformUndoAction and adds it to the redo list.

Undo(UndoAction)

Undoes all actions in the undo stack up to and including the specified action and adds it to the redo list.

Undo(int)

Undoes the specified number of actions and adds them to the redo list.

Events

Name Description
ActionComplete

Occurs when the undo or redo action is complete.

ActionPerforming

Occurs when the undo or redo action is performing, users can cancel this action. Actions are cancelled are not added to the undo list.

RedoComplete

Occurs when the redo action is complete.

RedoPerforming

Occurs when the redo action is performing, user can cancel this redo action. Cancelled redo action are not added to undo list and are not removed from redo list.

UndoComplete

Occurs when the undo action is complete.

UndoPerforming

Occurs when the undo action is performing, user can cancel this undo action. Cancelled undo action are not added to redo list and are not removed from undo list.