Beispiel #1
0
        public void Compute(char @operator, int operand)
        {
            Command command = new CalculatorCommand(this.calculator, @operator, operand);
            command.Execute();

            this.commands.Add(command);
            this.current++;
        }
Beispiel #2
0
        public int Compute(char @operator, int operand)
        {
            Command command = new CalculatorCommand(_calculator, @operator, operand);
            int     res     = command.Execute();

            _commands.Add(command);
            _current++;
            return(res);
        }
Beispiel #3
0
    public void Compute(char @operator, int operand)
    {
        Command command = new CalculatorCommand(_calculator, @operator, operand);

        command.Execute();

        _commands.Add(command);
        _current++;
    }
            public void Compute(char @operator, int operand)
            {
                //TODO 「♠コマンドの処理を集約・引数でコマンドの種別を切り替える(オプション引数的な感じ)」
                Command command = new CalculatorCommand(_calculator, @operator, operand);

                command.Execute();
                _commands.Add(command);
                _current++;
            }
Beispiel #5
0
        public void Compute(char mathematicalOperator, int value)
        {
            UndoableOperation command =
                new CalculatorCommand(Calculator, mathematicalOperator, value);

            command.Execute();

            ExecutedCommands.Add(command);
            _numberOfCommands++;
        }
Beispiel #6
0
        public void Compute(char @operator, int operand)
        {
            // Create command operation and execute it
            Behavioral.Command.AbstractCommand.Command command = new CalculatorCommand(_calculator, @operator, operand);
            command.Execute();

            // Add command to undo list
            _commandsRepository.Add(command);
            _currentLevel++;
        }
Beispiel #7
0
        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++;
        }
Beispiel #8
0
                public void Compute(char @operator, int operand)
                {
                    // Create command operation and execute it
                    Command command = new CalculatorCommand(_calculator, @operator, operand);

                    command.Execute();

                    // Remove the Redo items
                    _commands.RemoveRange(_current, _commands.Count - _current);

                    // Add command to undo list
                    _commands.Add(command);
                    _current++;
                }
Beispiel #9
0
            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++;
            }