Esempio n. 1
0
        private List <ScyllaHideSettingsSection> GetAllSections()
        {
            List <ScyllaHideSettingsSection> result = new List <ScyllaHideSettingsSection>();

            string[] sectionNames = _iniFile.GetSectionNames();

            for (int i = 0; i < sectionNames.Length; i++)
            {
                if (CurrentProfileSection != sectionNames[i])
                {
                    ScyllaHideSettingsSection section = new ScyllaHideSettingsSection(sectionNames[i]);
                    section.ReadSectionSettings(_iniFile);
                    result.Add(section);
                }
            }

            return(result);
        }
Esempio n. 2
0
        private ScyllaHideSettingsSection GetCurrentSelectedSection(List <ScyllaHideSettingsSection> sections)

        {
            string name = _iniFile.Read(SelectedProfileSetting, CurrentProfileSection);
            ScyllaHideSettingsSection result = null;

            for (int i = 0; i < sections.Count; i++)
            {
                if (sections[i].SectionName == name)
                {
                    result = sections[i];
                }
            }

            if (result != null)
            {
                return(result);
            }

            return(sections[0]);
        }
Esempio n. 3
0
 public ScyllaHideSettings()
 {
     _iniFile = new IniFile(FileName);
     Sections = GetAllSections();
     CurrentSelectedSection = GetCurrentSelectedSection(Sections);
 }