private void SetupCustomSections() { InitializeSections(); foreach (var section in Sections) { var sectionSettings = _settingsReader.GetSection(section); if (sectionSettings == null || sectionSettings.Count == 0) { var settings = DefaultValues[section].Select(x => x.Value.ToString()).ToList(); for (var i = 0; i < settings.Count; ++i) { var index = (i + 1).ToString(); _settingsReader.WriteSetting(section, index, settings[i]); } } else { SectionActivities[section] = sectionSettings.Select(x => x.Value.ToString()).ToList(); } } }