Пример #1
0
        public void LoadLayoutSectionFromConfiguration(string formLayoutName)
        {
            ExceptionHelper.CheckStringIsNullOrEmpty(formLayoutName, "formLayoutName");

            PropertyFormLayoutConfigurationElement formLayout = PropertyFormLayoutSettings.GetConfig().Layouts[formLayoutName];

            ExceptionHelper.FalseThrow <KeyNotFoundException>(formLayout != null, "不能根据'{0}'找到对应的属性组定义", formLayoutName);

            LoadPropertiesFromConfiguration(formLayout);
        }
Пример #2
0
 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));
             }
         }
     }
 }
Пример #3
0
        public void LoadPropertiesFromConfiguration(PropertyFormLayoutConfigurationElement formLayout)
        {
            this.Clear();

            AppendPropertiesFromConfiguration(formLayout);
        }