示例#1
0
        /// <summary>
        /// 初始化一个基本的属性集合,包括Key、Name、Description、Enabled几个基本属性
        /// </summary>
        /// <returns></returns>
        private static PropertyValueCollection PrepareServerProperties()
        {
            PropertyValueCollection properties = new PropertyValueCollection();

            PropertyDefineCollection definitions = new PropertyDefineCollection();

            definitions.LoadPropertiesFromConfiguration(WfActivitySettings.GetConfig().PropertyGroups["AllDescriptorProperties"]);

            properties.InitFromPropertyDefineCollection(definitions);

            return(properties);
        }
示例#2
0
        public void ValidatorPropertisRegister()
        {
            PropertyGroupSettings settings = PropertyGroupSettings.GetConfig();
            PropertyGroupConfigurationElementCollection groups = settings.Groups;
            List <ValidatorDefine> validatorDefineList         = new List <ValidatorDefine>();

            foreach (PropertyGroupConfigurationElement element in groups)
            {
                PropertyValueCollection  pvc = new PropertyValueCollection();
                PropertyDefineCollection pdc = new PropertyDefineCollection();
                pdc.LoadPropertiesFromConfiguration(element);
                pvc.InitFromPropertyDefineCollection(pdc);
                validatorDefineList.Add(new ValidatorDefine {
                    ValidatorName = element.Name, PropertyValues = pvc
                });
            }
            string script = string.Format("var arrValidatorDefine={0};", JSONSerializerExecute.Serialize(validatorDefineList));

            this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "RegisterValidatorDefineScript", script, true);
        }
        /// <summary>
        /// 初始化一个基本的属性集合,包括Key、Name、Description、Enabled几个基本属性
        /// </summary>
        /// <returns></returns>
        private static PropertyValueCollection PrepareServerProperties()
        {
            PropertyValueCollection properties = new PropertyValueCollection();

            PropertyDefineCollection definitions = new PropertyDefineCollection();

            definitions.LoadPropertiesFromConfiguration(WfActivitySettings.GetConfig().PropertyGroups["AllDescriptorProperties"]);

            properties.InitFromPropertyDefineCollection(definitions);

            return properties;
        }