Exemplo n.º 1
0
 private void BgWorkerSearch(DataTable kwDataTable)
 {
     IList<ClickerModel> clickerModellist = DAO.GetClickerModelList();
     foreach (ClickerModel model in clickerModellist)
     {
         if (!model.Enabled)
         {
             continue;
         }
         IEHandleUtils.ClearIECookie();
         IEHandleUtils.ClearIECache();
         searcher = new Searcher(this, model);
         int[] result = searcher.DoSearchClick();
         if (result[0] == 1)
         {
             model.ClickedNum = model.ClickedNum + 1;
             model.PageRank = result[1];
             DAO.UpdateClicker(model);
             UpdateDataView(kwDataTable, model);
         }
         searcher = null;
         if (this._shouldStop)
         {
             break;
         }
     }
 }
Exemplo n.º 2
0
        private void DoSearch(DataTable dt)
        {
            foreach (DataRow dr in dt.Rows)
            {
                bool isRun = System.Boolean.Parse(dr[4].ToString());
                if (!isRun)
                {
                    continue;
                }
                string companySite = (string)dr[1];
                string keyword = (string)dr[2];
                string productid = (string)dr[3];
                Int64 hitStr = (Int64)dr[5];
                searcher = new Searcher(this, keyword, productid, companySite);
                int[] result = searcher.DoSearchClick();
                if (result[0] == 1)
                {
                    dr[5] = hitStr + 1;
                    dr[6] = result[1] + "";
                }

                searcher = null;
                if (this._shouldStop)
                {
                    return;
                }
            }
        }