예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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;
 }