CompoundEdit

StockSharp.Xaml.Diagram.GXDiagram.Model.UndoManager

This class is used to hold a list of ModelChangedEventArgs that should be undone or redone all together because it represents the side-effects of a single logical operation, including user-driven events.

Implements: IUndoableEdit

Constructors

CompoundEdit
public CompoundEdit()
compoundEdit = CompoundEdit()

Construct an empty list of edits.

Properties

Edits
public IList<IUndoableEdit> Edits { get; private set; }
value = compoundEdit.Edits
compoundEdit.Edits = value

Gets a list of all the IUndoableEdits in this compound edit.

IsComplete
public bool IsComplete { get; set; }
value = compoundEdit.IsComplete
compoundEdit.IsComplete = value

Gets or sets whether we can add more undoable edits to this compound edit.

Name
public string Name { get; set; }
value = compoundEdit.Name
compoundEdit.Name = value

Gets or sets a name for this group of edits.

Methods

CanRedo
public bool CanRedo()
result = compoundEdit.CanRedo()

This predicate returns true if you can call Redo-- namely when IsComplete is true.

CanUndo
public bool CanUndo()
result = compoundEdit.CanUndo()

This predicate returns true if you can call Undo-- namely when IsComplete is true.

Clear
public void Clear()
compoundEdit.Clear()

Clear all of the IUndoableEdits and forget all references to them.

Redo
public void Redo()
compoundEdit.Redo()

Redo all of the IUndoableEdits, in forwards order.

ToString
public override string ToString()
result = compoundEdit.ToString()

For debugging.

Undo
public void Undo()
compoundEdit.Undo()

Undo all of the IUndoableEdits, in reverse order.