Exemplo n.º 1
0
 private void btnApagarCampo_Click(object sender, EventArgs e)
 {
     Visor2.Clear();
     valor1 = 0;
     valor2 = 0;
     Visor.Clear();
     Visor.Focus();
 }
Exemplo n.º 2
0
        private void btnMultiplicação_Click(object sender, EventArgs e)
        {
            if (Visor.Text != "")
            {
                operador     = "*";
                Visor2.Text += "X";
            }

            if (Visor.Text != "")
            {
                valor1 = (float)Convert.ToDouble(Visor.Text);
            }

            Visor.Clear();
            Visor.Focus();
        }
Exemplo n.º 3
0
        private void btnPorcentagem_Click(object sender, EventArgs e)
        {
            if (Visor.Text != "")
            {
                operador     = "%";
                Visor2.Text += "%";
            }

            if (Visor.Text != "")
            {
                valor1 = (float)Convert.ToDouble(Visor.Text);
            }


            Visor.Clear();
            Visor.Focus();
        }
Exemplo n.º 4
0
        private void btnDivisao_Click(object sender, EventArgs e)
        {
            operador = "/";

            if (Visor.Text != "")
            {
                operador     = "/";
                Visor2.Text += "÷";
            }

            if (Visor.Text != "")
            {
                valor1 = (float)Convert.ToDouble(Visor.Text);
            }
            Visor.Clear();
            Visor.Focus();
        }