Esempio n. 1
0
 private void PZForm_Load(object sender, EventArgs e)
 {
     //PZ_MaxPage = Tool.GetHtmlSourceListMaxPageNum(Tool.SetPostParams(), Tool.strLoginUrl, Tool.strTargerUrlListPZ + PZ_page);
     //this.CrawlerLog.Items.Add(string.Format("共{0}页", PZ_MaxPage));
     ////autoCrawler = new AutoCrawler("PZ",this.gridControl1);
     pzUtils = new PZUtils("PZ", this.gridControl1, this.CrawlerLog);
 }
Esempio n. 2
0
 //开始自动抓取
 private void PZ_Start()
 {
     try
     {
         this.CrawlerLog.Invoke(new Action(() =>
         {
             this.CrawlerLog.Items.Add(string.Format("{0} 开始抓取配置信息  ", DateTime.Now.ToString("G")));
         }));
         string param = queryParam("PZ");
         pzUtils = new PZUtils("PZ", null, this.CrawlerLog);
         pzUtils.Start(param, "", "");
     }
     catch (Exception ex)
     {
         MessageBox.Show("抓取配置信息开始异常:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Esempio n. 3
0
 private void AllForm_Load(object sender, EventArgs e)
 {
     //填充待抓取的数据资源名称
     //DataTable dtName = new DataTable();
     //dtName.Columns.Add("check", System.Type.GetType("System.Boolean"));
     //dtName.Columns["check"].ReadOnly = false;
     //dtName.Columns.Add("name", System.Type.GetType("System.String"));
     //for (int i = 0; i < tableNames.Length; i++)
     //{
     //    dtName.Rows.Add(false, tableNames[i]);
     //}
     //this.gcName.DataSource = dtName;
     hgzUtils           = new HGZUtils("HGZ", null, this.CrawlerLog);
     pzUtils            = new PZUtils("PZ", null, this.CrawlerLog);
     wsUtils            = new WSUtils("WS", null, this.CrawlerLog);
     hgzUtilsPool       = new HGZUtilsThreadPool("HGZ", null, this.CrawlerLog);
     this.txtTime.Text  = Settings.Default.RunT;
     this.txtTime.Text  = Settings.Default.RunMinute;
     this.dtStart1.Text = DateTime.Now.Date.AddDays(-1).ToString();
 }
Esempio n. 4
0
        //查询
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            pzUtils = new PZUtils("PZ", this.gridControl2, this.label1);
            string param = queryParam();

            try
            {
                this.barBtnItemStart.Enabled = false;
                this.barBtnStop.Enabled      = true;
                //this.CrawlerLog.Items.Add(string.Format("{0} 开始抓取配置信息  ", DateTime.Now.ToString("G")));
                this.label1.Invoke(new Action(() =>
                {
                    this.label1.Text = string.Format("{0} 开始抓取配置信息  ", DateTime.Now.ToString("G"));
                }));


                pzUtils.Start(param, this.txtFrom.Text, this.txtTo.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show("抓取配置信息开始异常:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }