private void RbtIPManual_CheckedChanged(object sender, EventArgs e) { if (RbtIPManual.Checked) { TxtIP.Clear(); TxtIP.Enabled = true; } }
private void RbtIPAutomatico_CheckedChanged(object sender, EventArgs e) { if (RbtIPAutomatico.Checked) { try { TxtIP.Clear(); TxtIP.Text = MeuIP.IPv4().ToString().Trim(); TxtIP.Enabled = false; } catch (Exception) { TxtIP.Enabled = true; RbtIPAutomatico.Enabled = false; RbtIPManual.Checked = true; } } }