Exemplo n.º 1
0
 private void buttonEgal_Click(object sender, EventArgs e)
 {
     if (BothOperands())
     {
         CalculeazaAfiseaza();
         ClearOperand1();
         operatia     = NoOp;
         clearDisplay = true;
     }
 }
Exemplo n.º 2
0
 private void ClearAll()
 {
     //labelOperand1.Text = "";
     //textBoxAfisaj.Text = "";
     //strOperand1 = "";
     //strOperand2 = "";
     //operatia = NoOp;
     //clearDisplay = true;
     operand1 = operand2 = 0;
     ClearAfisaj();
     ClearOperand1();
     clearDisplay = true;
     operatia     = NoOp;
 }
Exemplo n.º 3
0
        private void SetOperatia(Button sender)
        {
            if (sender.Text == "+")
            {
                operatia = Add;
            }
            if (sender.Text == "-")
            {
                operatia = Substract;
            }
            if (sender.Text == "*")
            {
                operatia = Multiply;
            }
            if (sender.Text == "/")
            {
                operatia = Divide;
            }

            ArataOperatia();
        }