Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            string    postData = "__VIEWSTATE=dDwtMTM2MTgxNTk4OTs7PkB6%2BSk5sY52cPSnKtSRXI8QsKFr&TextBox1=2011060701309&TextBox2=13434034377feiyu&ddl_js=%D1%A7%C9%FA&Button1=+%B5%C7+%C2%BC+";
            BasicInfo logInfo  = new BasicInfo("http://" + Service.Config.Host + "/default3.aspx", "post", postData, null);

            logInfo.Request();

            if (logInfo.Status)
            {
                Service.isLog(logInfo.PageBody);
                String s  = Service.Config.Scores;
                String s1 = Service.Config.Log;
                String s2 = Service.Config.Main;

                BasicInfo logInfo2 = new BasicInfo("http://" + Service.Config.Host + "/xscjcx.aspx?xh=2011060701309", "post", "", logInfo.Collection);
                logInfo2.Request();


                #region 分析网页html节点
                Lexer    lexer     = new Lexer(logInfo2.PageBody);
                Parser   parser    = new Parser(lexer);
                NodeList htmlNodes = parser.Parse(null);
                this.treeView1.Nodes.Clear();
                this.treeView1.Nodes.Add("root");

                IList list = new ArrayList();

                TreeNode treeRoot = this.treeView1.Nodes[0];
                for (int i = 0; i < htmlNodes.Count; i++)
                {
                    this.RecursionHtmlNode(list, treeRoot, htmlNodes[i], false);
                }

                #endregion
            }
        }