public void LoadLayoutSectionFromConfiguration(string formLayoutName) { ExceptionHelper.CheckStringIsNullOrEmpty(formLayoutName, "formLayoutName"); PropertyFormLayoutConfigurationElement formLayout = PropertyFormLayoutSettings.GetConfig().Layouts[formLayoutName]; ExceptionHelper.FalseThrow <KeyNotFoundException>(formLayout != null, "不能根据'{0}'找到对应的属性组定义", formLayoutName); LoadPropertiesFromConfiguration(formLayout); }
public void AppendPropertiesFromConfiguration(PropertyFormLayoutConfigurationElement formLayout) { if (formLayout != null) { foreach (PropertyFormSectionConfigurationElement formSectionElement in formLayout.AllSections) { if (this.ContainsKey(formSectionElement.Name)) { if (formSectionElement.AllowOverride) { this.Remove(pd => pd.DisplayName == formSectionElement.Name); this.Add(new PropertyLayoutSectionDefine(formSectionElement)); } } else { this.Add(new PropertyLayoutSectionDefine(formSectionElement)); } } } }
public void LoadPropertiesFromConfiguration(PropertyFormLayoutConfigurationElement formLayout) { this.Clear(); AppendPropertiesFromConfiguration(formLayout); }