Beispiel #1
0
        /// <summary>
        /// 设置属性值
        /// </summary>
        /// <param name="attiName"></param>
        /// <param name="vaName"></param>
        /// <param name="inst"></param>
        public void SetAttiValue(string attiName, string vaName, Enum inst)
        {
            string   desp = inst.GetDescription();
            HtmlAtti atti = this.NewOrGetAtti(attiName);

            atti.SetValue(vaName, desp);
        }
Beispiel #2
0
        /// <summary>
        /// 设置属性
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public HtmlAtti NewOrSetAtti(string name, string value)
        {
            HtmlAtti atti = NewOrGetAtti(name);

            atti.Values.Clear();
            atti.NewOrGetAttiValue(name).Value = value;
            return(atti);
        }
Beispiel #3
0
        public HtmlAtti NewOrGetAtti(string name)
        {
            HtmlAtti atti = GetAtti(name);

            if (atti == null)
            {
                atti      = new HtmlAtti();
                atti.Name = name;
                this.Attis.Add(atti);
            }
            return(atti);
        }
Beispiel #4
0
 public HtmlAtti NewOrGetAtti(string name)
 {
     HtmlAtti atti = GetAtti(name);
     if (atti == null)
     {
         atti = new HtmlAtti();
         atti.Name = name;
         this.Attis.Add(atti);
     }
     return atti;
 }