public static IsNetworkOpen ( WiFiAvailableNetwork network ) : bool | ||
network | WiFiAvailableNetwork | |
리턴 | bool |
private async void ConnectButton_Click(object sender, RoutedEventArgs e) { try { EnableView(false, true); var button = sender as Button; var network = button.DataContext as WifiListViewItemPresenter; if (NetworkPresenter.IsNetworkOpen(network)) { await ConnectToWifiAsync(network, null, Window.Current.Dispatcher); } else if (network.IsEapAvailable) { SwitchToItemState(network, WifiEapPasswordState, false); } else { SwitchToItemState(network, WifiPasswordState, false); } } catch (Exception ex) { Log.Trace(ex.ToString()); throw; } finally { EnableView(true, true); } }
private void ConnectButton_Tapped(object sender, TappedRoutedEventArgs e) { var button = sender as Button; var network = button.DataContext as WiFiAvailableNetwork; if (NetworkPresenter.IsNetworkOpen(network)) { ConnectToWifi(network, null, Window.Current.Dispatcher); } else { SwitchToItemState(network, WifiPasswordState); } }
private async void ConnectButton_Clicked(object sender, RoutedEventArgs e) { try { EnableView(false); var button = sender as Button; var network = button.DataContext as WiFiAvailableNetwork; if (NetworkPresenter.IsNetworkOpen(network)) { await ConnectToWifiAsync(network, null, Window.Current.Dispatcher); } else { SwitchToItemState(network, WifiPasswordState, false); } } finally { EnableView(true); } }