private void lstNetworks_SelectionChanged(object sender, SelectionChangedEventArgs e) { WifiDetails wifiDetails = (WifiDetails)lstNetworks.SelectedItems[0]; wifiName = wifiDetails.SSID; encryptionLevel = wifiDetails.Encryption; wifiStrength = wifiDetails.Strength; Console.WriteLine(wifiDetails.SSID); //Used to set the variable application wide = name Application.Current.Resources["ApplicationScopeSSID"] = wifiName; }
public void ShowWifiDetails(string args) { WifiDetails wifiDetails = SomneoApiClient.GetWifiDetails(); if (wifiDetails == null) { Console.WriteLine("Unable to retrieve the wifi details."); return; } Console.WriteLine( $@"Wifi details: SSID: {wifiDetails.SSID} Protection: {wifiDetails.Protection} IP address: {wifiDetails.IPAddress} Netmask: {wifiDetails.Netmask} Gateway IP: {wifiDetails.Gateway} MAC address: {wifiDetails.MACAddress}"); }