public void PressNumber(int value) { if (value < 0) { EvaluateStringInput(Math.Abs(value).ToString()); NegativeBtn.Click(); } else { EvaluateStringInput(Math.Abs(value).ToString()); } }
public void EvaluateStringInput(string exp) { if (exp[0] == '-') { exp = exp.Substring(1); foreach (char c in exp) { PressKey(c); } NegativeBtn.Click(); } else { exp = exp.Trim(); foreach (char c in exp) { PressKey(c); } } }