public void OnClearEntry() { displayInvalid = true; decimalAdded = false; negative = NegState.Pos; blockZero = ZeroState.None; }
private void OnOverwrite() { if (blockZero == ZeroState.Adding) { blockZero = ZeroState.BlockZero; } else if (negative == NegState.Negating) { blockZero = ZeroState.None; } if (negative == NegState.Negating || negative == NegState.Clearing) { displayInvalid = true; negative = NegState.Neg; } else { displayInvalid = false; negative = NegState.Pos; } if (state != State.NextOp && state != State.FirstOp) { CurrentOperation = Operation.Add; state = State.Import; } else { state = State.Editing; } decimalAdded = false; }
public void OnClear() { state = State.Reset; decimalAdded = false; displayInvalid = false; negative = NegState.Pos; blockZero = ZeroState.None; }
public void OnOperation() { if (state == State.NoChain) { state = State.NextOp; } isEvaluate = false; blockZero = ZeroState.None; }
public void OnEvaluate() { if (state == State.NextOp || state == State.FirstOp) { state = State.NoChain; } isEvaluate = true; blockZero = ZeroState.None; }
public void OnNumber(int number) { displayInvalid = false; if (number == 0) { if (blockZero == ZeroState.None) { blockZero = ZeroState.Adding; } else if (blockZero == ZeroState.BlockZero) { blockZero = ZeroState.Blocking; } } else if (blockZero == ZeroState.BlockZero) { blockZero = ZeroState.Replacing; } else { blockZero = ZeroState.AcceptAll; } }
public void OnDecimalPost() { decimalAdded = true; displayInvalid = false; blockZero = ZeroState.AcceptAll; }