Ejemplo n.º 1
0
 private void getMatchResult(MatchResultList list2, string selectDate, string sportId)
 {
     string str5 = null;
     string str4 = null;
     string str3 = "result-token=" + sportId + "%2C1%2C1&action=" + selectDate + "&leagueid=0&startdate=01%2F01%2F0001&names=";
     string str2 = base._objCore.PostRequestAutoCookie(this.GeneratePostRequest(base._strRootURL + "/webroot/restricted/Result/result-data.aspx", base._strRootURL + "/webroot/restricted/Result/Result.aspx", str3.Length, ""), str3, ref str5, ref str4);
     list2.get_SourceList().AddRange(this.GenerateMatchResultListFromText(str2, sportId));
     Thread.Sleep(20);
 }
Ejemplo n.º 2
0
 public override MatchResultList GetMatchResultListFromServer()
 {
     MatchResultList list2 = new MatchResultList();
     string str2 = "";
     string s = "";
     try
     {
         string str4 = null;
         string str5 = null;
         str2 = base._objCore.GetRequestAutoCookie(this.GenerateGetRequest(base._strRootURL + "/Info/Result.aspx", base._strRootURL + "/MenuBet/TopMenu_SLV.aspx", ""), ref str4, ref str5);
         CommonFunction.Log("as1 ok");
         int num = 0;
         s = CommonFunction.substring(str2, 0, "changeDate(\"", "\"", ref num).Trim();
         if (s != string.Empty)
         {
             string str3 = "";
             DateTime time = DateTime.ParseExact(s, "yyyy/MM/dd", null);
             list2.get_SourceList().AddRange(this.GenerateMatchResultListFromText(str2));
             str3 = "i41sport=0&d01day=" + time.AddDays(-1.0).ToString("yyyy/MM/dd").Replace("/", "%2F") + "&s13league=&i20isor=0&i33year=" + time.Year.ToString();
             str5 = null;
             str4 = null;
             str2 = base._objCore.PostRequestAutoCookie(this.GeneratePostRequest(base._strRootURL + "/Info/Result.aspx", base._strRootURL + "/MenuBet/TopMenu_SLV.aspx", str3.Length, ""), str3, ref str5, ref str4);
             CommonFunction.Log("as2 ok");
             list2.get_SourceList().AddRange(this.GenerateMatchResultListFromText(str2));
         }
     }
     catch (Exception exception1)
     {
         ProjectData.SetProjectError(exception1);
         Exception exception = exception1;
         base._objErrorLogger.write(base._strName + ": EXCEPTION IN GetMatchResultListFromServer: " + exception.Message);
         list2 = new MatchResultList();
         ProjectData.ClearProjectError();
     }
     return list2;
 }
Ejemplo n.º 3
0
        public void CheckNewMatchResult(MatchResultList matchResultList)
        {
            List<MatchResult> newMatchResult = new List<MatchResult>();

            List<MatchResult> currentMatchResult = matchResultList.get_SourceList();
            List<MatchResult> previousMatchResult = this._objMatchResultList.get_SourceList();

            foreach (var matchResult in currentMatchResult)
            {
                bool isEqual = false;

                foreach (var result in previousMatchResult)
                {
                      if (matchResult.get_MatchDate() == result.get_MatchDate() &
                        matchResult.get_HomeName() == result.get_HomeName() &
                        matchResult.get_AwayName() == result.get_AwayName())
                    {
                        isEqual = true;
                        break;
                    }
                }

                if (!isEqual)
                {
                    newMatchResult.Add(matchResult);
                }
            }

            if (newMatchResult.Count > 0)
            {
                MatchResultEventHandler matchResultEventHandler = this.matchResultEventHandler;
                if (null != matchResultEventHandler)
                {
                    matchResultEventHandler(this.get_Name(), newMatchResult);
                }
            }

            this._objMatchResultList = matchResultList;
        }
Ejemplo n.º 4
0
 private void getMatchResult(MatchResultList list2,string selectDate,string sportId)
 {
     Thread.Sleep(100);
     string str5 = null;
     string str4 = null;
     // mode=sport&selectDate=2%2F28%2F2011&sportType=5&league=
     string str3 = "mode=sport&selectDate=" + selectDate.Replace("/", "%2F") + "&sportType=" + sportId + "&league=";
     string str2 = base._objCore.PostRequestAutoCookie(this.GeneratePostRequest(base._strRootURL + "/Result.aspx", base._strRootURL + "/Result.aspx", str3.Length, ""), str3, ref str5, ref str4);
     list2.get_SourceList().AddRange(this.GenerateMatchResultListFromText(str2, sportId));
 }