public override void undo() { for (int i = _list.Count - 1; i >= 0; i--) { AbstractCommand cmd = (AbstractCommand)_list[i]; cmd.undo(); } }
public void undoLastCmd() { if (_doneStack.Count != 0) { AbstractCommand lastcmd = (AbstractCommand)_doneStack.Pop(); lastcmd.undo(); _undoneStack.Push(lastcmd); if (_undoneStack.Count == _maxStackSize) { _undoneStack = this.reduceStackSize(_undoneStack); } setUnReButtonState(); } }