private async void Page_Loaded(object sender, RoutedEventArgs e) { await server.ActivateAsync(); await server.ListenAllConnectedAsync(); AdapterProfiles = new ObservableCollection <AdapterProfile>( await AdapterProfile.GetListOfAdaptersAsync()); AdapterProfiles.Add(new AdapterProfile(new HostName("127.0.0.1"), "Loopback Connection")); }
private async void appbar_Opened(object sender, object e) { if (p_beforescan.Visibility == Windows.UI.Xaml.Visibility.Visible) { var adapter = await AdapterProfile.GetListOfAdaptersAsync(); AdapterProfiles = new ObservableCollection <AdapterProfile>(adapter); AdapterProfiles.Add(new AdapterProfile(new HostName("127.0.0.1"), "Loopback Connection")); c_adapter.SelectedIndex = 0; } }