/// <summary> /// Gen xsl tag for bookmark /// </summary> /// <param name="name"></param> /// <param name="prefix"></param> /// <param name="xslType"></param> /// <returns></returns> public static string GenKeyForXslTag(string name, XsltType xslType, bool isOpenTag) { switch (xslType) { case XsltType.If: if (isOpenTag) { return(string.Format("{0}{1}", name, ProntoMarkup.KeyStartIf)); } else { return(string.Format("{0}{1}", name, ProntoMarkup.KeyEndIf)); } case XsltType.Foreach: if (isOpenTag) { return(string.Format("{0}{1}", name, ProntoMarkup.KeyStartForeach)); } else { return(string.Format("{0}{1}", name, ProntoMarkup.KeyEndForeach)); } case XsltType.Select: return(string.Format("{0}{1}", name, ProntoMarkup.KeySelect)); case XsltType.Comment: return(string.Format("{0}{1}", name, ProntoMarkup.KeyComment)); } return(name); }
/// <summary> /// Get font color for xsl tag /// </summary> /// <param name="xslType"></param> /// <returns></returns> private WdColor GetFontColor(XsltType xslType) { switch (xslType) { case XsltType.Foreach: return(ProntoMarkup.ForeachColor); case XsltType.If: return(ProntoMarkup.IfColor); default: return(ProntoMarkup.SelectColor); } }
/// <summary> /// Gen text (bookmark value) for xsl tag /// </summary> /// <param name="text"></param> /// <returns></returns> public static string GenTextXslTag(string text, XsltType xslType, bool isOpenTag) { switch (xslType) { case XsltType.Foreach: if (isOpenTag) { return(string.Format(ProntoMarkup.ValueStartForeach, text)); } else { return(string.Format(ProntoMarkup.ValueEndForeach, text)); } case XsltType.If: if (isOpenTag) { return(string.Format(ProntoMarkup.ValueStartIf, text)); } else { return(string.Format(ProntoMarkup.ValueEndIf, text)); } case XsltType.Select: return(string.Format(ProntoMarkup.ValueSelect, text)); case XsltType.Comment: return(ProntoMarkup.ValueComment); default: break; } return(text); }
public InternalBookmarkItem(string key, string bizName, string techName, string itemType, XsltType xslType) : this(key, bizName, techName, itemType) { Type = xslType; }
/// <summary> /// using for check domain /// </summary> /// <param name="bizName"></param> /// <param name="uniqueName"></param> /// <param name="dataType"></param> public InternalBookmarkItem(string bizName, string uniqueName, ProntoDoc.Framework.CoreObject.SQLDBType dataType, XsltType type) : this() { BizName = bizName; UniqueName = uniqueName; DataType = dataType; Type = type; }