I have the following code which is used to get various details about wireless networks;
// Lists all networks ssid, signal stregth, availability, & security
Wlan.WlanAvailableNetwork[] networks = wlanIface.GetAvailableNetworkList(0);
foreach (Wlan.WlanAvailableNetwork network in networks)
listBox1.Items.Add(GetStringForSSID(network.dot11Ssid));
foreach (Wlan.WlanAvailableNetwork network in networks)
listBox2.Items.Add(network.wlanSignalQuality + "%");
foreach (Wlan.WlanAvailableNetwork network in networks)
listBox3.Items.Add(network.wlanNotConnectableReason);
foreach (Wlan.WlanAvailableNetwork network in networks)
listBox4.Items.Add(network.securityEnabled);
Currently, each detail is stored in a different listbox.
I have changed the code to the following;
// Lists all networks ssid, signal stregth, availability, & security
Wlan.WlanAvailableNetwork[] networks = wlanIface.GetAvailableNetworkList(0);
foreach (Wlan.WlanAvailableNetwork network in networks)
listView1.Items.Add(GetStringForSSID(network.dot11Ssid));
foreach (Wlan.WlanAvailableNetwork network in networks)
listView1.Items.Add(network.wlanSignalQuality + "%");
foreach (Wlan.WlanAvailableNetwork network in networks)
listView1.Items.Add(network.wlanNotConnectableReason);
foreach (Wlan.WlanAvailableNetwork network in networks)
listView1.Items.Add(network.securityEnabled);
All that happens is that all the data is written to the first column in a long list.
I know the code above (listVIew1.Items.Add) is wrong but can someone explain to me what the code is to get each foreach loop to place it's data in a new column.
Thanks in advance