コード例 #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");
     }
 }
コード例 #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; });
     }
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: Walid-Shouman/AsTeRICS
 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; });
     }
 }