예제 #1
0
파일: SingBet.cs 프로젝트: yjtang/AutoBws
 protected override void GeneralSpiderProcess(object o, DoWorkEventArgs e)
 {
     try
     {
         string str;
         string str2;
         string str3;
         if ((DateTime.Now.Second % 6) == 0)
         {
             str2 = null;
             str3 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/app/member/select.php?uid=" + this._strUID + "&langx=en-us&act=1&show=undefined", base._strRootURL + "/app/member/select.php?uid=" + this._strUID + "&rtype=re&langx=en-us&show=N", ""), ref str2, ref str3);
             this.ExtractAccountInfoBetCreditFromText(str, ref this._decAccountBetCredit, ref this._strAccountCurrency);
             str3 = null;
             str2 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/app/member/FT_browse/body_var.php?uid=" + this._strUID + "&rtype=re&langx=en-us&mtype=4&delay=&league_id=", base._strRootURL + "/app/member/FT_browse/body_var.php?uid=" + this._strUID + "&rtype=re&langx=en-us&mtype=4&delay=&league_id=", ""), ref str3, ref str2);
             base._objRunningPageOptionList = this.GenerateRunningPageOptionListFromText(str);
             str3 = null;
             str2 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/app/member/FT_browse/body_var.php?uid=" + this._strUID + "&rtype=r&langx=en-us&mtype=4&delay=&league_id=", base._strRootURL + "/app/member/FT_browse/body_var.php?uid=" + this._strUID + "&rtype=re&langx=en-us&mtype=4&delay=&league_id=", ""), ref str3, ref str2);
             base._objTodayPageOptionList = this.GenerateTodayPageOptionListFromText(str);
             str3 = null;
             str2 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/app/member/FT_future/body_var.php?uid=" + this._strUID + "&rtype=r&langx=en-us&g_date=&mtype=4&league_id=", base._strRootURL + "/app/member/FT_browse/body_var.php?uid=" + this._strUID + "&rtype=re&langx=en-us&mtype=4&delay=&league_id=", ""), ref str3, ref str2);
             base._objEarlyPageOptionList = this.GenerateEarlyPageOptionListFromText(str);
             this.CheckMinCreditLimit();
         }
         if (base._isToCheckBetlist && ((DateTime.Now.Second % base._intServerBetlistRefreshRateSec) == 0))
         {
             StringList list = new StringList();
             str3 = null;
             str2 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/app/member/today/today_wagers.php?uid=" + this._strUID + "&langx=en-us", base._strRootURL + "/app/member/FT_header.php?uid=" + this._strUID + "&showtype=&langx=en-us&mtype=4", ""), ref str3, ref str2);
             this.GenerateBetListRefIDList(str, ref this._objBetlistAcceptedRefIDList, ref this._objBetlistRejectedRefIDList, ref list);
             SpiderFunction.UpdateReceiptStatusToBetList(ref this._objProgramBetListPermanent, base._objBetlistAcceptedRefIDList, base._objBetlistRejectedRefIDList);
             if (list.get_SourceList().Count == 0)
             {
                 this.CheckAccountSwitching();
             }
         }
     }
     catch (Exception exception1)
     {
         ProjectData.SetProjectError(exception1);
         Exception exception = exception1;
         base._objErrorLogger.write(base._strName + ": EXCEPTION IN GeneralSpiderProcess: " + exception.Message);
         base._objBGWorkerInfoSpider.ReportProgress(2, base._strName + ": EXCEPTION IN GeneralSpiderProcess: " + exception.Message);
         ProjectData.ClearProjectError();
     }
 }
예제 #2
0
파일: SB188.cs 프로젝트: yjtang/AutoBws
 protected override void GeneralSpiderProcess(object o, DoWorkEventArgs e)
 {
     try
     {
         string str;
         string str2;
         string str3;
         if ((DateTime.Now.Second % 6) == 0)
         {
             str2 = null;
             str3 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/Info/UserProfile.aspx?" + base._strAccountID, base._strRootURL + "/Default.aspx", ""), ref str2, ref str3);
             this.ExtractAccountInfoFromText(str, ref this._decAccountCredit, ref this._decAccountBetCredit, ref this._strAccountCurrency);
             str3 = null;
             str2 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/Info/OpenBet.aspx?s21mc=" + base._strAccountID, base._strRootURL + "/Default.aspx", ""), ref str3, ref str2);
             str3 = Conversions.ToString(base._decAccountOutstanding);
             this.ExtractOutstandingFromText(str, ref str3);
             base._decAccountOutstanding = Conversions.ToDecimal(str3);
             object instance = "s11NavAction=6";
             str3 = null;
             str2 = null;
             str = base._objCore.PostRequestAutoCookie(this.GeneratePostRequest(base._strRootURL + "/MenuBet/TopNav.aspx", base._strRootURL + "/MenuBet/TopMenu_SLV.aspx", Conversions.ToInteger(NewLateBinding.LateGet(instance, null, "Length", new object[0], null, null, null)), ""), Conversions.ToString(instance), ref str3, ref str2);
             this.ExtractCashBalanceFromText(str, ref this._decAccountCash);
             this.CheckMinCreditLimit();
         }
         if (base._isToCheckBetlist && ((DateTime.Now.Second % base._intServerBetlistRefreshRateSec) == 0))
         {
             StringList list = new StringList();
             str3 = null;
             str2 = null;
             str = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/Info/OpenBet.aspx?s21mc=" + base._strAccountID, base._strRootURL + "/Default.aspx", ""), ref str3, ref str2);
             this.GenerateBetListRefIDList(str, ref this._objBetlistAcceptedRefIDList, ref this._objBetlistRejectedRefIDList, ref list);
             SpiderFunction.UpdateReceiptStatusToBetList(ref this._objProgramBetListPermanent, base._objBetlistAcceptedRefIDList, base._objBetlistRejectedRefIDList);
             if (list.get_SourceList().Count == 0)
             {
                 this.CheckAccountSwitching();
             }
         }
         if ((base._isToGetMatchResultList && ((DateTime.Now.Minute % 3) == 0)) && ((DateTime.Now.Second % 30) == 0))
         {
             MatchResultList matchResultListFromServer = this.GetMatchResultListFromServer();
             if (matchResultListFromServer.get_SourceList().Count > 0)
             {
                 base._objMatchResultList = matchResultListFromServer;
             }
         }
     }
     catch (Exception exception1)
     {
         ProjectData.SetProjectError(exception1);
         Exception exception = exception1;
         base._objErrorLogger.write(base._strName + ": EXCEPTION IN GeneralSpiderProcess: " + exception.Message);
         base._objBGWorkerInfoSpider.ReportProgress(2, base._strName + ": EXCEPTION IN GeneralSpiderProcess: " + exception.Message);
         ProjectData.ClearProjectError();
     }
 }