Class UndoManager.CompoundEdit
- Namespace
- StockSharp.Xaml.Diagram.GXDiagram.Model
- Assembly
- StockSharp.Xaml.Diagram.dll
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.
public sealed class UndoManager.CompoundEdit : IUndoableEdit
- Inheritance
-
UndoManager.CompoundEdit
- Implements
- Inherited Members
- Extension Methods
Constructors
CompoundEdit()
Construct an empty list of edits.
public CompoundEdit()
Properties
Edits
Gets a list of all the StockSharp.Xaml.Diagram.GXDiagram.Model.IUndoableEdits in this compound edit.
public IList<IUndoableEdit> Edits { get; }
Property Value
- IList<IUndoableEdit>
A
List<T>
of StockSharp.Xaml.Diagram.GXDiagram.Model.IUndoableEdits
Remarks
Each item is normally an instance of ModelChangedEventArgs. However, you may add your own StockSharp.Xaml.Diagram.GXDiagram.Model.IUndoableEdit objects.
IsComplete
Gets or sets whether we can add more undoable edits to this compound edit.
public bool IsComplete { get; set; }
Property Value
- bool
This is initially false. It can only be set to true, which is what EndTransaction(bool, string) does.
Name
Gets or sets a name for this group of edits.
public string Name { get; set; }
Property Value
- string
The default value is null. This is set by EndTransaction(bool, string) with the name passed to CommitTransaction(string).
Methods
CanRedo()
This predicate returns true if you can call Redo()-- namely when IsComplete is true.
public bool CanRedo()
Returns
CanUndo()
This predicate returns true if you can call Undo()-- namely when IsComplete is true.
public bool CanUndo()
Returns
Clear()
Clear all of the StockSharp.Xaml.Diagram.GXDiagram.Model.IUndoableEdits and forget all references to them.
public void Clear()
Redo()
Redo all of the StockSharp.Xaml.Diagram.GXDiagram.Model.IUndoableEdits, in forwards order.
public void Redo()
ToString()
For debugging.
public override string ToString()
Returns
Undo()
Undo all of the StockSharp.Xaml.Diagram.GXDiagram.Model.IUndoableEdits, in reverse order.
public void Undo()