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