private void btnEquals_Click(object sender, EventArgs e) { equation.Text = ""; switch (operation) { case "+": txtAnswer.Text = CalculatorB.Plus(value, Double.Parse(txtAnswer.Text)).ToString(); break; case "-": txtAnswer.Text = CalculatorB.Minus(value, Double.Parse(txtAnswer.Text)).ToString(); break; case "*": txtAnswer.Text = CalculatorB.Times(value, Double.Parse(txtAnswer.Text)).ToString(); break; case "/": txtAnswer.Text = CalculatorB.Div(value, Double.Parse(txtAnswer.Text)).ToString(); break; } value = Double.Parse(txtAnswer.Text); }
private void btnBack_Click(object sender, EventArgs e) { CalculatorB.Back(txtAnswer); }
private void btnSqrt_Click(object sender, EventArgs e) { CalculatorB.Squareroot(txtAnswer); }
private void btnRec_Click(object sender, EventArgs e) { CalculatorB.Exponent(txtAnswer); }
private void btnNegate_Click(object sender, EventArgs e) { CalculatorB.Negate(txtAnswer); }