public async Task RefreshWirelessAPList() { this.SetViewState(true); try { this.ssidlist = await SoftAPConfig.GetScanAPsAsync(); this.WirelessAPList.ItemsSource = this.ssidlist.Select(x => x.SSID); } catch { await DisplayAlert("Refresh error", "Could not get wireless networks - are you connected to the Ambient device?", "OK"); } this.SetViewState(false); }
private async void GetPhotonWiFiAsync() { PhotonWiFiListBox.DataContext = null; LoadWiFiProgress.IsActive = true; int maxRetries = 5; List <SoftAPScanAP> setupScanAPs = null; for (int tries = 0; tries < maxRetries; ++tries) { if (setupScanAPs == null) { setupScanAPs = await SoftAPConfig.GetScanAPsAsync(); } } LoadWiFiProgress.IsActive = false; PhotonWiFiListBox.DataContext = setupScanAPs; }