how to handle history (Edit>Undo Redo)
-
Susuko wrote:
how to handle history (Edit>Undo Redo)
There is no single correct answer for this. It really depends on what you are trying to do. The best advice I can offer is to say that you need to implement the Memento pattern. See books such as Design Patterns in C# by Steven John Metsker (Pages 197-209). Or search online for details of this pattern.
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
-
Search this site for "undo". Here are some results: http://www.codeproject.com/docview/undo.asp[^] http://www.codeproject.com/csharp/undo_support.asp[^] http://www.codeproject.com/csharp/undoredobuffer.asp[^] http://www.codeproject.com/csharp/pcobjectundo.asp[^] - It's easier to make than to correct a mistake.
-
You may want to look into the Memento Design Pattern as this design is exactly for the Do/Undo/Redo ability.