Exemplo n.º 1
0
        private void ShowValue()
        {
            List <string> selectValueList = new List <string>();

            if (_isAdd == "modify")
            {
                if (_ele != null)
                {
                    this.txtPropGroupName.Text = _ele.GetAttribute("groupName");
                    XmlNodeList nodes = _ele.SelectNodes("child::item");
                    foreach (XmlElement node in nodes)
                    {
                        if (node.GetAttribute("isUserAdd") == "True")
                        {
                            SelectGroupItem item = new SelectGroupItem(node.GetAttribute("name"), node.GetAttribute("name"));
                            this.conProductPropGroup.Items.Add(item);
                            userProperty.Add(node.GetAttribute("name"));
                        }
                        string name = node.GetAttribute("name");
                        selectValueList.Add(name);
                    }
                    this.conProductPropGroup.SelectedStringValues = selectValueList.ToArray();
                }
            }
        }
Exemplo n.º 2
0
        private void showGroup()
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(PathService.CL_DS_ProductProperty);
            if (doc == null)
            {
                return;
            }
            foreach (XmlNode node in doc.DocumentElement.ChildNodes)
            {
                SelectGroupItem item = new SelectGroupItem(node.Attributes["value"].Value, node.Attributes["text"].Value);
                this.conProductPropGroup.Items.Add(item);
                notUserProperty.Add(item.Text);
            }
        }
Exemplo n.º 3
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            string propName = this.txtAutoDefineProp.Text;

            if (string.IsNullOrEmpty(propName))
            {
                return;
            }
            List <string> list = SelectStart();

            if (list.Contains(propName))
            {
                return;
            }
            SelectGroupItem item = new SelectGroupItem(propName, propName);

            this.conProductPropGroup.Items.Add(item);
            userProperty.Add(propName);
        }
Exemplo n.º 4
0
 /// <summary>
 /// 根据定制特性增加ListBoxPart的子Part类型选项
 /// ZhengHao, 2008年3月11日16时29分
 /// </summary>
 private void BuildSnipAttributeCheckBoxes(PropertyInfo[] propertyInfos)
 {
     //遍历属性集合,propertyInfos含有当前模板类型所对应的页面类型的所有属性
     foreach (PropertyInfo info in propertyInfos)
     {
         object[] snipAttrs = info.GetCustomAttributes(typeof(SnipPartAttribute), false);
         if (snipAttrs.Length <= 0)
         {
             continue;//无定制属性
         }
         //SelectGroupItem sgi = new SelectGroupItem(checkBoxDisplayChannel.Name, checkBoxDisplayChannel.Text);
         //遍历定制特性
         foreach (SnipPartAttribute snipAttr in snipAttrs)
         {
             SelectGroupItem item = new SelectGroupItem(snipAttr.Name, AutoLayoutPanel.GetLanguageText(snipAttr.Text));
             item.Tag = snipAttr;
             selectGroup.Items.Add(item);
         }
     }
 }