private async void button16_Click_1(object sender, EventArgs e) { string parameters = textBox3.Text.ToString(); listDevice.Items.Clear(); listStatus.Items.Add("Start Scan"); // var result = ble2.StartScan(parameters, (d) => listStatus.Items.Add(d)); var result = ble2.StartScan(parameters, (d) => { }); listStatus.Items.Add(result.ToString()); if (result.Equals(ERROR_CODE.BLE_FOUND_DEVICE)) { var error_code = await ble2.OpenDevice(parameters); listStatus.Items.Add($"Connection Result: {error_code}"); } }
private void button1_Click(object sender, EventArgs e) { listDevice.Items.Clear(); ble.StartScan(); listStatus.Items.Add("Start Scan"); }