Пример #1
0
        public static void AddProfiles(ListView lst, WlanClient.WlanInterface wlanIface)
        {
            lst.Groups.Clear();
            lst.Items.Clear();

            foreach (Wlan.WlanProfileInfo profileInfo in wlanIface.GetProfiles())
            {
                if (string.IsNullOrEmpty(profileInfo.profileName))
                {
                    continue;
                }

                XmlSerializer deserializer = new XmlSerializer(typeof(WLANProfile));
                object        profile      = null;
                using (TextReader reader = new StringReader(wlanIface.GetProfileXmlUnencrypted(profileInfo.profileName)))
                {
                    profile = deserializer.Deserialize(reader);
                }

                if (profile == null)
                {
                    continue;
                }

                AddProfilesInformation(lst, (WLANProfile)profile);
            }
        }