Example #1
0
 public HTMLNode(string tagName)
 {
     this.b = new HTMLNodes();
     this.c = new Params();
     this.g = new Csss();
     this.d = tagName.Trim();
     this.db();
     this.f = false;
 }
Example #2
0
        public Csss Clone()
        {
            Csss csss = new Csss();

            for (int i = 0; i < this.Css.Count; i++)
            {
                Css css = this.a[i];
                csss.Css.Add(css);
            }
            return(csss);
        }
Example #3
0
 public async Task ParseCss(Params param)
 {
     if (this.g == null)
     {
         this.g = new Csss();
     }
     else if (this.d.Equals("link"))
     {
         Param  obj = this.Param.ByName("href");
         string url = "";
         if (obj != null)
         {
             url = obj.Value.Trim();
         }
         if (!(url != ""))
         {
             return;
         }
         try
         {
             this.da(new StreamReader(await NetHelper.Get(url)).ReadToEnd());
             this.d = "style";
         }
         catch
         {
         }
     }
     else
     {
         for (int index = 0; index < param.Count; ++index)
         {
             if (param[index].Name.ToLower().Equals("style"))
             {
                 this.ParseStyleString(param[index].Value.ToLower(), CssType.ForAll, "");
             }
             else if (HTMLTree.IsCss2(param[index].Name))
             {
                 this.g.SetNameValue(param[index].Name.ToLower(), param[index].Value.ToLower(), CssType.ForAll, "");
             }
         }
     }
 }