private async void OnFindDevice(object sender, g.FIDO2.CTAP.BLE.BLEAuthenticatorScanner.FindDeviceEventArgs e) { scannerBLE.Stop(); addressBLE = e.BluetoothAddress; var ret = await this.connectBLE(); if (ret == false) { return; } // UIスレッドで実行するおまじない var ignored = this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(async() => { var app = (MainWindow)Application.Current.MainWindow; var att = await app.Register(conBLE, app.RPID, app.Challenge, this.TextPIN.Text); if (att == null) { return; } if (page == null) { page = new Page11(att); } this.NavigationService.Navigate(page); })); }
private async void MakeCredential_Click(object sender, RoutedEventArgs e) { var app = (MainWindow)Application.Current.MainWindow; var att = await app.Register(app.GetFirstUSBConnector(), app.RPID, app.Challenge, null); if (att == null) { return; } if (page == null) { page = new Page11(att); } this.NavigationService.Navigate(page); }