private void txtBinIn_Leave(object sender, EventArgs e) { if (!NumeroBinario.Validar(txtBinIn.Text)) { txtBinIn.Focus(); } }
private void button1_Click(object sender, EventArgs e) { if (NumeroBinario.Validar(txtBinIn.Text)) { txtDecOut.Text = Conversor.BinarioDecimal(txtBinIn.Text).ToString(); } else { txtBinIn.Focus(); } }