Exemple #1
0
 public static void UpdateReceiptStatusToBetList(ref List<MatchBetNew> listRef1, StringList list1, StringList list2)
 {
     List<MatchBetNew>.Enumerator enumerator = listRef1.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             MatchBetNew current = enumerator.Current;
             if ((current.get_ReceiptID() != string.Empty) && (current.get_ReceiptStatus() == EnumCollection.eBetReceiptStatus.Waiting))
             {
                 if (list1.IsItemExisted(current.get_ReceiptID()))
                 {
                     current.set_ReceiptStatus(EnumCollection.eBetReceiptStatus.Confirm);
                 }
                 else if (list2.IsItemExisted(current.get_ReceiptID()))
                 {
                     current.set_ReceiptStatus(EnumCollection.eBetReceiptStatus.Reject);
                 }
             }
         }
     }
     finally
     {
         enumerator.Dispose();
     }
 }
Exemple #2
0
 public void GenerateBetListRefIDList(string text1, ref StringList listRef1, ref StringList listRef2, ref StringList listRef3)
 {
     string item = "";
     List<string> list = new List<string>();
     List<string> list3 = new List<string>();
     List<string> list4 = new List<string>();
     List<string> list2 = CommonFunction.SeperateStringBySymbol2(text1, "b_rig");
     foreach (string str in list2)
     {
         string str2 = str.ToLower();
         int num = 0;
         item = CommonFunction.substring(str2, 0, "0000cc\">", "<", ref num).Trim().ToUpper();
         if (item != string.Empty)
         {
             if (str2.Contains("pending") | str2.Contains("waiting"))
             {
                 list4.Add(item);
             }
             else
             {
                 if (str2.Contains("cancel") | str2.Contains("reject"))
                 {
                     list3.Add(item);
                     continue;
                 }
                 list.Add(item);
             }
         }
     }
     listRef1.AddIfNotExisted(list);
     listRef2.AddIfNotExisted(list3);
     listRef3.AddIfNotExisted(list4);
 }
Exemple #3
0
 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();
     }
 }
Exemple #4
0
 public void GenerateBetListRefIDList(string text1, ref StringList listRef1, ref StringList listRef2, ref StringList listRef3)
 {
     int num = 0;
     string item = "";
     string str2 = "";
     List<string> list = new List<string>();
     List<string> list2 = new List<string>();
     List<string> list3 = new List<string>();
     while (num > -1)
     {
         item = CommonFunction.substring(text1, num, "FontMidBlue Font12", ">", "<", ref num).Trim();
         if ((item != string.Empty) & (num > -1))
         {
             str2 = CommonFunction.substring(text1, num, "Font12\" style=\"width:80px;\">", "<", ref num).Trim();
             if (str2.Contains("Rejected") | str2.Contains("Void"))
             {
                 list2.Add(item);
             }
             else
             {
                 if (!str2.Contains("Waiting"))
                 {
                     list.Add(item);
                     continue;
                 }
                 list3.Add(item);
             }
         }
     }
     listRef1.AddIfNotExisted(list);
     listRef2.AddIfNotExisted(list2);
     listRef3.AddIfNotExisted(list3);
 }
Exemple #5
0
 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();
     }
 }
Exemple #6
0
 public void GenerateBetListRefIDList(string text1, ref StringList listRef1, ref StringList listRef2, ref StringList listRef3)
 {
     int num = 0;
     string item = "";
     string str2 = "";
     List<string> list = new List<string>();
     List<string> list2 = new List<string>();
     List<string> list3 = new List<string>();
     while (num > -1)
     {
         item = CommonFunction.substring(text1, num, "bettext", ">", "<", ref num).Trim();
         if ((item != string.Empty) & (num > -1))
         {
             str2 = CommonFunction.substring(text1, num, "'remarkCancel'>", "<", ref num).Trim();
             if (str2 == "Danger - Goal")
             {
                 list2.Add(item);
             }
             else
             {
                 if (!str2.Contains("to be confirmed"))
                 {
                     list.Add(item);
                     continue;
                 }
                 list3.Add(item);
             }
         }
     }
     listRef1.AddIfNotExisted(list);
     listRef2.AddIfNotExisted(list2);
     listRef3.AddIfNotExisted(list3);
 }