public void Add(char op, int value) { Commander command = new CalculatorCommand(op, value, Calculator); command.Run(); Commands.Add(command); Total++; }
public void Compute(char @operator, int operand) { // Create command operation and execute it Command command = new CalculatorCommand( _calculator, @operator, operand); command.Execute(); // Add command to undo list _commands.Add(command); _current++; }