Table of Contents

Class ModificationHistory

Namespace
VectorDraw.Professional.UndoRedo
Assembly
VectorDraw.Serialize.dll

Maintains the stack of redo and undo logs.Each entry in the undo stack represents a single property change

public class ModificationHistory : BaseObject, IDisposable, IBaseObject
Inheritance
ModificationHistory
Implements
Inherited Members

Constructors

ModificationHistory()

Initializes the object.

Properties

CanRedo

Get a boolean value representing if a redo command can be performed,if there are no items in the redo list then an undo command cannot be performed.

CanUndo

Get a boolean value representing if an undo command can be performed,if there are no items in the undo list then an undo command cannot be performed.

Enable

Returns the object at the top of the enable stack without removing it.

GroupCount

Returns the index of the active object property if an Undo or a Redo action is executed inside a Group.

IsInAction

Get/Set a boolean value representing if an Undo or a Redo action is executed.

LatestUndoHistoryValue

Returns the latest PropertyValue saved in the undo history stack.

RedoStackCollection

Returns the redo Stack where the properties are stored.

RedoStackLength

Get the count of items in the redo stack.

UndoStackCollection

Returns the undo Stack where the properties are stored.

UndoStackLength

Get the count of items in the undo stack.

Methods

AddToStack(Stack<PropertyValue>, bool, object, string, object, bool, bool)

Adds a PropertyValue object into the specific stack.

Clear()

Clears the undo and redo stacks.

ClearRedoStack()

Clears the redo stack.

GetRedoItemArray()

Get the redo history stach to an array of PropertyValue objects.

GetUndoItemArray()

Get the undo history stach to an array of PropertyValue objects.

InvalidateObject(object)

Called to send an Invalidate for an object before and after change its value by an undo or redo action

MakeGroup(int)

Groups the last groupLength items of the undo list.

PopEnable()

Pops the last value added value from the enable stack.

PushEnable(bool)

Adds a boolean value to the enable stack.

Redo()

Redones the last item stored in the redo list.If a start group item is last then redones all items of the group.

Store(object, string, object)

This method would be called by the parent class in order to store the value of a property before it changes.

StoreEx(object, string, object)

This method would be called by the parent class in order to store the value of a property before.

StoreUndoGroup(bool)

Begin/End a Group of property changes.

StoreUndoGroup(bool, string)

Begin/End a Group of property changes.

Undo()

Undones the last item stored in the undo list.If an end group item is last then undones all items of the group.

UpdateObject(object)

Called to update an object after change its value by an undo or redo action

Events

OnAfterStoreValue

Fires after a property change is stored in the ModificationHistory object.

OnStoreValue

Fires before a property change is stored in the ModificationHistory object.