コード例 #1
0
ファイル: PublicData.cs プロジェクト: oneasonly/TVSender
        private static IniFileList.IniSectionList FindSectionInFolderBySection
            (string section, string path = null, bool duplicate = false)
        {
            string fileEnd = new SavingManager().Key(Setting.FileEndOptions).Value;

            if (path == null)
            {
                path = PublicData.FolderConfigPath;
            }

            FileInfo[] files = new DirectoryInfo(path).GetFiles("*" + fileEnd);
            foreach (var tabFile in files)
            {
                string      filePath = Path.Combine(tabFile.DirectoryName, tabFile.Name);
                IniFileList ini      = new IniFileList();
                ini.Load(filePath);
                var findSection = ini.GetSection(section);
                if (findSection != null)
                {
                    return(findSection);
                }
            }
            return(null);
        }
コード例 #2
0
 // Constuctor so objects are internally managed
 protected internal IniSectionList(IniFileList parent, string sSection)
 {
     m_pIniFile = parent;
     m_sSection = sSection;
     m_keys     = new ListofPairs <string, IniKey>();
 }