Exemplo n.º 1
0
        public static EIBAddress GetRandomAddress()
        {
            Random r = new Random();

            byte[] arr = new byte[2];
            r.NextBytes(arr);
            EIBAddress addr = new EIBAddress(arr, true);

            return(addr);
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 public EIBAddressForm()
 {
     InitializeComponent();
     _current_val = new EIBAddress();
 }
Exemplo n.º 4
0
 public static EIBAddress GetRandomAddress()
 {
     Random r = new Random();
     byte[] arr = new byte[2];
     r.NextBytes(arr);
     EIBAddress addr = new EIBAddress(arr, true);
     return addr;
 }