Example #1
0
 private void AppendNumber(char numberChar)
 {
     if (CurrentState.CanAppendNumber())
     {
         Append(numberChar);
     }
 }
Example #2
0
 private void DisableInvalidButtons()
 {
     ToggleButtonGroup(CurrentState.CanAppendFunction(), functionNames);
     ToggleButtonGroup(CurrentState.CanAppendOperator(), operatorNames);
     ToggleButtonGroup(CurrentState.CanAppendNumber(), numberNames);
     ToggleButtonGroup(CurrentState.CanAppendDecimal(), "decimal");
     ToggleButtonGroup(CurrentState.CanAppendParen(true), "lparen");
     ToggleButtonGroup(CurrentState.CanAppendParen(false), "rparen");
     ToggleButtonGroup(CurrentState.CanAppendComma(), "comma");
     ToggleButtonGroup(CurrentState.CanAppendUnaryMinus() || CurrentState.CanAppendOperator(), "subtract");
     ToggleButtonGroup(CurrentState.CanEvaluate(), "evaluate");
 }