public void UnDoAll() { while (_stack.Count > 0) { AbstractCommand cmd = _stack.Pop(); cmd.ReverseExecute(); } }
public void Execute() { while (_queue.Count > 0) { AbstractCommand cmd = _queue.Dequeue(); cmd.Execute(); _stack.Push(cmd); } }
public void UndoLast() { AbstractCommand cmd = _stack.Pop(); cmd.ReverseExecute(); }