private void btnApagarCampo_Click(object sender, EventArgs e) { Visor2.Clear(); valor1 = 0; valor2 = 0; Visor.Clear(); Visor.Focus(); }
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(); }
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(); }
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(); }