Exemple #1
0
        public bool SaveProfileXml(string profileName, WlanInterface wlanIface, bool isProtected = true)
        {
            if (CheckExistsPath(true))
            {
                string path = System.IO.Path.Combine(Path, profileName + ".xml");

                var xml = wlanIface.GetProfileXml(profileName, isProtected);

                if (!string.IsNullOrEmpty(xml))
                {
                    try
                    {
                        File.WriteAllText(path, xml);
                        return(true);
                    }
                    catch
                    {
                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
 public string GetProfileXML()
 {
     if (HasProfile)
     {
         return(_interface.GetProfileXml(Name));
     }
     else
     {
         return(string.Empty);
     }
 }