public void HandleButton1() { if (State == CalculatorStates.Clear) { State = CalculatorStates.EnteringOperand1; Operand1 = 1; } if (State == CalculatorStates.OperatorEntered) { State = CalculatorStates.EnteringOperand2; Operand2 = 1; } SetDisplayText(); }
public void HandleButtonPlus() { State = CalculatorStates.OperatorEntered; SetDisplayText(); }