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(); }; }
public Paste(Document doc) { Execute = delegate { Execute.Log(); doc.Paste(); }; Undo = delegate { Undo.Log(); doc.Restore(); }; Redo = delegate { Redo.Log(); doc.Paste(); }; }