Beispiel #1
0
        public void Run()
        {
            mw.State("正在抓取");
            eh = new ExcelHelper(file);

            mw.SetProgressBar(0, total);

            var cmts = this.GetNextCmts();

            while (cmts != null)
            {
                foreach (var cmt in cmts)
                {
                    mw.AddPVB(cmt);
                    mw.AddProgressBar1();

                    //if (stop) break;
                }
                //Thread.Sleep(500);
                //if (stop) break;
                cmts = this.GetNextCmts();
            }
            foreach (var cmt in QQCmts)
            {
                eh.AddRow(cmt);
                mw.AddProgressBar2();
            }
            eh.Save();
            mw.State("完成");
            MessageBox.Show("抓取完成", "完成", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Beispiel #2
0
        public bool Run()
        {
            Thread.Sleep(2000);
            this.eh = new ExcelHelper(file);
            mw.SetProgressBar(0, num);
            var cmts = this.GetNextCmts();

            while (cmts != null)
            {
                foreach (var cmt in cmts)
                {
                    mw.AddPVB(cmt);
                    mw.AddProgressBar1();
                    //if (stop) break;
                }
                Thread.Sleep(1000);
                //if (stop) break;
                cmts = this.GetNextCmts();
                //Thread.Sleep(500);
            }


            foreach (var cmt in SinaCmts)
            {
                eh.AddRow(cmt);
                mw.AddProgressBar2();
            }

            eh.Save();
            mw.State("完成");
            MessageBox.Show("抓取完成", "完成", MessageBoxButtons.OK, MessageBoxIcon.Information);

            return(true);
        }
Beispiel #3
0
        public void Run()
        {
            mw.State("正在抓取");
            eh = new ExcelHelper(file);

            mw.SetProgressBar(0, num);

            var cmts = this.GetNextCmts();

            while (cmts != null)
            {
                foreach (var cmt in cmts)
                {
                    mw.AddPVB(cmt);
                    mw.AddProgressBar1();
                }
                cmts = this.GetNextCmts();
            }

            foreach (var cmt in Cmts)
            {
                eh.AddRow(cmt);
                mw.AddProgressBar2();
            }
            eh.Save();
            mw.State("完成");
            MessageBox.Show("抓取完成", "完成", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }