//////////////////////////////////////////////////////////////////////////////////////////// public Form1() { btDevice = null; bluetoothLeDevice = null; InitializeComponent(); btDevice = new BleDevice(); btDevice.StartDiscovery(); }
void WriteDeviceList(BleDevice _btDevice) { // Console.WriteLine(" Devices"); lock (_btDevice._locker) { DeviceList.Items.Clear(); int count = 0; for (int index = 0; index < _btDevice.devices.Count; index++) { DeviceInformation deviceInterface = _btDevice.devices[index]; // Console.WriteLine(" " + deviceInterface.Name); DeviceList.Items.Add(deviceInterface.Name); count++; } } }