I've just published the first part of a two part series on my take on
Undo/Redo. Pete, you may be interested in this since it's in the same
space as your recent work.
A 'task' is the term I use to describe application work units,
instigated by the user or the system.
The main features of the task management system are:
• Tasks can be undone, redone, and repeated.
• Task execution may be cancelled.
• Composite tasks allow sequential and parallel execution of tasks
with automatic rollback on failure of an individual task.
• Tasks can be associated with a context, such as a UserControl, so
that the undo, redo, and repeat actions can be, for example, enabled
according to UI focus.
• Tasks can be global, having no context association.
• The task system can be wired to ICommands.
• Tasks can be chained, in that one task can use the Task Service to
perform another.
• Return to a point in history by specifying an undo point.
• Coherency in the system is preserved by disallowing the execution of
tasks outside of the Task Service.
• Task Model compatible with both the Silverlight and Desktop CLRs
I'd love to know what you guys think.
I'll be publishing the second part tomorrow.
http://www.codeproject.com/KB/WPF/UndoRedoRepeat01.aspx
Cheers,
Daniel