Beispiel #1
0
        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);
        }
Beispiel #2
0
 private void btnBack_Click(object sender, EventArgs e)
 {
     CalculatorB.Back(txtAnswer);
 }
Beispiel #3
0
 private void btnSqrt_Click(object sender, EventArgs e)
 {
     CalculatorB.Squareroot(txtAnswer);
 }
Beispiel #4
0
 private void btnRec_Click(object sender, EventArgs e)
 {
     CalculatorB.Exponent(txtAnswer);
 }
Beispiel #5
0
 private void btnNegate_Click(object sender, EventArgs e)
 {
     CalculatorB.Negate(txtAnswer);
 }