Пример #1
0
 static public void AppendStyleString(ref String paStyleString, CSSStyle paStyle, String paValue)
 {
     if (!String.IsNullOrEmpty(paValue))
     {
         paStyleString += paStyle.ToString().Replace("_", "-").ToLower() + ":" + paValue + ";";
     }
 }
Пример #2
0
 public void AddStyle(CSSStyle paStyle, String paValue)
 {
     if (!String.IsNullOrEmpty(paValue))
     {
         clHtmlTextWriter.AddStyleAttribute(paStyle.ToString().Replace("_", "-").ToLower(), paValue);
     }
 }
Пример #3
0
 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);
 }
Пример #4
0
        public void InsertStyle(CSSStyle paStyle, String paValue)
        {
            int lcListIndex;

            if ((lcListIndex = GetStyleListIndex(paStyle)) != -1)
            {
                InsertMultipleStyle(clIncomaptibleStyleList[lcListIndex], paValue);
            }
            else
            {
                clCSSStyleManager.AddStyle(paStyle, paValue);
            }
        }
Пример #5
0
        public void AddStyle(CSSStyle paStyle, String paValue)
        {
            int lcListIndex;

            if ((lcListIndex = GetStyleListIndex(paStyle)) != -1)
            {
                AddMultipleStyle(clIncomaptibleStyleList[lcListIndex], paValue);
            }
            else
            {
                clComponentController.AddStyle(paStyle, paValue);
            }
        }
Пример #6
0
 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("");
     }
 }
Пример #7
0
 public void AddStyle(CSSStyle paStyle, String paValue)
 {
     clStyleList.Add(paStyle.ToString().Replace("_", "-").ToLower() + " : " + paValue);
 }