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 static PropertyFormLayoutSettings GetConfig() { PropertyFormLayoutSettings settings = (PropertyFormLayoutSettings)ConfigurationBroker.GetSection("propertyFormLayoutSettings"); if (settings == null) { settings = new PropertyFormLayoutSettings(); } return(settings); }