Esempio n. 1
0
        private void ExecuteOperation()
        {
            //Cria o objeto de operação
            OperationFactory factory = new OperationFactory();
            var operationObject      = factory.CreateFromStringData(op1.Value, op2.Value, chosenOperation);
            //calcula
            float result = operationObject.C;

            //resultado no operando 1
            op1.SetFromFloat(result);
            //limpa a operaçao
            chosenOperation = "";
            //limpa operando 2
            op2.Clear();
            //operando atual no operando 1
            currentOperand = op1;
        }