Exemplo n.º 1
0
 public List<MatchNew> GenerateFullOddsFromText(string text1, bool flag1, bool flag2, bool flag3, bool flag4)
 {
     ArrayList list2 = new ArrayList();
     string str2 = "";
     int num2 = 0;
     List<MatchNew> list3 = new List<MatchNew>();
     int hour = 0;
     DateTime time = Conversions.ToDate(SpiderFunction.GetEarlyMarketStartTime(DateTime.Now));
     while (num2 > -1)
     {
         str2 = CommonFunction.substring(text1, num2, "Array('", "');", ref num2);
         if (str2 != string.Empty)
         {
             list2 = CommonFunction.SeperateStringBySymbol(str2, "','");
             if (list2.Count >= 0x1c)
             {
                 MatchNew item = new MatchNew();
                 item.set_FT_ID(Conversions.ToString(list2[0]));
                 item.set_UniqueID(item.get_FT_ID());
                 if (list2[1].ToString().ToLower().Contains("h/t"))
                 {
                     item.set_RunningMinutes(0x2d);
                     item.set_RunningStatus(EnumCollection.eRunningStatus.HT);
                     item.set_GameType(EnumCollection.eGameType.Running);
                     item.set_MatchTime(DateTime.Now);
                 }
                 else if (list2[1].ToString().Length <= 2)
                 {
                     item.set_RunningMinutes((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(list2[1]))));
                     item.set_RunningStatus(EnumCollection.eRunningStatus.Running);
                     item.set_GameType(EnumCollection.eGameType.Running);
                     item.set_MatchTime(DateTime.Now);
                 }
                 else if (list2[1].ToString().Length >= 15)
                 {
                     hour = (int) Math.Round(Conversion.Val(list2[1].ToString().Substring(9, 2)));
                     if ((list2[1].ToString().Substring(14, 1).ToLower() == "p") && ((hour >= 1) & (hour <= 11)))
                     {
                         hour += 12;
                     }
                     DateTime time3 = new DateTime(DateTime.Now.Year, (int) Math.Round(Conversion.Val(list2[1].ToString().Substring(0, 2))), (int) Math.Round(Conversion.Val(list2[1].ToString().Substring(3, 2))), hour, (int) Math.Round(Conversion.Val(list2[1].ToString().Substring(12, 2))), 0);
                     item.set_MatchTime(time3);
                     item.set_RunningStatus(EnumCollection.eRunningStatus.DeadBall);
                     item.set_GameType(EnumCollection.eGameType.Today);
                 }
                 if (item.get_GameType() != EnumCollection.eGameType.Running)
                 {
                     if (SpiderFunction.IsEarlyMarket(time, item.get_MatchTime()))
                     {
                         item.set_GameType(EnumCollection.eGameType.Early);
                     }
                 }
                 else
                 {
                     item.set_HomeScore((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(list2[0x12]))));
                     item.set_AwayScore((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(list2[0x13]))));
                 }
                 if (((item.get_GameType() == EnumCollection.eGameType.Running) & flag1) | ((item.get_GameType() != EnumCollection.eGameType.Running) & (flag2 | flag3)))
                 {
                     item.set_League(Conversions.ToString(list2[2]));
                     if (base._objLeagueListSelected.get_IsSelectAll() | this.IsLeagueExistedInSelectedList(item.get_League()))
                     {
                         int num3;
                         item.set_FTHDP_ID(Conversions.ToString(list2[3]));
                         item.set_FTOU_ID(Conversions.ToString(list2[4]));
                         item.set_HomeName(Conversions.ToString(list2[5]));
                         if (item.get_HomeName().Contains("/font"))
                         {
                             num3 = 0;
                             item.set_HomeName(CommonFunction.substring(item.get_HomeName(), 0, ">", "<", ref num3));
                         }
                         item.set_AwayName(Conversions.ToString(list2[6]));
                         if (item.get_AwayName().Contains("/font"))
                         {
                             num3 = 0;
                             item.set_AwayName(CommonFunction.substring(item.get_AwayName(), 0, ">", "<", ref num3));
                         }
                         item.set_FTHDP(Conversions.ToString(list2[8]));
                         if (item.get_FTHDP() != string.Empty)
                         {
                             item.set_FTHDP(SportBookFunction.ConvertHDPDashedTypeWithZero(item.get_FTHDP().Replace(" ", "").Replace("/", "-")));
                         }
                         if (item.get_FTHDP() == "0.0")
                         {
                             item.set_FTAwayColor(Color.Blue);
                             item.set_FTHomeColor(Color.Blue);
                         }
                         else if (Operators.ConditionalCompareObjectEqual(list2[7], "H", false))
                         {
                             item.set_FTAwayColor(Color.Blue);
                             item.set_FTHomeColor(Color.Red);
                         }
                         else
                         {
                             item.set_FTAwayColor(Color.Red);
                             item.set_FTHomeColor(Color.Blue);
                         }
                         item.set_HalfAwayColor(item.get_FTAwayColor());
                         item.set_HalfHomeColor(item.get_FTHomeColor());
                         object[] arguments = new object[1];
                         ArrayList list4 = list2;
                         num3 = 9;
                         arguments[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         object[] objArray2 = arguments;
                         bool[] copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(objArray2[0]);
                         }
                         item.set_FT_HomeOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", objArray2, null, null, copyBack)));
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 10;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         item.set_FT_AwayOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                         if (item.get_GameType() == EnumCollection.eGameType.Running)
                         {
                             item.set_FT_HomeBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_re.php?gid=" + item.get_FT_ID()) + "&uid=" + this._strUID) + "&type=H" + "&gnum=") + item.get_FTHDP_ID() + "&strong=", list2[7]), "&odd_f_type="), this._strOddFType)));
                             item.set_FT_AwayBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_re.php?gid=" + item.get_FT_ID()) + "&uid=" + this._strUID) + "&type=C" + "&gnum=") + item.get_FTOU_ID() + "&strong=", list2[7]), "&odd_f_type="), this._strOddFType)));
                         }
                         else
                         {
                             item.set_FT_HomeBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_r.php?gid=" + item.get_FT_ID()) + "&uid=" + this._strUID) + "&type=H" + "&gnum=") + item.get_FTHDP_ID() + "&strong=", list2[7]), "&odd_f_type="), this._strOddFType)));
                             item.set_FT_AwayBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_r.php?gid=" + item.get_FT_ID()) + "&uid=" + this._strUID) + "&type=C" + "&gnum=") + item.get_FTOU_ID() + "&strong=", list2[7]), "&odd_f_type="), this._strOddFType)));
                         }
                         item.set_FTOU(Conversions.ToString(list2[11]));
                         if (item.get_FTOU() != string.Empty)
                         {
                             item.set_FTOU(SportBookFunction.ConvertHDPDashedTypeWithZero(item.get_FTOU().Substring(1, item.get_FTOU().Length - 1).Replace(" ", "").Replace("/", "-")));
                         }
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 13;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         item.set_FT_UnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 14;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         item.set_FT_OverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                         if (item.get_GameType() == EnumCollection.eGameType.Running)
                         {
                             item.set_FT_UnderBetLink(base._strRootURL + "/app/member/FT_order/FT_order_rou.php?gid=" + item.get_FT_ID() + "&uid=" + this._strUID + "&type=H&gnum=" + item.get_FTHDP_ID() + "&odd_f_type=" + this._strOddFType);
                             item.set_FT_OverBetLink(base._strRootURL + "/app/member/FT_order/FT_order_rou.php?gid=" + item.get_FT_ID() + "&uid=" + this._strUID + "&type=C&gnum=" + item.get_FTOU_ID() + "&odd_f_type=" + this._strOddFType);
                         }
                         else
                         {
                             item.set_FT_UnderBetLink(base._strRootURL + "/app/member/FT_order/FT_order_ou.php?gid=" + item.get_FT_ID() + "&uid=" + this._strUID + "&type=H&gnum=" + item.get_FTHDP_ID() + "&odd_f_type=" + this._strOddFType);
                             item.set_FT_OverBetLink(base._strRootURL + "/app/member/FT_order/FT_order_ou.php?gid=" + item.get_FT_ID() + "&uid=" + this._strUID + "&type=C&gnum=" + item.get_FTOU_ID() + "&odd_f_type=" + this._strOddFType);
                         }
                         if (flag4)
                         {
                             if ((item.get_GameType() == EnumCollection.eGameType.Running) | (list2.Count == 0x2b))
                             {
                                 item.set_GameType(EnumCollection.eGameType.Running);
                                 item.set_Half_ID(Conversions.ToString(list2[20]));
                                 item.set_HalfHDP(Conversions.ToString(list2[0x16]));
                                 if (item.get_HalfHDP() != string.Empty)
                                 {
                                     item.set_HalfHDP(SportBookFunction.ConvertHDPDashedTypeWithZero(item.get_HalfHDP().Replace(" ", "").Replace("/", "-")));
                                 }
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 0x17;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_HomeOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 0x18;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_AwayOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 item.set_Half_HomeBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hre.php?gid=" + item.get_Half_ID()) + "&uid=" + this._strUID) + "&type=H" + "&gnum=") + item.get_FTHDP_ID() + "&strong=", list2[0x15]), "&odd_f_type="), this._strOddFType)));
                                 item.set_Half_AwayBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hre.php?gid=" + item.get_Half_ID()) + "&uid=" + this._strUID) + "&type=C" + "&gnum=") + item.get_FTOU_ID() + "&strong=", list2[0x15]), "&odd_f_type="), this._strOddFType)));
                                 item.set_HalfOU(Conversions.ToString(list2[0x19]));
                                 if (item.get_HalfOU() != string.Empty)
                                 {
                                     item.set_HalfOU(SportBookFunction.ConvertHDPDashedTypeWithZero(item.get_HalfOU().Substring(1, item.get_HalfOU().Length - 1).Replace(" ", "").Replace("/", "-")));
                                 }
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 0x1b;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_UnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 0x1c;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_OverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 item.set_Half_UnderBetLink(base._strRootURL + "/app/member/FT_order/FT_order_hrou.php?gid=" + item.get_Half_ID() + "&uid=" + this._strUID + "&type=H&gnum=" + item.get_FTHDP_ID() + "&odd_f_type=" + this._strOddFType);
                                 item.set_Half_OverBetLink(base._strRootURL + "/app/member/FT_order/FT_order_hrou.php?gid=" + item.get_Half_ID() + "&uid=" + this._strUID + "&type=C&gnum=" + item.get_FTOU_ID() + "&odd_f_type=" + this._strOddFType);
                             }
                             else
                             {
                                 item.set_Half_ID(Conversions.ToString(list2[0x16]));
                                 item.set_HalfHDP(Conversions.ToString(list2[0x18]));
                                 if (item.get_HalfHDP() != string.Empty)
                                 {
                                     item.set_HalfHDP(SportBookFunction.ConvertHDPDashedTypeWithZero(item.get_HalfHDP().Replace(" ", "").Replace("/", "-")));
                                 }
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 0x19;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_HomeOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 0x1a;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_AwayOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 item.set_Half_HomeBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hr.php?gid=" + item.get_Half_ID()) + "&uid=" + this._strUID) + "&type=H" + "&gnum=") + item.get_FTHDP_ID() + "&strong=", list2[0x17]), "&odd_f_type="), this._strOddFType)));
                                 item.set_Half_AwayBetLink(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hr.php?gid=" + item.get_Half_ID()) + "&uid=" + this._strUID) + "&type=C" + "&gnum=") + item.get_FTOU_ID() + "&strong=", list2[0x17]), "&odd_f_type="), this._strOddFType)));
                                 item.set_HalfOU(Conversions.ToString(list2[0x1b]));
                                 if (item.get_HalfOU() != string.Empty)
                                 {
                                     item.set_HalfOU(SportBookFunction.ConvertHDPDashedTypeWithZero(item.get_HalfOU().Substring(1, item.get_HalfOU().Length - 1).Replace(" ", "").Replace("/", "-")));
                                 }
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 0x1d;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_UnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 objArray2 = new object[1];
                                 list4 = list2;
                                 num3 = 30;
                                 objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                                 arguments = objArray2;
                                 copyBack = new bool[] { true };
                                 if (copyBack[0])
                                 {
                                     list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                                 }
                                 item.set_Half_OverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                                 item.set_Half_UnderBetLink(base._strRootURL + "/app/member/FT_order/FT_order_hou.php?gid=" + item.get_Half_ID() + "&uid=" + this._strUID + "&type=H&gnum=" + item.get_FTHDP_ID() + "&odd_f_type=" + this._strOddFType);
                                 item.set_Half_OverBetLink(base._strRootURL + "/app/member/FT_order/FT_order_hou.php?gid=" + item.get_Half_ID() + "&uid=" + this._strUID + "&type=C&gnum=" + item.get_FTOU_ID() + "&odd_f_type=" + this._strOddFType);
                             }
                         }
                         item.set_Website("SingBet");
                         item.set_Type(EnumCollection.eMatchType.Match);
                         item.set_GlobalLastUpdate(DateTime.Now);
                         list3.Add(item);
                     }
                 }
             }
         }
     }
     return list3;
 }
Exemplo n.º 2
0
        public static string GenerateDetailedMatchInfo(MatchNew new1, MatchBetNew new3, MatchBetNew new2, EnumCollection.eBetTarget target1, string text1, string text2)
        {
            string str4 = "";
            string str3 = "";
            double num = 0.0;
            switch (target1)
            {
                case EnumCollection.eBetTarget.FT_Home:
                    str3 = new1.get_FTHDP();
                    str4 = new1.get_FT_AwayOddsString();
                    num = new1.get_FTHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.FT_Away:
                    str3 = new1.get_FTHDP();
                    str4 = new1.get_FT_HomeOddsString();
                    num = new1.get_FTHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.FT_Over:
                    str3 = new1.get_FTOU();
                    str4 = new1.get_FT_UnderOddsString();
                    num = new1.get_FTOU_Commission();
                    break;

                case EnumCollection.eBetTarget.FT_Under:
                    str3 = new1.get_FTOU();
                    str4 = new1.get_FT_OverOddsString();
                    num = new1.get_FTOU_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Home:
                    str3 = new1.get_HalfHDP();
                    str4 = new1.get_Half_AwayOddsString();
                    num = new1.get_HalfHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Away:
                    str3 = new1.get_HalfHDP();
                    str4 = new1.get_Half_HomeOddsString();
                    num = new1.get_HalfHDP_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Over:
                    str3 = new1.get_HalfOU();
                    str4 = new1.get_Half_UnderOddsString();
                    num = new1.get_HalfOU_Commission();
                    break;

                case EnumCollection.eBetTarget.Half_Under:
                    str3 = new1.get_HalfOU();
                    str4 = new1.get_Half_OverOddsString();
                    num = new1.get_HalfOU_Commission();
                    num = new1.get_HalfOU_Commission();
                    break;
            }
            return ("\r\n============================================================\r\n" + text1 + "\r\n============================================================\r\nLeague: " + new2.get_League() + "\r\nHome: " + new3.get_HomeName() + "\r\nAway: " + new3.get_AwayName() + "\r\nBet: " + new3.get_SelectedMatch() + "\r\nHDP: " + new3.get_HDP() + "\r\nOdd: " + new3.get_OddsString() + "\r\nNew HDP: " + new2.get_HDP() + "\r\nNew Odd: " + new2.get_OddsString() + "\r\n" + text2 + " HDP: " + str3 + "\r\n" + text2 + " Opponent Odd: " + str4 + "\r\n" + text2 + " Commission: " + num.ToString() + "\r\nAmount: " + new2.get_BetAmount() + "\r\n============================================================");
        }
Exemplo n.º 3
0
        private void GetTicketAndBetFromAgent(MatchBetNew new4, MatchNew new1, EnumCollection.eBetTarget target1, int num1, AgentToClientBet bet1)
        {
            MatchBetNew new3 = new MatchBetNew();
            MatchBetNew new2 = new MatchBetNew();
            try
            {
                string requestUriString = "";
                string str7 = "";
                string str5 = "1";
                string str6 = "1";
                base._isBetting = true;
                base._datTicketStart = DateTime.Now;
                requestUriString = base._strRootURL + "/MenuBet/BetSlipProc.aspx";
                switch (target1)
                {
                    case EnumCollection.eBetTarget.FT_Home:
                    case EnumCollection.eBetTarget.FT_Away:
                    case EnumCollection.eBetTarget.FT_Over:
                    case EnumCollection.eBetTarget.FT_Under:
                        if ((new1.get_FTHomeColor() == Color.Blue) & (new1.get_FTAwayColor() == Color.Red))
                        {
                            str5 = "0";
                        }
                        break;

                    case EnumCollection.eBetTarget.Half_Home:
                    case EnumCollection.eBetTarget.Half_Away:
                    case EnumCollection.eBetTarget.Half_Over:
                    case EnumCollection.eBetTarget.Half_Under:
                        if ((new1.get_HalfHomeColor() == Color.Blue) & (new1.get_HalfAwayColor() == Color.Red))
                        {
                            str5 = "0";
                        }
                        break;
                }
                if (new1.get_GameType() == EnumCollection.eGameType.Early)
                {
                    str6 = "2";
                }
                if (new1.get_GameType() == EnumCollection.eGameType.Running)
                {
                    switch (target1)
                    {
                        case EnumCollection.eBetTarget.FT_Home:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=H&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "RB", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTHDP()).ToString(), new1.get_FT_HomeOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.FT_Away:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=A&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "RB", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTHDP()).ToString(), new1.get_FT_AwayOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.FT_Over:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=H&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "RBOU", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTOU()).ToString(), new1.get_FT_OverOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.FT_Under:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=A&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "RBOU", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTOU()).ToString(), new1.get_FT_UnderOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Home:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=1&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "30", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfHDP()).ToString(), new1.get_Half_HomeOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Away:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=2&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "30", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfHDP()).ToString(), new1.get_Half_AwayOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Over:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=4&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "31", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfOU()).ToString(), new1.get_Half_OverOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Under:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=5&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "31", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfOU()).ToString(), new1.get_Half_UnderOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;
                    }
                }
                else
                {
                    switch (target1)
                    {
                        case EnumCollection.eBetTarget.FT_Home:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=H&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "AH", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTHDP()).ToString(), new1.get_FT_HomeOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.FT_Away:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=A&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "AH", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTHDP()).ToString(), new1.get_FT_AwayOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.FT_Over:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=H&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "OU", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTOU()).ToString(), new1.get_FT_OverOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.FT_Under:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=A&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "OU", new1.get_FT_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_FTOU()).ToString(), new1.get_FT_UnderOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Home:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=1&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "7", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfHDP()).ToString(), new1.get_Half_HomeOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Away:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=2&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "7", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfHDP()).ToString(), new1.get_Half_AwayOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Over:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=4&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "8", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfOU()).ToString(), new1.get_Half_OverOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;

                        case EnumCollection.eBetTarget.Half_Under:
                            str7 = string.Format("s11Mode=SINGLE&i31SportID=0&s12StakeType={0}&s11Period=" + str6 + "&s13EventNo={1}&s21Home=" + str5 + "&s13Selection=5&s13Handicap={2}&s11OddsType=&s13Odds={3}&m00Stake=&m00MaxBet=&s11HoldMemberRB=&i13ScoreHome={4}&i13ScoreAway={5}&s11Action=GETBET", new object[] { "8", new1.get_Half_ID(), SportBookFunction.ConvertSBOBetHDPStyleToDouble(new1.get_HalfOU()).ToString(), new1.get_Half_UnderOddsString(), new1.get_HomeScore(), new1.get_AwayScore() });
                            goto Label_0B3C;
                    }
                }
            Label_0B3C:
                new3 = new4;
                new2 = new1.GenerateMatchBet(target1);
                HttpWebRequest request = (HttpWebRequest) WebRequest.Create(requestUriString);
                request.Timeout = 0x2710;
                request.Method = "POST";
                request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.16) Gecko/2009120208 Firefox/3.0.16";
                request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
                request.Headers.Add("Accept-Language", "en-gb,en;q=0.5");
                request.Headers.Add("Accept-Encoding", "gzip, deflate");
                request.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
                request.Headers["Cookie"] = base._objCookieList.ToString();
                request.Referer = base._strRootURL + "/MenuBet/LeftMenu.aspx";
                request.ContentType = "application/x-www-form-urlencoded";
                request.ContentLength = str7.Length;
                request.KeepAlive = true;
                WebRequestStateEx2 state = new WebRequestStateEx2("GetTicketAndBetFromAgent", request, str7, num1, new3.get_BetType(), target1, new MatchNew(), new3, new1, new2, bet1);
                ThreadPool.RegisterWaitForSingleObject(request.BeginGetRequestStream(new AsyncCallback(this.ReadCallBackTicket), state).AsyncWaitHandle, new WaitOrTimerCallback(this.TimeoutCallBackEx2), state, 0x2710, true);
                base.allDone.WaitOne();
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                base._isBetting = false;
                base._objErrorLogger.write(base._strName + ": EXCEPTION IN GetTicketAndBetFromAgent: " + exception.Message);
                this.WriteProgramLogger(base._strName + ": EXCEPTION IN GetTicketAndBetFromAgent: " + exception.Message);
                this.RaiseEventGetTicketComplete(base._strName, false, target1, new MatchNew(), new3, new1, new2, null);
                ProjectData.ClearProjectError();
            }
        }