static public void AppendStyleString(ref String paStyleString, CSSStyle paStyle, String paValue) { if (!String.IsNullOrEmpty(paValue)) { paStyleString += paStyle.ToString().Replace("_", "-").ToLower() + ":" + paValue + ";"; } }
public void AddStyle(CSSStyle paStyle, String paValue) { if (!String.IsNullOrEmpty(paValue)) { clHtmlTextWriter.AddStyleAttribute(paStyle.ToString().Replace("_", "-").ToLower(), paValue); } }
private int GetStyleListIndex(CSSStyle paStyle) { for (int lcCount = 0; lcCount < clIncomaptibleStyleList.GetLength(0); lcCount++) { if (clIncomaptibleStyleList[lcCount][0].ToUpper() == paStyle.ToString().Replace("_", "-").ToUpper()) { return(lcCount); } } return(-1); }
public void InsertStyle(CSSStyle paStyle, String paValue) { int lcListIndex; if ((lcListIndex = GetStyleListIndex(paStyle)) != -1) { InsertMultipleStyle(clIncomaptibleStyleList[lcListIndex], paValue); } else { clCSSStyleManager.AddStyle(paStyle, paValue); } }
public void AddStyle(CSSStyle paStyle, String paValue) { int lcListIndex; if ((lcListIndex = GetStyleListIndex(paStyle)) != -1) { AddMultipleStyle(clIncomaptibleStyleList[lcListIndex], paValue); } else { clComponentController.AddStyle(paStyle, paValue); } }
protected string WriteHead() { try { int indentLevel = 1; string indentStr = GetIndentStr(indentLevel); string htmlStr = ""; htmlStr += "<head>\n"; htmlStr += (indentStr + "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n"); // declare it is a UTF-8 document>"); htmlStr += (indentStr + string.Format("<title>{0}</title>\n", m_TextWork.GetTitle())); htmlStr += (indentStr + CSSStyle.BuildStyle()); htmlStr += "</head>"; return(htmlStr); } catch (Exception ex) { Globals.m_Logger.Error(ex.ToString()); return(""); } }
public void AddStyle(CSSStyle paStyle, String paValue) { clStyleList.Add(paStyle.ToString().Replace("_", "-").ToLower() + " : " + paValue); }