コード例 #1
0
 public void ImportProfile(string profileName)
 {
     foreach(string s in IOHandler.GetStoredConfigFilesWithPath())
     {
         // Use xml reader to find profile name in xml file instead of using filename that contains interface name
         XmlReader xmlReader = new XmlReader();
         if(profileName == xmlReader.GetProfileName(s))
         {
             ImportProfileCmd(s);
         }
     }
 }
コード例 #2
0
ファイル: ProfileInfo.cs プロジェクト: faylite/wifi-manager
        /// <summary>
        /// Calls IOHandler.GetStoredConfigFielNames() and filters out the interface name and file extension,
        /// and returns a String List with the profile names
        /// </summary>
        /// <returns>A String List with stored profile names</returns>
        public List<String> GetStoredProfileList()
        {
            XmlReader xmlReader = new XmlReader();

            List<String> returnBuilder = new List<String>();
            foreach(string s in IOHandler.GetStoredConfigFilesWithPath())
            {
                // Match match = Regex.Match(s, @"(?:^\w+-)(.*)(?:\.xml$)", RegexOptions.IgnoreCase);
                // returnBuilder.Add(match.Groups[1].Value);

                returnBuilder.Add(xmlReader.GetProfileName(s));
            }
            return returnBuilder;
        }