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