Ejemplo n.º 1
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex > -1)
     {
         BluetootDevice db = (BluetootDevice)listBox1.Items[listBox1.SelectedIndex];
         textBox4.Text = db.address.ToString("X");
     }
 }
Ejemplo n.º 2
0
 public void deviceFound(UInt64 deviceAddress, string deviceName, IntPtr param)
 {
     if (deviceAddress != 0)
     {
         BluetootDevice bd = new BluetootDevice();
         bd.address = deviceAddress;
         bd.name    = deviceName.ToString();
         listBox1.Invoke((MethodInvoker) delegate() { listBox1.Items.Add(bd); });
     }
     else
     {
         progressBar1.Invoke((MethodInvoker) delegate() { progressBar1.Style = ProgressBarStyle.Blocks; });
     }
 }
Ejemplo n.º 3
0
 public void deviceFound(UInt64 deviceAddress, string deviceName, IntPtr param)
 {
     if (deviceAddress != 0)
     {
         BluetootDevice bd = new BluetootDevice();
         bd.address = deviceAddress;
         bd.name = deviceName.ToString();
         listBox1.Invoke((MethodInvoker)delegate() { listBox1.Items.Add(bd); });
     }
     else
     {
         progressBar1.Invoke((MethodInvoker)delegate() { progressBar1.Style = ProgressBarStyle.Blocks; });
     }
 }