public SectionList Load() { _sections.Clear(); LoadSections(); ForEachSetting(ValidateSetting); return(GetActiveSections()); }
private void LoadFromFile(string file) { var contract = Serializer <Contract> .Deserialize(File.ReadAllText(file)); if (contract != null) { MyModel = contract; MyModuleType = contract.ModuleType; } // get list of sections // reset SectionList.Clear(); // update _dataFactory.DbSource = DbSource; // populate SectionList name of Sections var dataEntryContract = _dataFactory.GetMetaQueryable <DataEntryContract>().FirstOrDefault(d => d.ModuleType == MyModuleType); if (dataEntryContract != null) { dataEntryContract.Sections.ForEach(s => SectionList.Add(s.Name)); } sectionList.ItemsSource = SectionList; }