The LEADTOOLS annotation features include an Undo engine for undoing annotation automation operations. The undo depth determines the number of operations that can be undone.
LEADTOOLS provides a number of methods and properties for handling undo capabilities. Whenever an object inside the Container changes either by user interaction through the user interface or by code, the undo/redo buffer changes and the UndoRedoChanged event is fired.
Use the UndoCapacity property to get or set the number of user actions that can be reversed using the Undo method, or re-applied using the Redo method. The default for the UndoCapacity property is 10 actions.
Use the CanUndo and the CanRedo properties to determine whether you can undo or redo an operation. If the CanUndo property returns true you can call the Undo method to undo the last automation operation performed, including changes made to object properties. Likewise, if the CanRedo property returns true you can call the Redo method to redo the last automation operation performed, including changes made to object properties.
When you call a method directly from the AnnAutomation object, the AnnAutomation object internally adds a node to the undo stack it maintains. For example, when you call the DeleteSelectedObjects method to delete the object(s) currently being edited, the AnnAutomation object will internally add the undo node to the undo stack. You can programmatically add a node to the undo stack maintained by this AnnAutomation object by using the BeginUndo method along with the EndUndo method and the CancelUndo method. To do so, perform the following steps:
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document