public static EIBAddress GetRandomAddress() { Random r = new Random(); byte[] arr = new byte[2]; r.NextBytes(arr); EIBAddress addr = new EIBAddress(arr, true); return(addr); }
private void tbDecimal_TextChanged(object sender, System.EventArgs e) { // To hold our converted unsigned type value uint uiDecimal = 0; try { uiDecimal = checked((uint)System.Convert.ToByte(((TextBox)sender).Text)); } catch (System.OverflowException) { this.btnOK.Enabled = false; return; } catch (System.FormatException) { this.btnOK.Enabled = false; return; } this.btnOK.Enabled = true; if (tb1.Text.Length > 0 && tb2.Text.Length > 0 && tb3.Text.Length > 0) { _current_val = new EIBAddress(this.tb1.Text + "/" + this.tb2.Text + "/" + this.tb3.Text); } }
public EIBAddressForm() { InitializeComponent(); _current_val = new EIBAddress(); }
public static EIBAddress GetRandomAddress() { Random r = new Random(); byte[] arr = new byte[2]; r.NextBytes(arr); EIBAddress addr = new EIBAddress(arr, true); return addr; }