public ITagWord(string tagName, object data, TagWordType tagType, string tagStyle) { this.TagName = tagName; this.Data = data; this.TagType = tagType; this.TagStyle = tagStyle; }
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); } }
/// <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])); } } }