예제 #1
0
 public ITagWord(string tagName, object data, TagWordType tagType, string tagStyle)
 {
     this.TagName  = tagName;
     this.Data     = data;
     this.TagType  = tagType;
     this.TagStyle = tagStyle;
 }
예제 #2
0
 public void SetTag(string tagName, object obj, TagWordType type = TagWordType.Text)
 {
     if (tagName != "" && tagName != null)
     {
         tagName = tagName.Trim();
         GetPropertyOfTag(tagName, obj);
         //GetStype(tagName, obj, type);
     }
 }
예제 #3
0
        /// <summary>
        /// get style of a image tag
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        private void GetStype(string tagName, object obj, TagWordType type)
        {
            string str = obj.ToString();

            if (str.IndexOf(':') == -1)
            {
                lstTag.Add(new ITagWord(tagName, obj, type, ""));
            }
            else
            {
                string[] lstStr = str.Split(':');
                if (lstStr.Length == 2)
                {
                    lstTag.Add(new ITagWord(tagName, lstStr[0], type, lstStr[1]));
                }
            }
        }