public static BluetoothLEDeviceInfo ShowBox(Window parent, bool pair = true) { BLESelect win = new BLESelect(parent, pair); win.ShowDialog(); return(win.SelectedBLE); }
private void btnConnect_Click(object sender, RoutedEventArgs e) { var device = BLESelect.ShowBox(this.parent, true); if (device != null) { this.IsBusy = true; DI.Wrapper.BLE_DeviceConnectResult += this.DeviceConnectResultHandler; DI.Wrapper.BLE_ConnectAsync(device); } }