Click or drag to resize

UndoRedoService Class

This class implements an Undo and Redo service. When this service is registered, changes in an AutomationML document can be reversed. A sequence of actions can be grouped into transactions which than can be reversed within a single undo operation. The AMLEngine will locate a registered UndoRedoService and will notify the service of any changes, made to a document. The service manages individual stacks for each loaded CAEX document.
Inheritance Hierarchy
SystemObject
  Aml.Engine.ServicesUndoRedoService

Namespace: Aml.Engine.Services
Assembly: Aml.Engine.Services (in Aml.Engine.Services.dll) Version: 3.2
Syntax
public class UndoRedoService : IUndoRedo, 
	IAMLService, INotifyPropertyChanged, IXMLDocumentRegistry

The UndoRedoService type exposes the following members.

Methods
 NameDescription
Public methodBeginTransaction Begins a new transaction. All changes, made to a CAEXDocument inside a transaction are treated as a single operation.
Public methodCanRedo Determines, if the service can redo a command
Public methodCanUndo Determines, if the service can undo a command.
Public methodClearStacks Clears the stacks, managed for the specified document.
Public methodEndTransaction Ends the current transaction from the specified document.
Public methodLastModificationDate Gets the date of the most recently executed command for the specified document.
Public methodPause Request to not record changes of the specified document.
Public methodPushCommand A command is pushed on the undo stack of this service.
Public methodRedo Executes the last undone operation from the specified document again.
Public methodRedoActions Gets the command names of all redo actions for the defined document.
Public methodStatic memberRegister Registers a new instance of a UndoRedoService with the ServiceLocator of the AMLEngine.
Public methodRemoveDocument Removes the XML document from the internal registry of the service. Undo- and Redo Stacks for this document will be deleted.
Public methodResume Request to resume recording changes of the specified document.
Public methodUndo Reverses the last action of the defined document.
Public methodUndoActions Gets the command names of all undo actions of the defined document.
Public methodStatic memberUnRegister Unregisters this service
Top
Events
 NameDescription
Public eventPropertyChanged Occurs when a property value changes.
Top
See Also