CraftSynth.ImageEditor – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /// Undo-Redo code is written using the article: |
2 | /// http://www.codeproject.com/cs/design/commandpatterndemo.asp |
||
3 | // The Command Pattern and MVC Architecture |
||
4 | // By David Veeneman. |
||
5 | |||
6 | using System; |
||
7 | |||
8 | namespace CraftSynth.ImageEditor |
||
9 | { |
||
10 | /// <summary> |
||
11 | /// Base class for commands used for Undo - Redo |
||
12 | /// </summary> |
||
13 | public abstract class Command:IDisposable |
||
14 | { |
||
15 | // This function is used to make Undo operation. |
||
16 | // It makes action opposite to the original command. |
||
17 | //public abstract void Undo(GraphicsList list); |
||
18 | public abstract void Undo(Layers list); |
||
19 | // This command is used to make Redo operation. |
||
20 | // It makes original command again. |
||
21 | //public abstract void Redo(GraphicsList list); |
||
22 | public abstract void Redo(Layers list); |
||
23 | // Derived classes have members which contain enough information |
||
24 | // to make Undo and Redo operations for every specific command. |
||
25 | |||
26 | public abstract void Dispose(bool disposing); |
||
27 | |||
28 | public void Dispose() |
||
29 | { |
||
30 | this.Dispose(true); |
||
31 | GC.SuppressFinalize(this); |
||
32 | } |
||
33 | } |
||
34 | } |