Пример #1
0
 public Print(Document doc)
 {
     Execute = delegate { Execute.Log(); doc.Print(); };
     Undo    = delegate { Undo.Log(); Console.WriteLine("This action cannot be Undone"); };
     Redo    = delegate { Redo.Log(); doc.Print(); };
 }
Пример #2
0
 public Paste(Document doc)
 {
     Execute = delegate { Execute.Log(); doc.Paste(); };
     Undo    = delegate { Undo.Log(); doc.Restore(); };
     Redo    = delegate { Redo.Log(); doc.Paste(); };
 }