예제 #1
0
        public CssStyleList ListAllCssStyle(string tagName)
        {
            CssStyleList retVal = new CssStyleList();

            for (Int32 i = 0; i < this[tagName].cssStyles.Count; i++)
            {
                retVal.Add(this[tagName].cssStyles[i]);
            }
            for (Int32 i = 0; i < this[CssHeaderStyleType.UnspecifiedTagName].cssStyles.Count; i++)
            {
                retVal.Add(this[CssHeaderStyleType.UnspecifiedTagName].cssStyles[i]);
            }

            return(retVal);
        }
예제 #2
0
        /// <summary>
        /// update curState based on loaded cssStyle
        /// </summary>
        internal void ApplyCssStyle(HtmlTag applyTag, ref CurrentStateType curState, bool loadNonInherited)
        {
            if (applyTag.StartTag())
            {
                CssStyleList sList = styleList.ListAllCssStyle(applyTag.name);

                foreach (CssStyleType style in sList)
                {
                    if (matchTag(style, applyTag))
                    {
                        loadStyle(style, ref curState, loadNonInherited);
                    }
                }

                if (applyTag.variables.Contains("style") && (applyTag.variables["style"].value != ""))
                {
                    ArrayList aList = Utils.DecodeCssStyle(applyTag.name + " {" +
                                                           applyTag.variables["style"].value
                                                           + "}");

                    foreach (CssStyleType style in aList)
                    {
                        //if (matchTag(style, applyTag))
                        loadStyle(style, ref curState, loadNonInherited);
                    }

//                  if (aList.Count > 0)
//                  {
//                      CssStyleType item = aList[0];
//                      foreach (CssStyleType style in item.styles)
//                          if (matchTag(style, applyTag))
//                              loadStyle(style, ref curState, loadNonInherited);
//
//                  }
                }
            }
        }
예제 #3
0
 public TagCssStyleType(string aTagName) : base()
 {
     tagName   = aTagName;
     cssStyles = new CssStyleList();
 }
예제 #4
0
 public TagCssStyleType(string aTagName)
     : base()
 {
     tagName = aTagName;
     cssStyles = new CssStyleList();
 }
예제 #5
0
        public CssStyleList ListAllCssStyle(string tagName)
        {
            CssStyleList retVal = new CssStyleList();

            for (Int32 i = 0; i < this[tagName].cssStyles.Count; i++)
                retVal.Add(this[tagName].cssStyles[i]);
            for (Int32 i = 0; i < this[CssHeaderStyleType.UnspecifiedTagName].cssStyles.Count; i++)
                retVal.Add(this[CssHeaderStyleType.UnspecifiedTagName].cssStyles[i]);

            return retVal;
        }