Exemple #1
0
 public List<MatchLite> GenerateFullOddsLiteFromText(string text1, bool flag1, bool flag2, bool flag3, bool flag4, bool b1)
 {
     ArrayList list2 = new ArrayList();
     string str3 = "";
     int num2 = 0;
     List<MatchLite> list3 = new List<MatchLite>();
     int hour = 0;
     DateTime time = Conversions.ToDate(SpiderFunction.GetEarlyMarketStartTime(DateTime.Now));
     string str4 = "";
     string str2 = "";
     while (num2 > -1)
     {
         str3 = CommonFunction.substring(text1, num2, "Array('", "');", ref num2);
         if (str3 != string.Empty)
         {
             list2 = CommonFunction.SeperateStringBySymbol(str3, "','");
             if (list2.Count >= 0x1c)
             {
                 MatchLite lite = new MatchLite();
                 lite.set_MatchID(Conversions.ToString(list2[0]));
                 if (list2[1].ToString().ToLower().Contains("h/t"))
                 {
                     lite.set_RunningMinutes(0x2d);
                     lite.set_RunningStatus(EnumCollection.eRunningStatus.HT);
                     lite.set_GameType(EnumCollection.eGameType.Running);
                     lite.set_MatchTime(DateTime.Now);
                 }
                 else if (list2[1].ToString().Length <= 2)
                 {
                     lite.set_RunningMinutes((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(list2[1]))));
                     lite.set_RunningStatus(EnumCollection.eRunningStatus.Running);
                     lite.set_GameType(EnumCollection.eGameType.Running);
                     lite.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);
                     lite.set_MatchTime(time3);
                     lite.set_RunningStatus(EnumCollection.eRunningStatus.DeadBall);
                     lite.set_GameType(EnumCollection.eGameType.Today);
                 }
                 if (lite.get_GameType() != EnumCollection.eGameType.Running)
                 {
                     if (SpiderFunction.IsEarlyMarket(time, lite.get_MatchTime()))
                     {
                         lite.set_GameType(EnumCollection.eGameType.Early);
                     }
                 }
                 else
                 {
                     lite.set_HomeScore((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(list2[0x12]))));
                     lite.set_AwayScore((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(list2[0x13]))));
                 }
                 if (((lite.get_GameType() == EnumCollection.eGameType.Running) & flag1) | ((lite.get_GameType() != EnumCollection.eGameType.Running) & (flag2 | flag3)))
                 {
                     int num3;
                     lite.set_League(Conversions.ToString(list2[2]));
                     lite.set_HomeName(Conversions.ToString(list2[5]));
                     if (lite.get_HomeName().Contains("/font"))
                     {
                         num3 = 0;
                         lite.set_HomeName(CommonFunction.substring(lite.get_HomeName(), 0, ">", "<", ref num3));
                     }
                     lite.set_AwayName(Conversions.ToString(list2[6]));
                     if (lite.get_AwayName().Contains("/font"))
                     {
                         num3 = 0;
                         lite.set_AwayName(CommonFunction.substring(lite.get_AwayName(), 0, ">", "<", ref num3));
                     }
                     if (lite.get_Handicap() == "0.0")
                     {
                         lite.set_AwayColor(Color.Blue);
                         lite.set_HomeColor(Color.Blue);
                     }
                     else if (Operators.ConditionalCompareObjectEqual(list2[7], "H", false))
                     {
                         lite.set_AwayColor(Color.Blue);
                         lite.set_HomeColor(Color.Red);
                     }
                     else
                     {
                         lite.set_AwayColor(Color.Red);
                         lite.set_HomeColor(Color.Blue);
                     }
                     lite.set_Company("SingBet");
                     lite.set_Type(EnumCollection.eMatchType.Match);
                     lite.set_GlobalLastUpdate(DateTime.Now);
                     str2 = Conversions.ToString(list2[3]);
                     str4 = Conversions.ToString(list2[4]);
                     MatchLite item = lite.CloneObject();
                     item.set_HandicapID(str2);
                     item.set_Handicap(Conversions.ToString(list2[8]));
                     if (item.get_Handicap() != string.Empty)
                     {
                         item.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(item.get_Handicap().Replace(" ", "").Replace("/", "-")));
                     }
                     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_HomeOverOddsString(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_AwayUnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                     item.set_HomeOverBetURL(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_r.php?gid=" + item.get_MatchID()) + "&uid=" + this._strUID) + "&type=H" + "&gnum=") + str2 + "&strong=", list2[7]), "&odd_f_type="), this._strOddFType)));
                     item.set_AwayUnderBetURL(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_r.php?gid=" + item.get_MatchID()) + "&uid=" + this._strUID) + "&type=C" + "&gnum=") + str4 + "&strong=", list2[7]), "&odd_f_type="), this._strOddFType)));
                     item.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                     item.set_BetType(EnumCollection.eBetType.HDP);
                     if (item.get_HomeOverOdds() != 0.0)
                     {
                         item.UpdateCommission();
                         list3.Add(item);
                     }
                     MatchLite lite4 = lite.CloneObject();
                     lite4.set_HandicapID(str4);
                     lite4.set_Handicap(Conversions.ToString(list2[11]));
                     if (lite4.get_Handicap() != string.Empty)
                     {
                         lite4.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(lite4.get_Handicap().Replace(" ", "").Replace("/", "-")));
                     }
                     lite4.set_AwayColor(Color.Blue);
                     lite4.set_HomeColor(Color.Blue);
                     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]);
                     }
                     lite4.set_AwayUnderOddsString(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]);
                     }
                     lite4.set_HomeOverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                     lite4.set_AwayUnderBetURL(base._strRootURL + "/app/member/FT_order/FT_order_ou.php?gid=" + lite4.get_MatchID() + "&uid=" + this._strUID + "&type=H&gnum=" + str2 + "&odd_f_type=" + this._strOddFType);
                     lite4.set_HomeOverBetURL(base._strRootURL + "/app/member/FT_order/FT_order_ou.php?gid=" + lite4.get_MatchID() + "&uid=" + this._strUID + "&type=C&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                     lite4.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                     lite4.set_BetType(EnumCollection.eBetType.OU);
                     if (lite4.get_HomeOverOdds() != 0.0)
                     {
                         lite4.UpdateCommission();
                         list3.Add(lite4);
                     }
                     MatchLite lite2 = lite.CloneObject();
                     lite2.set_HandicapID(str2);
                     lite2.set_Handicap("0.0");
                     lite2.set_AwayColor(Color.Blue);
                     lite2.set_HomeColor(Color.Blue);
                     if (lite.get_GameType() == EnumCollection.eGameType.Running)
                     {
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 0x21;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         lite2.set_HomeOverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 0x22;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         lite2.set_AwayUnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 0x23;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         lite2.set_DrawOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                     }
                     else
                     {
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 15;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         lite2.set_HomeOverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 0x10;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         lite2.set_AwayUnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                         objArray2 = new object[1];
                         list4 = list2;
                         num3 = 0x11;
                         objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                         arguments = objArray2;
                         copyBack = new bool[] { true };
                         if (copyBack[0])
                         {
                             list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                         }
                         lite2.set_DrawOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                     }
                     lite2.set_HomeOverBetURL(base._strRootURL + "/app/member/FT_order/FT_order_m.php?gid=" + lite2.get_MatchID() + "&uid=" + this._strUID + "&type=H&gnum=" + str2 + "&odd_f_type=" + this._strOddFType);
                     lite2.set_AwayUnderBetURL(base._strRootURL + "/app/member/FT_order/FT_order_m.php?gid=" + lite2.get_MatchID() + "&uid=" + this._strUID + "&type=C&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                     lite2.set_DrawBetURL(base._strRootURL + "/app/member/FT_order/FT_order_m.php?gid=" + lite2.get_MatchID() + "&uid=" + this._strUID + "&type=N&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                     lite2.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                     lite2.set_BetType(EnumCollection.eBetType.lX2);
                     if (lite2.get_HomeOverOdds() != 0.0)
                     {
                         list3.Add(lite2);
                     }
                     if (flag4)
                     {
                         if (lite.get_GameType() != EnumCollection.eGameType.Running)
                         {
                             MatchLite lite6 = lite.CloneObject();
                             lite6.set_MatchID(Conversions.ToString(list2[0x16]));
                             lite6.set_HandicapID(str2);
                             lite6.set_Handicap(Conversions.ToString(list2[0x18]));
                             if (lite6.get_Handicap() != string.Empty)
                             {
                                 lite6.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(lite6.get_Handicap().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]);
                             }
                             lite6.set_HomeOverOddsString(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]);
                             }
                             lite6.set_AwayUnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             lite6.set_HomeOverBetURL(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hr.php?gid=" + lite.get_MatchID()) + "&uid=" + this._strUID) + "&type=H" + "&gnum=") + str2 + "&strong=", list2[0x17]), "&odd_f_type="), this._strOddFType)));
                             lite6.set_AwayUnderBetURL(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hr.php?gid=" + lite.get_MatchID()) + "&uid=" + this._strUID) + "&type=C" + "&gnum=") + str4 + "&strong=", list2[0x17]), "&odd_f_type="), this._strOddFType)));
                             lite6.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                             lite6.set_BetType(EnumCollection.eBetType.HDP);
                             if (lite6.get_HomeOverOdds() != 0.0)
                             {
                                 lite6.UpdateCommission();
                                 list3.Add(lite6);
                             }
                             MatchLite lite7 = lite.CloneObject();
                             lite7.set_MatchID(Conversions.ToString(list2[0x16]));
                             lite7.set_HandicapID(str4);
                             lite7.set_Handicap(Conversions.ToString(list2[0x1b]));
                             if (lite7.get_Handicap() != string.Empty)
                             {
                                 lite7.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(lite7.get_Handicap().Replace(" ", "").Replace("/", "-")));
                             }
                             lite7.set_AwayColor(Color.Blue);
                             lite7.set_HomeColor(Color.Blue);
                             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]);
                             }
                             lite7.set_AwayUnderOddsString(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]);
                             }
                             lite7.set_HomeOverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             lite7.set_AwayUnderBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hou.php?gid=" + lite6.get_MatchID() + "&uid=" + this._strUID + "&type=H&gnum=" + str2 + "&odd_f_type=" + this._strOddFType);
                             lite7.set_HomeOverBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hou.php?gid=" + lite6.get_MatchID() + "&uid=" + this._strUID + "&type=C&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                             lite7.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                             lite7.set_BetType(EnumCollection.eBetType.OU);
                             if (lite7.get_HomeOverOdds() != 0.0)
                             {
                                 lite7.UpdateCommission();
                                 list3.Add(lite7);
                             }
                             MatchLite lite5 = lite.CloneObject();
                             lite5.set_MatchID(Conversions.ToString(list2[0x16]));
                             lite5.set_HandicapID(str4);
                             lite5.set_Handicap("0.0");
                             lite5.set_AwayColor(Color.Blue);
                             lite5.set_HomeColor(Color.Blue);
                             objArray2 = new object[1];
                             list4 = list2;
                             num3 = 0x1f;
                             objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                             arguments = objArray2;
                             copyBack = new bool[] { true };
                             if (copyBack[0])
                             {
                                 list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                             }
                             lite5.set_HomeOverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             objArray2 = new object[1];
                             list4 = list2;
                             num3 = 0x20;
                             objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                             arguments = objArray2;
                             copyBack = new bool[] { true };
                             if (copyBack[0])
                             {
                                 list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                             }
                             lite5.set_AwayUnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             objArray2 = new object[1];
                             list4 = list2;
                             num3 = 0x21;
                             objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                             arguments = objArray2;
                             copyBack = new bool[] { true };
                             if (copyBack[0])
                             {
                                 list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                             }
                             lite5.set_DrawOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             lite5.set_HomeOverBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hm.php?gid=" + lite5.get_MatchID() + "&uid=" + this._strUID + "&type=H&gnum=" + str2 + "&odd_f_type=" + this._strOddFType);
                             lite5.set_AwayUnderBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hm.php?gid=" + lite5.get_MatchID() + "&uid=" + this._strUID + "&type=C&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                             lite5.set_DrawBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hm.php?gid=" + lite5.get_MatchID() + "&uid=" + this._strUID + "&type=N&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                             lite5.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                             lite5.set_BetType(EnumCollection.eBetType.lX2);
                             if (lite5.get_HomeOverOdds() != 0.0)
                             {
                                 list3.Add(lite5);
                             }
                         }
                         else
                         {
                             MatchLite lite9 = lite.CloneObject();
                             lite9.set_MatchID(Conversions.ToString(list2[20]));
                             lite9.set_HandicapID(str2);
                             lite9.set_Handicap(Conversions.ToString(list2[0x16]));
                             if (lite9.get_Handicap() != string.Empty)
                             {
                                 lite9.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(lite9.get_Handicap().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]);
                             }
                             lite9.set_HomeOverOddsString(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]);
                             }
                             lite9.set_AwayUnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             lite9.set_HomeOverBetURL(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hr.php?gid=" + lite.get_MatchID()) + "&uid=" + this._strUID) + "&type=H" + "&gnum=") + str2 + "&strong=", list2[0x17]), "&odd_f_type="), this._strOddFType)));
                             lite9.set_AwayUnderBetURL(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject((((base._strRootURL + "/app/member/FT_order/FT_order_hr.php?gid=" + lite.get_MatchID()) + "&uid=" + this._strUID) + "&type=C" + "&gnum=") + str4 + "&strong=", list2[0x17]), "&odd_f_type="), this._strOddFType)));
                             lite9.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                             lite9.set_BetType(EnumCollection.eBetType.HDP);
                             if (lite9.get_HomeOverOdds() != 0.0)
                             {
                                 lite9.UpdateCommission();
                                 list3.Add(lite9);
                             }
                             MatchLite lite10 = lite.CloneObject();
                             lite10.set_MatchID(Conversions.ToString(list2[20]));
                             lite10.set_HandicapID(str4);
                             lite10.set_Handicap(Conversions.ToString(list2[0x19]));
                             if (lite10.get_Handicap() != string.Empty)
                             {
                                 lite10.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(lite10.get_Handicap().Replace(" ", "").Replace("/", "-")));
                             }
                             lite10.set_AwayColor(Color.Blue);
                             lite10.set_HomeColor(Color.Blue);
                             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]);
                             }
                             lite10.set_AwayUnderOddsString(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]);
                             }
                             lite10.set_HomeOverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             lite10.set_AwayUnderBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hou.php?gid=" + lite9.get_MatchID() + "&uid=" + this._strUID + "&type=H&gnum=" + str2 + "&odd_f_type=" + this._strOddFType);
                             lite10.set_HomeOverBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hou.php?gid=" + lite9.get_MatchID() + "&uid=" + this._strUID + "&type=C&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                             lite10.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                             lite10.set_BetType(EnumCollection.eBetType.OU);
                             if (lite10.get_HomeOverOdds() != 0.0)
                             {
                                 lite10.UpdateCommission();
                                 list3.Add(lite10);
                             }
                             MatchLite lite8 = lite.CloneObject();
                             lite8.set_MatchID(Conversions.ToString(list2[20]));
                             lite8.set_HandicapID(str4);
                             lite8.set_Handicap("0.0");
                             lite8.set_AwayColor(Color.Blue);
                             lite8.set_HomeColor(Color.Blue);
                             objArray2 = new object[1];
                             list4 = list2;
                             num3 = 0x24;
                             objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                             arguments = objArray2;
                             copyBack = new bool[] { true };
                             if (copyBack[0])
                             {
                                 list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                             }
                             lite8.set_HomeOverOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             objArray2 = new object[1];
                             list4 = list2;
                             num3 = 0x25;
                             objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                             arguments = objArray2;
                             copyBack = new bool[] { true };
                             if (copyBack[0])
                             {
                                 list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                             }
                             lite8.set_AwayUnderOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             objArray2 = new object[1];
                             list4 = list2;
                             num3 = 0x26;
                             objArray2[0] = RuntimeHelpers.GetObjectValue(list4[num3]);
                             arguments = objArray2;
                             copyBack = new bool[] { true };
                             if (copyBack[0])
                             {
                                 list4[num3] = RuntimeHelpers.GetObjectValue(arguments[0]);
                             }
                             lite8.set_DrawOddsString(Conversions.ToString(NewLateBinding.LateGet(null, typeof(SportBookFunction), "ConvertHKToMalayOdds", arguments, null, null, copyBack)));
                             lite8.set_HomeOverBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hm.php?gid=" + lite8.get_MatchID() + "&uid=" + this._strUID + "&type=H&gnum=" + str2 + "&odd_f_type=" + this._strOddFType);
                             lite8.set_AwayUnderBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hm.php?gid=" + lite8.get_MatchID() + "&uid=" + this._strUID + "&type=C&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                             lite8.set_DrawBetURL(base._strRootURL + "/app/member/FT_order/FT_order_hm.php?gid=" + lite8.get_MatchID() + "&uid=" + this._strUID + "&type=N&gnum=" + str4 + "&odd_f_type=" + this._strOddFType);
                             lite8.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                             lite8.set_BetType(EnumCollection.eBetType.lX2);
                             if (lite8.get_HomeOverOdds() != 0.0)
                             {
                                 list3.Add(lite8);
                             }
                         }
                     }
                 }
             }
         }
     }
     return list3;
 }
Exemple #2
0
        public List<MatchLite> GenerateFullOddsLiteFromText1004(string text1, bool flag2, bool bb1, bool flag1, bool bb2, bool bb3)
        {
            List<MatchLite> list2 = new List<MatchLite>();
            int[] numArray = new int[] { -1, -1, -1, -1 };
            MatchLite lite = new MatchLite();
            string str7 = "";
            string str6 = "";
            string str2 = "";
            string str = "";
            string str4 = "";
            string str3 = "";
            int num3 = 0;
            EnumCollection.eRunningStatus deadBall = EnumCollection.eRunningStatus.DeadBall;
            int num2 = 0;
            int num = 0;
            DateTime time3 = new DateTime();
            DateTime time = Conversions.ToDate(SpiderFunction.GetEarlyMarketStartTime(DateTime.Now));
            text1 = text1.Replace("[,", "['',").Replace(",]", ",'']").Replace(", ,", ",'',").Replace(",,", ",'',").Replace(", ,", ",'',").Replace(",,", ",'',");
            TextReader reader2 = new StringReader(text1);
            JsonReader reader = new JsonTextReader(reader2);
            while (reader.Read())
            {
                if (reader.TokenType != JsonToken.StartArray)
                {
                    continue;
                }
                while (reader.Read())
                {
                    int num5;
                    if (reader.TokenType == JsonToken.StartArray)
                    {
                        num5 = 0;
                        numArray[num5]++;
                        List<string> list3 = new List<string>();
                        lite = new MatchLite();
                        while (reader.Read())
                        {
                            if (reader.TokenType != JsonToken.StartArray)
                            {
                                goto Label_0D66;
                            }
                            num5 = 1;
                            numArray[num5]++;
                            list3 = new List<string>();
                        Label_0D58:
                            while (reader.Read())
                            {
                                if (reader.TokenType == JsonToken.StartArray)
                                {
                                    num5 = 2;
                                    numArray[num5]++;
                                    list3 = new List<string>();
                                    while (reader.Read())
                                    {
                                        MatchLite lite2;
                                        string str9;
                                        if (reader.TokenType != JsonToken.EndArray)
                                        {
                                            goto Label_0CB5;
                                        }
                                        numArray[3] = -1;
                                        if (((numArray[1] == 1) & (numArray[2] == 0)) & (list3.Count >= 9))
                                        {
                                            DateTime time2;
                                            if (str2 != list3[1].Trim())
                                            {
                                                num2 = 0;
                                                num = 0;
                                                num3 = 0;
                                                deadBall = EnumCollection.eRunningStatus.DeadBall;
                                            }
                                            str2 = list3[1].Trim();
                                            str = list3[2].Trim();
                                            str7 = list3[5].Replace("</span>", "").Trim();
                                            if (str7.Contains("/"))
                                            {
                                                if (str7.Length >= 0x10)
                                                {
                                                    string str8 = str7.Substring(11, 5);
                                                    time2 = new DateTime((int)Math.Round(Conversion.Val(str7.Substring(6, 4))), (int)Math.Round(Conversion.Val(str7.Substring(0, 2))), (int)Math.Round(Conversion.Val(str7.Substring(3, 2))), (int)Math.Round(Conversion.Val(str8.Substring(0, 2))), (int)Math.Round(Conversion.Val(str8.Substring(3, 2))), 0);
                                                    time3 = time2;
                                                }
                                            }
                                            else
                                            {
                                                time2 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, (int)Math.Round(Conversion.Val(str7.Substring(0, 2))), (int)Math.Round(Conversion.Val(str7.Substring(3, 2))), 0);
                                                int num4 = (int)Math.Round(time2.Subtract(DateTime.Now).TotalMinutes);
                                                if (((DateTime.Now.Hour >= 12) & (DateTime.Now.Hour <= 0x17)) && ((time2.Hour >= 0) & (time2.Hour <= 11)))
                                                {
                                                    time2 = time2.AddDays(1.0);
                                                }
                                                time3 = time2;
                                            }
                                            if (list3[6] == "1")
                                            {
                                                lite.set_GameType(EnumCollection.eGameType.Running);
                                            }
                                        }
                                        else if (((numArray[1] == 1) & (numArray[2] == 1)) & (list3.Count == 3))
                                        {
                                            num2 = (int)Math.Round(Conversion.Val(list3[1]));
                                            num = (int)Math.Round(Conversion.Val(list3[2]));
                                        }
                                        else if (((numArray[1] == 1) & (numArray[2] == 2)) & (list3.Count == 5))
                                        {
                                            if (list3[2] == "0")
                                            {
                                                num3 = 0x2d;
                                                deadBall = EnumCollection.eRunningStatus.HT;
                                            }
                                            else
                                            {
                                                num3 = (int)Math.Round((double)(((Conversion.Val(list3[2]) - 1.0) * Conversion.Val(list3[4])) + Conversion.Val(list3[3])));
                                                deadBall = EnumCollection.eRunningStatus.Running;
                                            }
                                        }
                                        else if (numArray[1] == 2)
                                        {
                                            lite2 = new MatchLite();
                                            lite2 = lite.CloneObject();
                                            lite2.set_GlobalLastUpdate(DateTime.Now);
                                            lite2.set_Type(EnumCollection.eMatchType.Match);
                                            lite2.set_MatchID(str6);
                                            lite2.set_MatchTime(time3);
                                            lite2.set_HomeName(str2);
                                            lite2.set_AwayName(str);
                                            lite2.get_HomeName().Replace("&nbsp;", "");
                                            lite2.get_AwayName().Replace("&nbsp;", "");
                                            lite2.set_League(str4);
                                            lite2.set_LeagueID(str3);
                                            lite2.set_HomeScore(num2);
                                            lite2.set_AwayScore(num);
                                            lite2.set_RunningMinutes(num3);
                                            lite2.set_RunningStatus(deadBall);
                                            lite2.set_Company("SBOBet");
                                            if ((lite2.get_RunningStatus() == EnumCollection.eRunningStatus.HT) | (lite2.get_RunningStatus() == EnumCollection.eRunningStatus.Running))
                                            {
                                                lite2.set_GameType(EnumCollection.eGameType.Running);
                                            }
                                            else if (SpiderFunction.IsEarlyMarket(time, lite2.get_MatchTime()))
                                            {
                                                lite2.set_GameType(EnumCollection.eGameType.Early);
                                            }
                                            switch (list3.Count)
                                            {
                                                case 3:
                                                    if (list3[0] != string.Empty)
                                                    {
                                                        str6 = list3[0];
                                                    }
                                                    goto Label_0D58;

                                                case 4:
                                                    goto Label_0D58;

                                                case 5:
                                                    if (list3[0] != "3")
                                                    {
                                                        goto Label_098A;
                                                    }
                                                    lite2.set_OddsType(EnumCollection.eOddsType.Malay);
                                                    lite2.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                                    lite2.set_BetType(EnumCollection.eBetType.OU);
                                                    lite2.set_HandicapID(list3[1]);
                                                    lite2.set_HomeOverOddsString(list3[2]);
                                                    lite2.set_AwayUnderOddsString(list3[3]);
                                                    lite2.set_Handicap(list3[4]);
                                                    lite2.set_UniqueID(lite2.get_HandicapID() + Conversion.Val(lite2.get_BetCoverage()).ToString() + Conversion.Val(lite2.get_BetType()).ToString());
                                                    lite2.UpdateCommission();
                                                    if (((base._isToGetEarlyOdds & (lite2.get_GameType() == EnumCollection.eGameType.Early)) | (base._isToGetRunningOdds & (lite2.get_GameType() == EnumCollection.eGameType.Running))) | (base._isToGetTodayOdds & (lite2.get_GameType() == EnumCollection.eGameType.Today)))
                                                    {
                                                        list2.Add(lite2);
                                                    }
                                                    goto Label_0D58;

                                                case 6:
                                                    if (list3[0] != "1")
                                                    {
                                                        goto Label_0708;
                                                    }
                                                    lite2.set_OddsType(EnumCollection.eOddsType.Malay);
                                                    lite2.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                                    lite2.set_BetType(EnumCollection.eBetType.HDP);
                                                    lite2.set_HandicapID(list3[1]);
                                                    lite2.set_HomeOverOddsString(list3[2]);
                                                    lite2.set_AwayUnderOddsString(list3[3]);
                                                    lite2.set_Handicap(list3[4]);
                                                    lite2.set_UniqueID(lite2.get_HandicapID() + Conversion.Val(lite2.get_BetCoverage()).ToString() + Conversion.Val(lite2.get_BetType()).ToString());
                                                    lite2.UpdateCommission();
                                                    str9 = list3[5];
                                                    if (str9 != "2")
                                                    {
                                                        goto Label_0687;
                                                    }
                                                    lite2.set_HomeColor(Color.Blue);
                                                    lite2.set_AwayColor(Color.Red);
                                                    goto Label_06C9;
                                            }
                                        }
                                        goto Label_0D58;
                                    Label_0687:
                                        if (str9 == "1")
                                        {
                                            lite2.set_HomeColor(Color.Red);
                                            lite2.set_AwayColor(Color.Blue);
                                        }
                                        else
                                        {
                                            lite2.set_HomeColor(Color.Blue);
                                            lite2.set_AwayColor(Color.Blue);
                                        }
                                    Label_06C9:
                                        if (((flag1 & (lite2.get_GameType() == EnumCollection.eGameType.Early)) | (flag2 & (lite2.get_GameType() == EnumCollection.eGameType.Running))) | (base._isToGetTodayOdds & (lite2.get_GameType() == EnumCollection.eGameType.Today)))
                                        {
                                            list2.Add(lite2);
                                        }
                                        goto Label_0D58;
                                    Label_0708:
                                        if ((list3[0] == "7") & base._isToIncludeFirstHalfOdds)
                                        {
                                            lite2.set_OddsType(EnumCollection.eOddsType.Malay);
                                            lite2.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                            lite2.set_BetType(EnumCollection.eBetType.HDP);
                                            lite2.set_HandicapID(list3[1]);
                                            lite2.set_HomeOverOddsString(list3[2]);
                                            lite2.set_AwayUnderOddsString(list3[3]);
                                            lite2.set_Handicap(list3[4]);
                                            lite2.set_UniqueID(lite2.get_HandicapID() + Conversion.Val(lite2.get_BetCoverage()).ToString() + Conversion.Val(lite2.get_BetType()).ToString());
                                            lite2.UpdateCommission();
                                            string str10 = list3[5];
                                            if (str10 == "2")
                                            {
                                                lite2.set_HomeColor(Color.Blue);
                                                lite2.set_AwayColor(Color.Red);
                                            }
                                            else if (str10 == "1")
                                            {
                                                lite2.set_HomeColor(Color.Red);
                                                lite2.set_AwayColor(Color.Blue);
                                            }
                                            else
                                            {
                                                lite2.set_HomeColor(Color.Blue);
                                                lite2.set_AwayColor(Color.Blue);
                                            }
                                            if (((base._isToGetEarlyOdds & (lite2.get_GameType() == EnumCollection.eGameType.Early)) | (base._isToGetRunningOdds & (lite2.get_GameType() == EnumCollection.eGameType.Running))) | (base._isToGetTodayOdds & (lite2.get_GameType() == EnumCollection.eGameType.Today)))
                                            {
                                                list2.Add(lite2);
                                            }
                                        }
                                        goto Label_0D58;
                                    Label_098A:
                                        if ((list3[0] == "9") & base._isToIncludeFirstHalfOdds)
                                        {
                                            lite2.set_OddsType(EnumCollection.eOddsType.Malay);
                                            lite2.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                            lite2.set_BetType(EnumCollection.eBetType.OU);
                                            lite2.set_HandicapID(list3[1]);
                                            lite2.set_HomeOverOddsString(list3[2]);
                                            lite2.set_AwayUnderOddsString(list3[3]);
                                            lite2.set_Handicap(list3[4]);
                                            lite2.set_UniqueID(lite2.get_HandicapID() + Conversion.Val(lite2.get_BetCoverage()).ToString() + Conversion.Val(lite2.get_BetType()).ToString());
                                            lite2.UpdateCommission();
                                            if (((base._isToGetEarlyOdds & (lite2.get_GameType() == EnumCollection.eGameType.Early)) | (base._isToGetRunningOdds & (lite2.get_GameType() == EnumCollection.eGameType.Running))) | (base._isToGetTodayOdds & (lite2.get_GameType() == EnumCollection.eGameType.Today)))
                                            {
                                                list2.Add(lite2);
                                            }
                                        }
                                        else if ((list3[0] == "5") & base._isToInclude1X2Odds)
                                        {
                                            lite2.set_OddsType(EnumCollection.eOddsType.Euro);
                                            lite2.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                            lite2.set_BetType(EnumCollection.eBetType.lX2);
                                            lite2.set_HandicapID(list3[1]);
                                            lite2.set_HomeOverOddsString(list3[2]);
                                            lite2.set_AwayUnderOddsString(list3[3]);
                                            lite2.set_DrawOddsString(list3[4]);
                                            lite2.set_Handicap("0.0");
                                            lite2.set_UniqueID(lite2.get_HandicapID() + Conversion.Val(lite2.get_BetCoverage()).ToString() + Conversion.Val(lite2.get_BetType()).ToString());
                                            if (((base._isToGetEarlyOdds & (lite2.get_GameType() == EnumCollection.eGameType.Early)) | (base._isToGetRunningOdds & (lite2.get_GameType() == EnumCollection.eGameType.Running))) | (base._isToGetTodayOdds & (lite2.get_GameType() == EnumCollection.eGameType.Today)))
                                            {
                                                list2.Add(lite2);
                                            }
                                        }
                                        else if ((list3[0] == "8") & base._isToInclude1X2Odds)
                                        {
                                            lite2.set_OddsType(EnumCollection.eOddsType.Euro);
                                            lite2.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                            lite2.set_BetType(EnumCollection.eBetType.lX2);
                                            lite2.set_HandicapID(list3[1]);
                                            lite2.set_HomeOverOddsString(list3[2]);
                                            lite2.set_AwayUnderOddsString(list3[3]);
                                            lite2.set_DrawOddsString(list3[4]);
                                            lite2.set_Handicap("0.0");
                                            lite2.set_UniqueID(lite2.get_HandicapID() + Conversion.Val(lite2.get_BetCoverage()).ToString() + Conversion.Val(lite2.get_BetType()).ToString());
                                            if (((base._isToGetEarlyOdds & (lite2.get_GameType() == EnumCollection.eGameType.Early)) | (base._isToGetRunningOdds & (lite2.get_GameType() == EnumCollection.eGameType.Running))) | (base._isToGetTodayOdds & (lite2.get_GameType() == EnumCollection.eGameType.Today)))
                                            {
                                                list2.Add(lite2);
                                            }
                                        }
                                        goto Label_0D58;
                                    Label_0CB5:
                                        num5 = 3;
                                        numArray[num5]++;
                                        if (reader.Value != null)
                                        {
                                            list3.Add(reader.Value.ToString());
                                        }
                                    }
                                }
                                else
                                {
                                    if (reader.TokenType == JsonToken.EndArray)
                                    {
                                        numArray[2] = -1;
                                        if ((numArray[1] == 0) & (list3.Count == 3))
                                        {
                                            str3 = list3[0];
                                            str4 = list3[1].Trim();
                                        }
                                        break;
                                    }
                                    num5 = 2;
                                    numArray[num5]++;
                                    if (reader.Value != null)
                                    {
                                        list3.Add(reader.Value.ToString());
                                    }
                                }
                            }
                            continue;
                        Label_0D66:
                            if (reader.TokenType == JsonToken.EndArray)
                            {
                                numArray[1] = -1;
                                break;
                            }
                            num5 = 1;
                            numArray[num5]++;
                        }
                        continue;
                    }
                    if (reader.TokenType == JsonToken.EndArray)
                    {
                        numArray[0] = -1;
                    }
                    else
                    {
                        num5 = 0;
                        numArray[num5]++;
                    }
                }
            }
            if (list2.Count > 0)
            {
                list2.RemoveAt(list2.Count - 1);
            }
            return list2;
        }
Exemple #3
0
        public List<MatchNew> GenerateFullOddsLiteFromText(string text1, bool flag1, bool flag2, bool flag4, bool flag3)
        {
            ArrayList list2 = new ArrayList();
            string str2 = "";
            int num5 = 0;
            List<MatchNew> list3 = new List<MatchNew>();
            string str5 = "";
            string str3 = "";
            string str6 = "";
            string str4 = "";
            string str8 = "";
            DateTime time2 = new DateTime();
            DateTime time3 = new DateTime();
            int num2 = 0;
            int num = 0;
            EnumCollection.eRunningStatus deadBall = EnumCollection.eRunningStatus.DeadBall;
            int num4 = 0;
            int hour = 0;
            DateTime time = Conversions.ToDate(SpiderFunction.GetEarlyMarketStartTime(DateTime.Now));
            try
            {
                while (num5 > -1)
                {
                    str2 = CommonFunction.substring(text1, num5, "]=[", "];", ref num5).Trim();
                    if (str2 != string.Empty)
                    {
                        list2 = CommonFunction.SeperateStringBySymbol(str2, ",");
                        if (list2.Count == 50)
                        {
                            int num9;
                            MatchLite lite = new MatchLite();
                            if (Operators.ConditionalCompareObjectNotEqual(list2[0], "''", false))
                            {
                                str4 = CommonFunction.TrimSymbol(CommonFunction.TrimSymbol(list2[0].ToString(), "'"), "*");
                            }
                            if (Operators.ConditionalCompareObjectNotEqual(list2[5], "''", false))
                            {
                                str6 = CommonFunction.TrimSymbol(list2[5].ToString(), "'").Trim();
                            }
                            if (Operators.ConditionalCompareObjectNotEqual(list2[6], "''", false))
                            {
                                str5 = CommonFunction.TrimSymbol(list2[6].ToString(), "'").Trim();
                                num2 = (int)Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(list2[0x13])));
                                num = (int)Math.Round(Conversion.Val(CommonFunction.TrimSymbol(Conversions.ToString(list2[20]), "'")));
                                num4 = 0;
                                deadBall = EnumCollection.eRunningStatus.DeadBall;
                            }
                            if (Operators.ConditionalCompareObjectNotEqual(list2[7], "''", false))
                            {
                                str3 = CommonFunction.TrimSymbol(list2[7].ToString(), "'").Trim();
                            }
                            lite.set_Company("IBCBet");
                            lite.set_Type(EnumCollection.eMatchType.Match);
                            lite.set_GlobalLastUpdate(DateTime.Now);
                            lite.set_MatchID(str4 + CommonFunction.TrimSymbol(Conversions.ToString(list2[3]), "'"));
                            lite.set_HomeName(str5);
                            lite.set_AwayName(str3);
                            lite.set_League(str6);
                            str8 = Conversions.ToString(list2[12]);
                            if (str8.Contains("/font>"))
                            {
                                num9 = 0;
                                str8 = CommonFunction.substring(str8, 0, "/font>", "'", ref num9).Trim();
                            }
                            else
                            {
                                str8 = CommonFunction.TrimSymbol(str8, "'");
                            }
                            if (str8.Length > 5)
                            {
                                if (str8.Contains(@"\'"))
                                {
                                    int num6 = 0;
                                    int num7 = 0;
                                    deadBall = EnumCollection.eRunningStatus.Running;
                                    num6 = (int)Math.Round(Conversion.Val(str8.Substring(0, 1)));
                                    num9 = 0;
                                    num7 = (int)Math.Round(Conversion.Val(CommonFunction.substring(str8, Conversions.ToInteger("0"), "H", @"\", ref num9)));
                                    if (num6 > 0)
                                    {
                                        num4 = ((num6 - 1) * 0x2d) + num7;
                                    }
                                    else
                                    {
                                        num4 = 0;
                                    }
                                }
                                else if (str8.ToLower() == "h.time")
                                {
                                    num4 = 0x2d;
                                    deadBall = EnumCollection.eRunningStatus.HT;
                                }
                                else if (str8.Length == 7)
                                {
                                    hour = (int)Math.Round(Conversion.Val(str8.Substring(0, 2)));
                                    if ((str8.Substring(5, 2).ToLower() == "pm") && ((hour >= 1) & (hour <= 11)))
                                    {
                                        hour += 12;
                                    }
                                    time2 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, hour, (int)Math.Round(Conversion.Val(str8.Substring(3, 2))), 0);
                                    int num8 = (int)Math.Round(time2.Subtract(DateTime.Now).TotalMinutes);
                                    if (((DateTime.Now.Hour >= 12) & (DateTime.Now.Hour <= 0x17)) && ((time2.Hour >= 0) & (time2.Hour <= 11)))
                                    {
                                        time2 = time2.AddDays(1.0);
                                    }
                                    num4 = 0;
                                    deadBall = EnumCollection.eRunningStatus.DeadBall;
                                    time3 = time2;
                                }
                                else if (str8.Length == 13)
                                {
                                    hour = (int)Math.Round(Conversion.Val(str8.Substring(7, 2)));
                                    if ((str8.Substring(11, 2).ToLower() == "pm") && ((hour >= 1) & (hour <= 11)))
                                    {
                                        hour += 12;
                                    }
                                    time2 = new DateTime(DateTime.Now.Year, (int)Math.Round(Conversion.Val(str8.Substring(0, 2))), (int)Math.Round(Conversion.Val(str8.Substring(3, 2))), hour, (int)Math.Round(Conversion.Val(str8.Substring(9, 2))), 0);
                                    num4 = 0;
                                    deadBall = EnumCollection.eRunningStatus.DeadBall;
                                    time3 = time2;
                                }
                            }
                            lite.set_RunningStatus(deadBall);
                            if (lite.get_RunningStatus() == EnumCollection.eRunningStatus.DeadBall)
                            {
                                lite.set_MatchTime(time2);
                                if (SpiderFunction.IsEarlyMarket(time, lite.get_MatchTime()))
                                {
                                    lite.set_GameType(EnumCollection.eGameType.Early);
                                }
                                else
                                {
                                    lite.set_GameType(EnumCollection.eGameType.Today);
                                }
                            }
                            else
                            {
                                lite.set_GameType(EnumCollection.eGameType.Running);
                                lite.set_MatchTime(DateTime.Now.Date);
                                lite.set_RunningMinutes(num4);
                                lite.set_HomeScore(num2);
                                lite.set_AwayScore(num);
                            }
                            lite.set_Company(base._strWebsiteName);
                            if ((flag1 & (lite.get_GameType() == EnumCollection.eGameType.Running)) | (flag2 & (lite.get_GameType() != EnumCollection.eGameType.Running)))
                            {
                                if (Operators.ConditionalCompareObjectNotEqual(list2[0x1a], "''", false))
                                {
                                    MatchLite item = lite.CloneObject();
                                    item.set_BetType(EnumCollection.eBetType.HDP);
                                    item.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    item.set_OddsType(EnumCollection.eOddsType.Malay);
                                    item.set_HandicapID(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x18]), "'"));
                                    item.set_Handicap(SportBookFunction.ConvertIBCToSBOOdds(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x19]), "'")));
                                    item.set_HomeOverOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x1a]), "'"));
                                    item.set_AwayUnderOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x1b]), "'"));
                                    item.UpdateCommission();
                                    if (item.get_Handicap() == "0.0")
                                    {
                                        item.set_AwayColor(Color.Blue);
                                        item.set_HomeColor(Color.Blue);
                                    }
                                    else if (Operators.ConditionalCompareObjectEqual(list2[0x1c], "'a'", false))
                                    {
                                        item.set_AwayColor(Color.Red);
                                        item.set_HomeColor(Color.Blue);
                                    }
                                    else
                                    {
                                        item.set_AwayColor(Color.Blue);
                                        item.set_HomeColor(Color.Red);
                                    }

                                    MatchNew matchNew = ConvertMatchLiteToMatchNew(lite);
                                    list3.Add(matchNew);
                                }
                                if (Operators.ConditionalCompareObjectNotEqual(list2[0x1f], "''", false))
                                {
                                    MatchLite lite3 = lite.CloneObject();
                                    lite3.set_BetType(EnumCollection.eBetType.OU);
                                    lite3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    lite3.set_OddsType(EnumCollection.eOddsType.Malay);
                                    lite3.set_HandicapID(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x1d]), "'"));
                                    lite3.set_Handicap(SportBookFunction.ConvertIBCToSBOOdds(CommonFunction.TrimSymbol(Conversions.ToString(list2[30]), "'")));
                                    lite3.set_HomeOverOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x1f]), "'"));
                                    lite3.set_AwayUnderOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x20]), "'"));
                                    lite3.set_UniqueID(lite3.get_MatchID() + Conversion.Val(lite3.get_BetCoverage()).ToString() + Conversion.Val(lite3.get_BetType()).ToString());
                                    lite3.UpdateCommission();
                                    lite3.set_AwayColor(Color.Blue);
                                    lite3.set_HomeColor(Color.Blue);
                                    MatchNew matchNew = ConvertMatchLiteToMatchNew(lite);
                                    list3.Add(matchNew);
                                }
                                if (flag3 && Operators.ConditionalCompareObjectNotEqual(list2[0x22], "''", false))
                                {
                                    MatchLite lite4 = lite.CloneObject();
                                    lite4.set_BetType(EnumCollection.eBetType.lX2);
                                    lite4.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    lite4.set_OddsType(EnumCollection.eOddsType.HK);
                                    lite4.set_HandicapID(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x1d]), "'"));
                                    lite4.set_Handicap("0.0");
                                    lite4.set_HomeOverOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x22]), "'"));
                                    lite4.set_AwayUnderOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x23]), "'"));
                                    lite4.set_DrawOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x24]), "'"));
                                    lite4.set_UniqueID(lite4.get_MatchID() + Conversion.Val(lite4.get_BetCoverage()).ToString() + Conversion.Val(lite4.get_BetType()).ToString());
                                    lite4.set_AwayColor(Color.Blue);
                                    lite4.set_HomeColor(Color.Blue);
                                    MatchNew matchNew = ConvertMatchLiteToMatchNew(lite);
                                    list3.Add(matchNew);
                                }
                                if (flag4)
                                {
                                    if (Operators.ConditionalCompareObjectNotEqual(list2[0x27], "''", false))
                                    {
                                        MatchLite lite5 = lite.CloneObject();
                                        lite5.set_BetType(EnumCollection.eBetType.HDP);
                                        lite5.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite5.set_OddsType(EnumCollection.eOddsType.Malay);
                                        lite5.set_HandicapID(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x25]), "'"));
                                        lite5.set_Handicap(SportBookFunction.ConvertIBCToSBOOdds(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x26]), "'")));
                                        lite5.set_HomeOverOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x27]), "'"));
                                        lite5.set_AwayUnderOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[40]), "'"));
                                        lite5.UpdateCommission();
                                        MatchNew matchNew = ConvertMatchLiteToMatchNew(lite);
                                        list3.Add(matchNew);
                                    }
                                    if (Operators.ConditionalCompareObjectNotEqual(list2[0x2c], "''", false))
                                    {
                                        MatchLite lite6 = lite.CloneObject();
                                        lite6.set_BetType(EnumCollection.eBetType.OU);
                                        lite6.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite6.set_OddsType(EnumCollection.eOddsType.Malay);
                                        lite6.set_HandicapID(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x2a]), "'"));
                                        lite6.set_Handicap(SportBookFunction.ConvertIBCToSBOOdds(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x2b]), "'")));
                                        lite6.set_HomeOverOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x2c]), "'"));
                                        lite6.set_AwayUnderOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x2d]), "'"));
                                        lite6.set_UniqueID(lite6.get_MatchID() + Conversion.Val(lite6.get_BetCoverage()).ToString() + Conversion.Val(lite6.get_BetType()).ToString());
                                        lite6.UpdateCommission();
                                        lite6.set_AwayColor(Color.Blue);
                                        lite6.set_HomeColor(Color.Blue);
                                        MatchNew matchNew = ConvertMatchLiteToMatchNew(lite);
                                        list3.Add(matchNew);
                                    }
                                    if (flag3 && Operators.ConditionalCompareObjectNotEqual(list2[0x2f], "''", false))
                                    {
                                        MatchLite lite7 = lite.CloneObject();
                                        lite7.set_BetType(EnumCollection.eBetType.lX2);
                                        lite7.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite7.set_OddsType(EnumCollection.eOddsType.HK);
                                        lite7.set_HandicapID(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x2e]), "'"));
                                        lite7.set_Handicap("0.0");
                                        lite7.set_HomeOverOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x2f]), "'"));
                                        lite7.set_AwayUnderOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x30]), "'"));
                                        lite7.set_DrawOddsString(CommonFunction.TrimSymbol(Conversions.ToString(list2[0x31]), "'"));
                                        lite7.set_UniqueID(lite7.get_MatchID() + Conversion.Val(lite7.get_BetCoverage()).ToString() + Conversion.Val(lite7.get_BetType()).ToString());
                                        lite7.set_AwayColor(Color.Blue);
                                        MatchNew matchNew = ConvertMatchLiteToMatchNew(lite);
                                        list3.Add(matchNew);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                base._objErrorLogger.write(base._strName + ": EXCEPTION IN GenerateFullOddsLiteFromText: " + exception.Message);
                this.WriteProgramLogger(base._strName + ": EXCEPTION IN GenerateFullOddsLiteFromText: " + exception.Message);
                ProjectData.ClearProjectError();
            }
            return list3;
        }
Exemple #4
0
        public List<MatchLite> GenerateFullOddsLiteFromText(string text1, bool flag5, bool flag1, bool flag2, bool flag4, bool flag3)
        {
            List<MatchLite> list2 = new List<MatchLite>();
            DateTime time2 = new DateTime();
            Dictionary<string, JsonMatch> dictionary = new Dictionary<string, JsonMatch>();
            DateTime time = Conversions.ToDate(SpiderFunction.GetEarlyMarketStartTime(DateTime.Now));
            Color blue = Color.Blue;
            Color red = Color.Blue;
            try
            {
                int num4 = 0;
                text1 = CommonFunction.substring(text1, 0, "var odds =", ";", ref num4).Trim();
                text1 = text1.Replace("\"1x2", "\"lx2").Replace("\"1sthf1x2rb", "\"lsthf1x2rb");
                dictionary = JsonConvert.DeserializeObject<Dictionary<string, JsonMatch>>(text1);
                if (dictionary == null)
                {
                    return list2;
                }
                Dictionary<string, JsonMatch>.Enumerator enumerator = dictionary.GetEnumerator();
                try
                {
                    //enumerator;
                    while (enumerator.MoveNext())
                    {
                        ArrayList list3;
                        DateTime now;
                        DateTime time4;
                        KeyValuePair<string, JsonMatch> current = enumerator.Current;
                        MatchLite lite = new MatchLite();
                        JsonMatch match = current.Value;
                        lite.set_MatchID(current.Key.ToString());
                        lite.set_Type(EnumCollection.eMatchType.Match);
                        lite.set_Company("SB188");
                        lite.set_GlobalLastUpdate(DateTime.Now);
                        if (match.info.Count == 15)
                        {
                            lite.set_League(match.info[5].ToString().Trim());
                            lite.set_HomeName(match.info[8].ToString().Trim());
                            lite.set_AwayName(match.info[10].ToString().Trim());
                            list3 = CommonFunction.SeperateStringBySymbol(match.info[6].ToString().Trim(), " ");
                            if ((list3.Count == 2) && (match.info[7].ToString().Trim().Length == 5))
                            {
                                now = DateTime.Now;
                                time4 = new DateTime(now.Year, CommonFunction.ConvertMonthName3CharToNumber(list3[1].ToString().Trim()), (int) Math.Round(Conversion.Val(list3[0].ToString().Trim())), Conversions.ToInteger(match.info[7].ToString().Substring(0, 2)), Conversions.ToInteger(match.info[7].ToString().Substring(3, 2)), 0);
                                lite.set_MatchTime(time4);
                            }
                            if (match.info[11].ToString() == "1")
                            {
                                blue = Color.Red;
                                red = Color.Blue;
                            }
                            else
                            {
                                blue = Color.Blue;
                                red = Color.Red;
                            }
                            if (SpiderFunction.IsEarlyMarket(time, lite.get_MatchTime()))
                            {
                                lite.set_GameType(EnumCollection.eGameType.Early);
                            }
                            else
                            {
                                lite.set_GameType(EnumCollection.eGameType.Today);
                            }
                            if (((lite.get_GameType() == EnumCollection.eGameType.Today) & flag1) | ((lite.get_GameType() == EnumCollection.eGameType.Early) & flag2))
                            {
                                if (match.ah[1].ToString() != string.Empty)
                                {
                                    MatchLite lite2 = lite.CloneObject();
                                    lite2.set_BetType(EnumCollection.eBetType.HDP);
                                    lite2.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    lite2.set_OddsType(EnumCollection.eOddsType.Malay);
                                    lite2.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ah[1].ToString().Replace("/", "-").Trim()));
                                    lite2.set_HomeOverOddsString(match.ah[3].ToString().Trim());
                                    lite2.set_AwayUnderOddsString(match.ah[5].ToString().Trim());
                                    lite2.set_UniqueID(lite2.get_MatchID() + Conversion.Val(lite2.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite2.get_BetCoverage().ToString())));
                                    lite2.UpdateCommission();
                                    if (lite2.get_Handicap() == "0.0")
                                    {
                                        lite2.set_HomeColor(Color.Blue);
                                        lite2.set_AwayColor(Color.Blue);
                                    }
                                    else
                                    {
                                        lite2.set_HomeColor(blue);
                                        lite2.set_AwayColor(red);
                                    }
                                    switch (base._objBetOddsType)
                                    {
                                        case EnumCollection.eOddsType.HK:
                                            lite2.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite2.get_HomeOverOddsString()));
                                            lite2.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite2.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Euro:
                                            lite2.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite2.get_HomeOverOddsString()));
                                            lite2.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite2.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Indo:
                                            lite2.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite2.get_HomeOverOddsString()));
                                            lite2.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite2.get_AwayUnderOddsString()));
                                            break;
                                    }
                                    list2.Add(lite2);
                                }
                                if (match.ou[1].ToString() != string.Empty)
                                {
                                    MatchLite lite3 = lite.CloneObject();
                                    lite3.set_BetType(EnumCollection.eBetType.OU);
                                    lite3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    lite3.set_OddsType(EnumCollection.eOddsType.Malay);
                                    lite3.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ou[1].ToString().Replace("/", "-").Trim()));
                                    lite3.set_HomeOverOddsString(match.ou[3].ToString().Trim());
                                    lite3.set_AwayUnderOddsString(match.ou[5].ToString().Trim());
                                    lite3.set_UniqueID(lite3.get_MatchID() + Conversion.Val(lite3.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite3.get_BetCoverage().ToString())));
                                    lite3.UpdateCommission();
                                    lite3.set_HomeColor(Color.Blue);
                                    lite3.set_AwayColor(Color.Blue);
                                    switch (base._objBetOddsType)
                                    {
                                        case EnumCollection.eOddsType.HK:
                                            lite3.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite3.get_HomeOverOddsString()));
                                            lite3.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite3.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Euro:
                                            lite3.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite3.get_HomeOverOddsString()));
                                            lite3.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite3.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Indo:
                                            lite3.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite3.get_HomeOverOddsString()));
                                            lite3.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite3.get_AwayUnderOddsString()));
                                            break;
                                    }
                                    list2.Add(lite3);
                                }
                                if ((match.lx2[1].ToString() != string.Empty) & flag3)
                                {
                                    MatchLite lite4 = lite.CloneObject();
                                    lite4.set_BetType(EnumCollection.eBetType.lX2);
                                    lite4.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    lite4.set_OddsType(EnumCollection.eOddsType.Euro);
                                    lite4.set_Handicap("0.0");
                                    lite4.set_HomeOverOddsString(match.lx2[1].ToString().Trim());
                                    lite4.set_AwayUnderOddsString(match.lx2[3].ToString().Trim());
                                    lite4.set_DrawOddsString(match.lx2[5].ToString().Trim());
                                    lite4.set_UniqueID(lite4.get_MatchID() + Conversion.Val(lite4.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite4.get_BetCoverage().ToString())));
                                    lite4.set_HomeColor(Color.Blue);
                                    lite4.set_AwayColor(Color.Blue);
                                    list2.Add(lite4);
                                }
                                if (flag4)
                                {
                                    if (match.ah1st[1].ToString() != string.Empty)
                                    {
                                        MatchLite lite5 = lite.CloneObject();
                                        lite5.set_BetType(EnumCollection.eBetType.HDP);
                                        lite5.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite5.set_OddsType(EnumCollection.eOddsType.Malay);
                                        lite5.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ah1st[1].ToString().Replace("/", "-").Trim()));
                                        lite5.set_HomeOverOddsString(match.ah1st[3].ToString().Trim());
                                        lite5.set_AwayUnderOddsString(match.ah1st[5].ToString().Trim());
                                        lite5.set_UniqueID(lite5.get_MatchID() + Conversion.Val(lite5.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite5.get_BetCoverage().ToString())));
                                        lite5.UpdateCommission();
                                        if (lite5.get_Handicap() == "0.0")
                                        {
                                            lite5.set_HomeColor(Color.Blue);
                                            lite5.set_AwayColor(Color.Blue);
                                        }
                                        else
                                        {
                                            lite5.set_HomeColor(blue);
                                            lite5.set_AwayColor(red);
                                        }
                                        switch (base._objBetOddsType)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                lite5.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite5.get_HomeOverOddsString()));
                                                lite5.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite5.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                lite5.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite5.get_HomeOverOddsString()));
                                                lite5.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite5.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                lite5.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite5.get_HomeOverOddsString()));
                                                lite5.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite5.get_AwayUnderOddsString()));
                                                break;
                                        }
                                        list2.Add(lite5);
                                    }
                                    if (match.ou1st[1].ToString() != string.Empty)
                                    {
                                        MatchLite lite6 = lite.CloneObject();
                                        lite6.set_BetType(EnumCollection.eBetType.OU);
                                        lite6.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite6.set_OddsType(EnumCollection.eOddsType.Malay);
                                        lite6.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ou1st[1].ToString().Replace("/", "-").Trim()));
                                        lite6.set_HomeOverOddsString(match.ou1st[3].ToString().Trim());
                                        lite6.set_AwayUnderOddsString(match.ou1st[5].ToString().Trim());
                                        lite6.set_UniqueID(lite6.get_MatchID() + Conversion.Val(lite6.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite6.get_BetCoverage().ToString())));
                                        lite6.UpdateCommission();
                                        lite6.set_HomeColor(Color.Blue);
                                        lite6.set_AwayColor(Color.Blue);
                                        switch (base._objBetOddsType)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                lite6.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite6.get_HomeOverOddsString()));
                                                lite6.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite6.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                lite6.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite6.get_HomeOverOddsString()));
                                                lite6.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite6.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                lite6.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite6.get_HomeOverOddsString()));
                                                lite6.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite6.get_AwayUnderOddsString()));
                                                break;
                                        }
                                        list2.Add(lite6);
                                    }
                                    if ((match.lx21st[1].ToString() != string.Empty) & flag3)
                                    {
                                        MatchLite lite7 = lite.CloneObject();
                                        lite7.set_BetType(EnumCollection.eBetType.lX2);
                                        lite7.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite7.set_OddsType(EnumCollection.eOddsType.Euro);
                                        lite7.set_Handicap("0.0");
                                        lite7.set_HomeOverOddsString(match.lx21st[1].ToString().Trim());
                                        lite7.set_AwayUnderOddsString(match.lx21st[3].ToString().Trim());
                                        lite7.set_DrawOddsString(match.lx21st[5].ToString().Trim());
                                        lite7.set_UniqueID(lite7.get_MatchID() + Conversion.Val(lite7.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite7.get_BetCoverage().ToString())));
                                        lite7.set_HomeColor(Color.Blue);
                                        lite7.set_AwayColor(Color.Blue);
                                        list2.Add(lite7);
                                    }
                                }
                            }
                            if (match.child == null)
                            {
                                continue;
                            }
                            MatchLite lite8 = new MatchLite();
                            JsonMatch child = match.child;
                            lite8.set_Company(lite.get_Company());
                            lite8.set_Type(lite.get_Type());
                            lite8.set_SportType(lite.get_SportType());
                            lite8.set_League(lite.get_League());
                            lite8.set_HomeName(lite.get_HomeName());
                            lite8.set_AwayName(lite.get_AwayName());
                            lite8.set_HomeScore(lite.get_HomeScore());
                            lite8.set_AwayScore(lite.get_AwayScore());
                            lite8.set_GameType(lite.get_GameType());
                            lite8.set_RunningStatus(lite.get_RunningStatus());
                            lite8.set_RunningMinutes(lite.get_RunningMinutes());
                            lite8.set_MatchTime(lite.get_MatchTime());
                            lite8.set_MatchID(Conversions.ToString(child.info[0]));
                            if (child.ah[1].ToString() != string.Empty)
                            {
                                MatchLite lite9 = lite8.CloneObject();
                                lite9.set_BetType(EnumCollection.eBetType.HDP);
                                lite9.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                lite9.set_OddsType(EnumCollection.eOddsType.Malay);
                                lite9.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(child.ah[1].ToString().Replace("/", "-").Trim()));
                                lite9.set_HomeOverOddsString(child.ah[3].ToString().Trim());
                                lite9.set_AwayUnderOddsString(child.ah[5].ToString().Trim());
                                lite9.set_UniqueID(lite9.get_MatchID() + Conversion.Val(lite9.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite9.get_BetCoverage().ToString())));
                                lite9.UpdateCommission();
                                if (lite9.get_Handicap() == "0.0")
                                {
                                    lite9.set_HomeColor(Color.Blue);
                                    lite9.set_AwayColor(Color.Blue);
                                }
                                else
                                {
                                    lite9.set_HomeColor(blue);
                                    lite9.set_AwayColor(red);
                                }
                                switch (base._objBetOddsType)
                                {
                                    case EnumCollection.eOddsType.HK:
                                        lite9.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite9.get_HomeOverOddsString()));
                                        lite9.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite9.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Euro:
                                        lite9.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite9.get_HomeOverOddsString()));
                                        lite9.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite9.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Indo:
                                        lite9.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite9.get_HomeOverOddsString()));
                                        lite9.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite9.get_AwayUnderOddsString()));
                                        break;
                                }
                                list2.Add(lite9);
                            }
                            if (child.ou[1].ToString() != string.Empty)
                            {
                                MatchLite lite10 = lite8.CloneObject();
                                lite10.set_BetType(EnumCollection.eBetType.OU);
                                lite10.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                lite10.set_OddsType(EnumCollection.eOddsType.Malay);
                                lite10.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(child.ou[1].ToString().Replace("/", "-").Trim()));
                                lite10.set_HomeOverOddsString(child.ou[3].ToString().Trim());
                                lite10.set_AwayUnderOddsString(child.ou[5].ToString().Trim());
                                lite10.set_UniqueID(lite10.get_MatchID() + Conversion.Val(lite10.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite10.get_BetCoverage().ToString())));
                                lite10.UpdateCommission();
                                lite10.set_HomeColor(Color.Blue);
                                lite10.set_AwayColor(Color.Blue);
                                switch (base._objBetOddsType)
                                {
                                    case EnumCollection.eOddsType.HK:
                                        lite10.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite10.get_HomeOverOddsString()));
                                        lite10.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite10.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Euro:
                                        lite10.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite10.get_HomeOverOddsString()));
                                        lite10.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite10.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Indo:
                                        lite10.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite10.get_HomeOverOddsString()));
                                        lite10.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite10.get_AwayUnderOddsString()));
                                        break;
                                }
                                list2.Add(lite10);
                            }
                            if (!flag4)
                            {
                                continue;
                            }
                            if (child.ah1st[1].ToString() != string.Empty)
                            {
                                MatchLite lite11 = lite8.CloneObject();
                                lite11.set_BetType(EnumCollection.eBetType.HDP);
                                lite11.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                lite11.set_OddsType(EnumCollection.eOddsType.Malay);
                                lite11.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(child.ah1st[1].ToString().Replace("/", "-").Trim()));
                                lite11.set_HomeOverOddsString(child.ah1st[3].ToString().Trim());
                                lite11.set_AwayUnderOddsString(child.ah1st[5].ToString().Trim());
                                lite11.set_UniqueID(lite11.get_MatchID() + Conversion.Val(lite11.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite11.get_BetCoverage().ToString())));
                                lite11.UpdateCommission();
                                if (lite11.get_Handicap() == "0.0")
                                {
                                    lite11.set_HomeColor(Color.Blue);
                                    lite11.set_AwayColor(Color.Blue);
                                }
                                else
                                {
                                    lite11.set_HomeColor(blue);
                                    lite11.set_AwayColor(red);
                                }
                                switch (base._objBetOddsType)
                                {
                                    case EnumCollection.eOddsType.HK:
                                        lite11.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite11.get_HomeOverOddsString()));
                                        lite11.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite11.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Euro:
                                        lite11.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite11.get_HomeOverOddsString()));
                                        lite11.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite11.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Indo:
                                        lite11.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite11.get_HomeOverOddsString()));
                                        lite11.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite11.get_AwayUnderOddsString()));
                                        break;
                                }
                                list2.Add(lite11);
                            }
                            if (child.ou1st[1].ToString() == string.Empty)
                            {
                                continue;
                            }
                            MatchLite item = lite8.CloneObject();
                            item.set_BetType(EnumCollection.eBetType.OU);
                            item.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                            item.set_OddsType(EnumCollection.eOddsType.Malay);
                            item.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(child.ou1st[1].ToString().Replace("/", "-").Trim()));
                            item.set_HomeOverOddsString(child.ou1st[3].ToString().Trim());
                            item.set_AwayUnderOddsString(child.ou1st[5].ToString().Trim());
                            item.set_UniqueID(item.get_MatchID() + Conversion.Val(item.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(item.get_BetCoverage().ToString())));
                            item.UpdateCommission();
                            item.set_HomeColor(Color.Blue);
                            item.set_AwayColor(Color.Blue);
                            switch (base._objBetOddsType)
                            {
                                case EnumCollection.eOddsType.HK:
                                    item.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_HomeOverOddsString()));
                                    item.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_AwayUnderOddsString()));
                                    break;

                                case EnumCollection.eOddsType.Euro:
                                    item.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_HomeOverOddsString()));
                                    item.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_AwayUnderOddsString()));
                                    break;

                                case EnumCollection.eOddsType.Indo:
                                    item.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_HomeOverOddsString()));
                                    item.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_AwayUnderOddsString()));
                                    break;
                            }
                            list2.Add(item);
                            continue;
                        }
                        if ((match.info.Count == 0x13) & flag5)
                        {
                            lite.set_League(match.info[5].ToString().Trim());
                            lite.set_HomeName(match.info[9].ToString().Trim());
                            lite.set_AwayName(match.info[11].ToString().Trim());
                            lite.set_GameType(EnumCollection.eGameType.Running);
                            lite.set_HomeScore((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(match.info[13]))));
                            lite.set_AwayScore((int) Math.Round(Conversion.Val(RuntimeHelpers.GetObjectValue(match.info[14]))));
                            if (match.info[1].ToString() == "ht")
                            {
                                lite.set_RunningMinutes(0x2d);
                                lite.set_RunningStatus(EnumCollection.eRunningStatus.HT);
                            }
                            else
                            {
                                if (match.info[1].ToString().Length == 1)
                                {
                                    lite.set_RunningMinutes((int) Math.Round(Conversion.Val("0" + match.info[1].ToString())));
                                }
                                else
                                {
                                    lite.set_RunningMinutes((int) Math.Round(Conversion.Val(match.info[1].ToString())));
                                }
                                lite.set_RunningStatus(EnumCollection.eRunningStatus.Running);
                            }
                            list3 = CommonFunction.SeperateStringBySymbol(match.info[7].ToString().Trim(), " ");
                            if ((list3.Count == 2) && (match.info[8].ToString().Trim().Length == 5))
                            {
                                time4 = DateTime.Now;
                                now = new DateTime(time4.Year, CommonFunction.ConvertMonthName3CharToNumber(list3[1].ToString().Trim()), (int) Math.Round(Conversion.Val(list3[0].ToString().Trim())), (int) Math.Round(Conversion.Val(match.info[8].ToString().Substring(0, 2))), (int) Math.Round(Conversion.Val(match.info[8].ToString().Substring(3, 2))), 0);
                                lite.set_MatchTime(now);
                            }
                            if (match.info[12].ToString() == "1")
                            {
                                blue = Color.Red;
                                red = Color.Blue;
                            }
                            else
                            {
                                blue = Color.Blue;
                                red = Color.Red;
                            }
                            if (match.rb[1].ToString() != string.Empty)
                            {
                                MatchLite lite13 = lite.CloneObject();
                                lite13.set_BetType(EnumCollection.eBetType.HDP);
                                lite13.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                lite13.set_OddsType(EnumCollection.eOddsType.Malay);
                                lite13.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.rb[1].ToString().Replace("/", "-").Trim()));
                                lite13.set_HomeOverOddsString(match.rb[3].ToString().Trim());
                                lite13.set_AwayUnderOddsString(match.rb[5].ToString().Trim());
                                lite13.set_UniqueID(lite13.get_MatchID() + Conversion.Val(lite13.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite13.get_BetCoverage().ToString())));
                                lite13.UpdateCommission();
                                if (lite13.get_Handicap() == "0.0")
                                {
                                    lite13.set_HomeColor(Color.Blue);
                                    lite13.set_AwayColor(Color.Blue);
                                }
                                else
                                {
                                    lite13.set_HomeColor(blue);
                                    lite13.set_AwayColor(red);
                                }
                                switch (base._objBetOddsType)
                                {
                                    case EnumCollection.eOddsType.HK:
                                        lite13.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite13.get_HomeOverOddsString()));
                                        lite13.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite13.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Euro:
                                        lite13.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite13.get_HomeOverOddsString()));
                                        lite13.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite13.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Indo:
                                        lite13.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite13.get_HomeOverOddsString()));
                                        lite13.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite13.get_AwayUnderOddsString()));
                                        break;
                                }
                                list2.Add(lite13);
                            }
                            if (match.rbou[1].ToString() != string.Empty)
                            {
                                MatchLite lite14 = lite.CloneObject();
                                lite14.set_BetType(EnumCollection.eBetType.OU);
                                lite14.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                lite14.set_OddsType(EnumCollection.eOddsType.Malay);
                                lite14.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.rbou[1].ToString().Replace("/", "-").Trim()));
                                lite14.set_HomeOverOddsString(match.rbou[3].ToString().Trim());
                                lite14.set_AwayUnderOddsString(match.rbou[5].ToString().Trim());
                                lite14.set_UniqueID(lite14.get_MatchID() + Conversion.Val(lite14.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite14.get_BetCoverage().ToString())));
                                lite14.UpdateCommission();
                                lite14.set_HomeColor(Color.Blue);
                                lite14.set_AwayColor(Color.Blue);
                                switch (base._objBetOddsType)
                                {
                                    case EnumCollection.eOddsType.HK:
                                        lite14.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite14.get_HomeOverOddsString()));
                                        lite14.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite14.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Euro:
                                        lite14.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite14.get_HomeOverOddsString()));
                                        lite14.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite14.get_AwayUnderOddsString()));
                                        break;

                                    case EnumCollection.eOddsType.Indo:
                                        lite14.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite14.get_HomeOverOddsString()));
                                        lite14.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite14.get_AwayUnderOddsString()));
                                        break;
                                }
                                list2.Add(lite14);
                            }
                            if ((match.lx2rb[1].ToString() != string.Empty) & flag3)
                            {
                                MatchLite lite15 = lite.CloneObject();
                                lite15.set_BetType(EnumCollection.eBetType.lX2);
                                lite15.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                lite15.set_OddsType(EnumCollection.eOddsType.Euro);
                                lite15.set_Handicap("0.0");
                                lite15.set_HomeOverOddsString(match.lx2rb[1].ToString().Trim());
                                lite15.set_AwayUnderOddsString(match.lx2rb[3].ToString().Trim());
                                lite15.set_DrawOddsString(match.lx2rb[5].ToString().Trim());
                                lite15.set_UniqueID(lite15.get_MatchID() + Conversion.Val(lite15.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite15.get_BetCoverage().ToString())));
                                lite15.set_HomeColor(Color.Blue);
                                lite15.set_AwayColor(Color.Blue);
                                list2.Add(lite15);
                            }
                            if (flag4)
                            {
                                if (match.rb1st[1].ToString() != string.Empty)
                                {
                                    MatchLite lite16 = lite.CloneObject();
                                    lite16.set_BetType(EnumCollection.eBetType.HDP);
                                    lite16.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                    lite16.set_OddsType(EnumCollection.eOddsType.Malay);
                                    lite16.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.rb1st[1].ToString().Replace("/", "-").Trim()));
                                    lite16.set_HomeOverOddsString(match.rb1st[3].ToString().Trim());
                                    lite16.set_AwayUnderOddsString(match.rb1st[5].ToString().Trim());
                                    lite16.set_UniqueID(lite16.get_MatchID() + Conversion.Val(lite16.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite16.get_BetCoverage().ToString())));
                                    lite16.UpdateCommission();
                                    if (lite16.get_Handicap() == "0.0")
                                    {
                                        lite16.set_HomeColor(Color.Blue);
                                        lite16.set_AwayColor(Color.Blue);
                                    }
                                    else
                                    {
                                        lite16.set_HomeColor(blue);
                                        lite16.set_AwayColor(red);
                                    }
                                    switch (base._objBetOddsType)
                                    {
                                        case EnumCollection.eOddsType.HK:
                                            lite16.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite16.get_HomeOverOddsString()));
                                            lite16.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite16.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Euro:
                                            lite16.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite16.get_HomeOverOddsString()));
                                            lite16.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite16.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Indo:
                                            lite16.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite16.get_HomeOverOddsString()));
                                            lite16.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite16.get_AwayUnderOddsString()));
                                            break;
                                    }
                                    list2.Add(lite16);
                                }
                                if (match.rbou1st[1].ToString() != string.Empty)
                                {
                                    MatchLite lite17 = lite.CloneObject();
                                    lite17.set_BetType(EnumCollection.eBetType.OU);
                                    lite17.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                    lite17.set_OddsType(EnumCollection.eOddsType.Malay);
                                    lite17.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.rbou1st[1].ToString().Replace("/", "-").Trim()));
                                    lite17.set_HomeOverOddsString(match.rbou1st[3].ToString().Trim());
                                    lite17.set_AwayUnderOddsString(match.rbou1st[5].ToString().Trim());
                                    lite17.set_UniqueID(lite17.get_MatchID() + Conversion.Val(lite17.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite17.get_BetCoverage().ToString())));
                                    lite17.UpdateCommission();
                                    lite17.set_HomeColor(Color.Blue);
                                    lite17.set_AwayColor(Color.Blue);
                                    switch (base._objBetOddsType)
                                    {
                                        case EnumCollection.eOddsType.HK:
                                            lite17.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite17.get_HomeOverOddsString()));
                                            lite17.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite17.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Euro:
                                            lite17.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite17.get_HomeOverOddsString()));
                                            lite17.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite17.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Indo:
                                            lite17.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite17.get_HomeOverOddsString()));
                                            lite17.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite17.get_AwayUnderOddsString()));
                                            break;
                                    }
                                    list2.Add(lite17);
                                }
                                if ((match.lsthf1x2rb[1].ToString() != string.Empty) & flag3)
                                {
                                    MatchLite lite18 = lite.CloneObject();
                                    lite18.set_BetType(EnumCollection.eBetType.lX2);
                                    lite18.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                    lite18.set_OddsType(EnumCollection.eOddsType.Euro);
                                    lite18.set_Handicap("0.0");
                                    lite18.set_HomeOverOddsString(match.lsthf1x2rb[1].ToString().Trim());
                                    lite18.set_AwayUnderOddsString(match.lsthf1x2rb[3].ToString().Trim());
                                    lite18.set_DrawOddsString(match.lsthf1x2rb[5].ToString().Trim());
                                    lite18.set_UniqueID(lite18.get_MatchID() + Conversion.Val(lite18.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite18.get_BetCoverage().ToString())));
                                    lite18.set_HomeColor(Color.Blue);
                                    lite18.set_AwayColor(Color.Blue);
                                    list2.Add(lite18);
                                }
                            }
                            if (match.child != null)
                            {
                                MatchLite lite19 = new MatchLite();
                                JsonMatch match3 = match.child;
                                lite19.set_Company(lite.get_Company());
                                lite19.set_Type(lite.get_Type());
                                lite19.set_SportType(lite.get_SportType());
                                lite19.set_League(lite.get_League());
                                lite19.set_HomeName(lite.get_HomeName());
                                lite19.set_AwayName(lite.get_AwayName());
                                lite19.set_HomeScore(lite.get_HomeScore());
                                lite19.set_AwayScore(lite.get_AwayScore());
                                lite19.set_GameType(lite.get_GameType());
                                lite19.set_RunningStatus(lite.get_RunningStatus());
                                lite19.set_RunningMinutes(lite.get_RunningMinutes());
                                lite19.set_MatchTime(lite.get_MatchTime());
                                lite19.set_MatchID(Conversions.ToString(match3.info[0]));
                                if (match3.rb[1].ToString() != string.Empty)
                                {
                                    MatchLite lite20 = lite19.CloneObject();
                                    lite20.set_BetType(EnumCollection.eBetType.HDP);
                                    lite20.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    lite20.set_OddsType(EnumCollection.eOddsType.Malay);
                                    lite20.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match3.rb[1].ToString().Replace("/", "-").Trim()));
                                    lite20.set_HomeOverOddsString(match3.rb[3].ToString().Trim());
                                    lite20.set_AwayUnderOddsString(match3.rb[5].ToString().Trim());
                                    lite20.set_UniqueID(lite20.get_MatchID() + Conversion.Val(lite20.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite20.get_BetCoverage().ToString())));
                                    lite20.UpdateCommission();
                                    if (lite20.get_Handicap() == "0.0")
                                    {
                                        lite20.set_HomeColor(Color.Blue);
                                        lite20.set_AwayColor(Color.Blue);
                                    }
                                    else
                                    {
                                        lite20.set_HomeColor(blue);
                                        lite20.set_AwayColor(red);
                                    }
                                    switch (base._objBetOddsType)
                                    {
                                        case EnumCollection.eOddsType.HK:
                                            lite20.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite20.get_HomeOverOddsString()));
                                            lite20.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite20.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Euro:
                                            lite20.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite20.get_HomeOverOddsString()));
                                            lite20.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite20.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Indo:
                                            lite20.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite20.get_HomeOverOddsString()));
                                            lite20.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite20.get_AwayUnderOddsString()));
                                            break;
                                    }
                                    list2.Add(lite20);
                                }
                                if (match3.rbou[1].ToString() != string.Empty)
                                {
                                    MatchLite lite21 = lite19.CloneObject();
                                    lite21.set_BetType(EnumCollection.eBetType.OU);
                                    lite21.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    lite21.set_OddsType(EnumCollection.eOddsType.Malay);
                                    lite21.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match3.rbou[1].ToString().Replace("/", "-").Trim()));
                                    lite21.set_HomeOverOddsString(match3.rbou[3].ToString().Trim());
                                    lite21.set_AwayUnderOddsString(match3.rbou[5].ToString().Trim());
                                    lite21.set_UniqueID(lite21.get_MatchID() + Conversion.Val(lite21.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite21.get_BetCoverage().ToString())));
                                    lite21.UpdateCommission();
                                    lite21.set_HomeColor(Color.Blue);
                                    lite21.set_AwayColor(Color.Blue);
                                    switch (base._objBetOddsType)
                                    {
                                        case EnumCollection.eOddsType.HK:
                                            lite21.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite21.get_HomeOverOddsString()));
                                            lite21.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite21.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Euro:
                                            lite21.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite21.get_HomeOverOddsString()));
                                            lite21.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite21.get_AwayUnderOddsString()));
                                            break;

                                        case EnumCollection.eOddsType.Indo:
                                            lite21.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite21.get_HomeOverOddsString()));
                                            lite21.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite21.get_AwayUnderOddsString()));
                                            break;
                                    }
                                    list2.Add(lite21);
                                }
                                if (flag4)
                                {
                                    if (match3.rb1st[1].ToString() != string.Empty)
                                    {
                                        MatchLite lite22 = lite19.CloneObject();
                                        lite22.set_BetType(EnumCollection.eBetType.HDP);
                                        lite22.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite22.set_OddsType(EnumCollection.eOddsType.Malay);
                                        lite22.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match3.rb1st[1].ToString().Replace("/", "-").Trim()));
                                        lite22.set_HomeOverOddsString(match3.rb1st[3].ToString().Trim());
                                        lite22.set_AwayUnderOddsString(match3.rb1st[5].ToString().Trim());
                                        lite22.set_UniqueID(lite22.get_MatchID() + Conversion.Val(lite22.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite22.get_BetCoverage().ToString())));
                                        lite22.UpdateCommission();
                                        if (lite22.get_Handicap() == "0.0")
                                        {
                                            lite22.set_HomeColor(Color.Blue);
                                            lite22.set_AwayColor(Color.Blue);
                                        }
                                        else
                                        {
                                            lite22.set_HomeColor(blue);
                                            lite22.set_AwayColor(red);
                                        }
                                        switch (base._objBetOddsType)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                lite22.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite22.get_HomeOverOddsString()));
                                                lite22.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite22.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                lite22.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite22.get_HomeOverOddsString()));
                                                lite22.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite22.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                lite22.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite22.get_HomeOverOddsString()));
                                                lite22.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite22.get_AwayUnderOddsString()));
                                                break;
                                        }
                                        list2.Add(lite22);
                                    }
                                    if (match3.rbou1st[1].ToString() != string.Empty)
                                    {
                                        MatchLite lite23 = lite19.CloneObject();
                                        lite23.set_BetType(EnumCollection.eBetType.OU);
                                        lite23.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                        lite23.set_OddsType(EnumCollection.eOddsType.Malay);
                                        lite23.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match3.rbou1st[1].ToString().Replace("/", "-").Trim()));
                                        lite23.set_HomeOverOddsString(match3.rbou1st[3].ToString().Trim());
                                        lite23.set_AwayUnderOddsString(match3.rbou1st[5].ToString().Trim());
                                        lite23.set_UniqueID(lite23.get_MatchID() + Conversion.Val(lite23.get_BetType()).ToString() + Conversions.ToString(Conversion.Val(lite23.get_BetCoverage().ToString())));
                                        lite23.UpdateCommission();
                                        lite23.set_HomeColor(Color.Blue);
                                        lite23.set_AwayColor(Color.Blue);
                                        switch (base._objBetOddsType)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                lite23.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite23.get_HomeOverOddsString()));
                                                lite23.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite23.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                lite23.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite23.get_HomeOverOddsString()));
                                                lite23.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite23.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                lite23.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite23.get_HomeOverOddsString()));
                                                lite23.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite23.get_AwayUnderOddsString()));
                                                break;
                                        }
                                        list2.Add(lite23);
                                    }
                                }
                            }
                        }
                    }
                }
                finally
                {
                    enumerator.Dispose();
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                base._objErrorLogger.write(base._strName + ": EXCEPTION IN GenerateFullOddsFromText: " + exception.Message);
                this.WriteProgramLogger(base._strName + ": EXCEPTION IN GenerateFullOddsFromText: " + exception.Message);
                ProjectData.ClearProjectError();
            }
            return list2;
        }
Exemple #5
0
        public List<MatchLite> GenerateFullOddsLiteFromText(string text1, bool bb1, bool bb2, bool bb3, bool flag2, bool flag1)
        {
            List<MatchLite> list2 = new List<MatchLite>();
            EnumCollection.eOddsType malay = EnumCollection.eOddsType.Malay;
            string str2 = "";
            DateTime time2 = new DateTime();
            JsonPageList list3 = new JsonPageList();
            JsonPage current = new JsonPage();
            DateTime time = Conversions.ToDate(SpiderFunction.GetEarlyMarketStartTime(DateTime.Now));
            try
            {
                text1 = text1.Replace("\"1x2", "\"lx2");
                list3 = JsonConvert.DeserializeObject<JsonPageList>(text1);
                if ((list3 == null) || (list3.pages == null))
                {
                    return list2;
                }
                List<JsonPage>.Enumerator enumerator = list3.pages.GetEnumerator();
                try
                {
                    //enumerator;
                    while (enumerator.MoveNext())
                    {
                        current = enumerator.Current;
                        switch (current.otu.ToLower())
                        {
                            case "hk":
                                malay = EnumCollection.eOddsType.HK;
                                break;

                            case "malay":
                                malay = EnumCollection.eOddsType.Malay;
                                break;

                            case "indo":
                                malay = EnumCollection.eOddsType.Indo;
                                break;

                            case "euro":
                                malay = EnumCollection.eOddsType.Euro;
                                break;
                        }
                        if (current.events != null)
                        {
                            List<JsonMatch>.Enumerator enumerator2 = current.events.GetEnumerator();
                            try
                            {
                                //enumerator2;
                                while (enumerator2.MoveNext())
                                {
                                    JsonMatch match = enumerator2.Current;
                                    MatchLite lite = new MatchLite();
                                    if (match.info.Count >= 0x13)
                                    {
                                        lite.set_Type(EnumCollection.eMatchType.Match);
                                        lite.set_Company("BW3388");
                                        if (match.info[5] != string.Empty)
                                        {
                                            str2 = match.info[5];
                                        }
                                        lite.set_MatchID(match.info[1]);
                                        lite.set_League(str2);
                                        lite.set_HomeName(match.info[6]);
                                        lite.set_AwayName(match.info[7]);
                                        if ((match.info[2].Length >= 5) & (match.info[3].Length >= 7))
                                        {
                                            bool flag;
                                            int year = DateTime.Now.Year;
                                            int num4 = (int) Math.Round(Conversion.Val(match.info[2].Substring(3, 2)));
                                            int num = (int) Math.Round(Conversion.Val(match.info[2].Substring(0, 2)));
                                            int num2 = (int) Math.Round(Conversion.Val(match.info[3].Substring(0, 2)));
                                            int num3 = (int) Math.Round(Conversion.Val(match.info[3].Substring(3, 2)));
                                            if (match.info[3].Substring(5, 2).ToLower() == "am")
                                            {
                                                flag = false;
                                            }
                                            else
                                            {
                                                flag = true;
                                            }
                                            time2 = CommonFunction.ConvertTimeToInternationalTime(year, num4, num, num2, num3, flag);
                                            if (match.info.Count >= 0x16)
                                            {
                                                lite.set_GameType(EnumCollection.eGameType.Running);
                                                lite.set_HomeScore((int) Math.Round(Conversion.Val(match.info[0x13])));
                                                lite.set_AwayScore((int) Math.Round(Conversion.Val(match.info[20])));
                                                if (match.info[0x15].Length >= 4)
                                                {
                                                    lite.set_RunningMinutes((int) Math.Round((double) (Conversion.Val(match.info[0x15].Substring(0, 1)) * Conversion.Val(match.info[0x15].Substring(3)))));
                                                }
                                            }
                                        }
                                    }
                                    lite.set_MatchTime(time2);
                                    if (SpiderFunction.IsEarlyMarket(time, lite.get_MatchTime()))
                                    {
                                        lite.set_GameType(EnumCollection.eGameType.Early);
                                    }
                                    else
                                    {
                                        lite.set_GameType(EnumCollection.eGameType.Today);
                                    }
                                    if (match.ah1.Count >= 8)
                                    {
                                        MatchLite item = lite.CloneObject();
                                        item.set_BetType(EnumCollection.eBetType.HDP);
                                        item.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                        item.set_OddsType(EnumCollection.eOddsType.Malay);
                                        item.set_HandicapID(match.ah1[7]);
                                        item.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ah1[1].Replace("/", "-")));
                                        item.set_HomeOverOddsString(match.ah1[2]);
                                        item.set_AwayUnderOddsString(match.ah1[3]);
                                        item.set_UniqueID(item.get_MatchID() + Conversion.Val(item.get_BetCoverage()).ToString() + Conversion.Val(item.get_BetType()).ToString());
                                        item.UpdateCommission();
                                        if (item.get_Handicap() == "0.0")
                                        {
                                            item.set_HomeColor(Color.Blue);
                                            item.set_AwayColor(Color.Blue);
                                        }
                                        else if (match.ah1[4] == "b")
                                        {
                                            item.set_HomeColor(Color.Blue);
                                            item.set_AwayColor(Color.Red);
                                        }
                                        else
                                        {
                                            item.set_HomeColor(Color.Red);
                                            item.set_AwayColor(Color.Blue);
                                        }
                                        switch (malay)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                item.set_HomeOverOdds(SportBookFunction.ConvertHKToMalayOdds(item.get_HomeOverOdds()));
                                                item.set_AwayUnderOdds(SportBookFunction.ConvertHKToMalayOdds(item.get_AwayUnderOdds()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                item.set_HomeOverOdds(SportBookFunction.ConvertEuroToMalayOdds(item.get_HomeOverOdds()));
                                                item.set_AwayUnderOdds(SportBookFunction.ConvertEuroToMalayOdds(item.get_AwayUnderOdds()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                item.set_HomeOverOdds(SportBookFunction.ConvertIndoToMalayOdds(item.get_HomeOverOdds()));
                                                item.set_AwayUnderOdds(SportBookFunction.ConvertIndoToMalayOdds(item.get_AwayUnderOdds()));
                                                break;
                                        }
                                        list2.Add(item);
                                    }
                                    if (match.ou1.Count >= 7)
                                    {
                                        MatchLite lite3 = lite.CloneObject();
                                        lite3.set_BetType(EnumCollection.eBetType.OU);
                                        lite3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                        lite3.set_OddsType(EnumCollection.eOddsType.Malay);
                                        lite3.set_HandicapID(match.ou1[6]);
                                        lite3.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ou1[1].Replace("/", "-")));
                                        lite3.set_HomeOverOddsString(match.ou1[2]);
                                        lite3.set_AwayUnderOddsString(match.ou1[3]);
                                        lite3.set_UniqueID(lite3.get_MatchID() + Conversion.Val(lite3.get_BetCoverage()).ToString() + Conversion.Val(lite3.get_BetType()).ToString());
                                        lite3.UpdateCommission();
                                        switch (malay)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                lite3.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite3.get_HomeOverOddsString()));
                                                lite3.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite3.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                lite3.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite3.get_HomeOverOddsString()));
                                                lite3.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite3.get_AwayUnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                lite3.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite3.get_HomeOverOddsString()));
                                                lite3.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite3.get_AwayUnderOddsString()));
                                                break;
                                        }
                                        list2.Add(lite3);
                                    }
                                    if (flag1 & (match.lx2.Count >= 7))
                                    {
                                        MatchLite lite4 = lite.CloneObject();
                                        lite4.set_BetType(EnumCollection.eBetType.lX2);
                                        lite4.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                        lite4.set_HandicapID(match.lx2[6]);
                                        lite4.set_Handicap("0.0");
                                        lite4.set_HomeOverOddsString(match.lx2[1]);
                                        lite4.set_AwayUnderOddsString(match.lx2[2]);
                                        lite4.set_DrawOddsString(match.ou1[2]);
                                        lite4.set_UniqueID(lite4.get_MatchID() + Conversion.Val(lite4.get_BetCoverage()).ToString() + Conversion.Val(lite4.get_BetType()).ToString());
                                        list2.Add(lite4);
                                    }
                                    if (flag2)
                                    {
                                        if (match.ahht1.Count >= 8)
                                        {
                                            MatchLite lite5 = lite.CloneObject();
                                            lite5.set_BetType(EnumCollection.eBetType.HDP);
                                            lite5.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                            lite5.set_OddsType(EnumCollection.eOddsType.Malay);
                                            lite5.set_HandicapID(match.ahht1[7]);
                                            lite5.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ahht1[1].Replace("/", "-")));
                                            lite5.set_HomeOverOddsString(match.ahht1[2]);
                                            lite5.set_AwayUnderOddsString(match.ahht1[3]);
                                            lite5.set_UniqueID(lite5.get_MatchID() + Conversion.Val(lite5.get_BetCoverage()).ToString() + Conversion.Val(lite5.get_BetType()).ToString());
                                            lite5.UpdateCommission();
                                            if (lite5.get_Handicap() == "0.0")
                                            {
                                                lite5.set_HomeColor(Color.Blue);
                                                lite5.set_AwayColor(Color.Blue);
                                            }
                                            else if (match.ahht1[4] == "b")
                                            {
                                                lite5.set_HomeColor(Color.Blue);
                                                lite5.set_AwayColor(Color.Red);
                                            }
                                            else
                                            {
                                                lite5.set_HomeColor(Color.Red);
                                                lite5.set_AwayColor(Color.Blue);
                                            }
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    lite5.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite5.get_HomeOverOddsString()));
                                                    lite5.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite5.get_AwayUnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    lite5.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite5.get_HomeOverOddsString()));
                                                    lite5.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite5.get_AwayUnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    lite5.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite5.get_HomeOverOddsString()));
                                                    lite5.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite5.get_AwayUnderOddsString()));
                                                    break;
                                            }
                                            list2.Add(lite5);
                                        }
                                        if (match.ouht1.Count >= 7)
                                        {
                                            MatchLite lite6 = lite.CloneObject();
                                            lite6.set_BetType(EnumCollection.eBetType.OU);
                                            lite6.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                            lite6.set_OddsType(EnumCollection.eOddsType.Malay);
                                            lite6.set_HandicapID(match.ouht1[6]);
                                            lite6.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ouht1[1].Replace("/", "-")));
                                            lite6.set_HomeOverOddsString(match.ouht1[2]);
                                            lite6.set_AwayUnderOddsString(match.ouht1[3]);
                                            lite6.set_UniqueID(lite6.get_MatchID() + Conversion.Val(lite6.get_BetCoverage()).ToString() + Conversion.Val(lite6.get_BetType()).ToString());
                                            lite6.UpdateCommission();
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    lite6.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite6.get_HomeOverOddsString()));
                                                    lite6.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite6.get_AwayUnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    lite6.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite6.get_HomeOverOddsString()));
                                                    lite6.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite6.get_AwayUnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    lite6.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite6.get_HomeOverOddsString()));
                                                    lite6.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite6.get_AwayUnderOddsString()));
                                                    break;
                                            }
                                            list2.Add(lite6);
                                        }
                                    }
                                    if ((match.ah2.Count > 0) | (match.ou2.Count > 0))
                                    {
                                        if (match.ah2.Count >= 8)
                                        {
                                            MatchLite lite7 = lite.CloneObject();
                                            lite7.set_BetType(EnumCollection.eBetType.HDP);
                                            lite7.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                            lite7.set_OddsType(EnumCollection.eOddsType.Malay);
                                            lite7.set_HandicapID(match.ah2[7]);
                                            lite7.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ah2[1].Replace("/", "-")));
                                            lite7.set_HomeOverOddsString(match.ah2[2]);
                                            lite7.set_AwayUnderOddsString(match.ah2[3]);
                                            lite7.set_UniqueID(lite7.get_MatchID() + Conversion.Val(lite7.get_BetCoverage()).ToString() + Conversion.Val(lite7.get_BetType()).ToString());
                                            lite7.UpdateCommission();
                                            if (lite7.get_Handicap() == "0.0")
                                            {
                                                lite7.set_HomeColor(Color.Blue);
                                                lite7.set_AwayColor(Color.Blue);
                                            }
                                            else if (match.ah2[4] == "b")
                                            {
                                                lite7.set_HomeColor(Color.Blue);
                                                lite7.set_AwayColor(Color.Red);
                                            }
                                            else
                                            {
                                                lite7.set_HomeColor(Color.Red);
                                                lite7.set_AwayColor(Color.Blue);
                                            }
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    lite7.set_HomeOverOdds(SportBookFunction.ConvertHKToMalayOdds(lite7.get_HomeOverOdds()));
                                                    lite7.set_AwayUnderOdds(SportBookFunction.ConvertHKToMalayOdds(lite7.get_AwayUnderOdds()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    lite7.set_HomeOverOdds(SportBookFunction.ConvertEuroToMalayOdds(lite7.get_HomeOverOdds()));
                                                    lite7.set_AwayUnderOdds(SportBookFunction.ConvertEuroToMalayOdds(lite7.get_AwayUnderOdds()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    lite7.set_HomeOverOdds(SportBookFunction.ConvertIndoToMalayOdds(lite7.get_HomeOverOdds()));
                                                    lite7.set_AwayUnderOdds(SportBookFunction.ConvertIndoToMalayOdds(lite7.get_AwayUnderOdds()));
                                                    break;
                                            }
                                            list2.Add(lite7);
                                        }
                                        if (match.ou2.Count >= 7)
                                        {
                                            MatchLite lite8 = lite.CloneObject();
                                            lite8.set_BetType(EnumCollection.eBetType.OU);
                                            lite8.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                            lite8.set_OddsType(EnumCollection.eOddsType.Malay);
                                            lite8.set_HandicapID(match.ou2[6]);
                                            lite8.set_Handicap(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ou2[1].Replace("/", "-")));
                                            lite8.set_HomeOverOddsString(match.ou2[2]);
                                            lite8.set_AwayUnderOddsString(match.ou2[3]);
                                            lite8.set_UniqueID(lite8.get_MatchID() + Conversion.Val(lite8.get_BetCoverage()).ToString() + Conversion.Val(lite8.get_BetType()).ToString());
                                            lite8.UpdateCommission();
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    lite8.set_HomeOverOddsString(SportBookFunction.ConvertHKToMalayOdds(lite8.get_HomeOverOddsString()));
                                                    lite8.set_AwayUnderOddsString(SportBookFunction.ConvertHKToMalayOdds(lite8.get_AwayUnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    lite8.set_HomeOverOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite8.get_HomeOverOddsString()));
                                                    lite8.set_AwayUnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(lite8.get_AwayUnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    lite8.set_HomeOverOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite8.get_HomeOverOddsString()));
                                                    lite8.set_AwayUnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(lite8.get_AwayUnderOddsString()));
                                                    break;
                                            }
                                            list2.Add(lite8);
                                        }
                                    }
                                }
                                continue;
                            }
                            finally
                            {
                                enumerator2.Dispose();
                            }
                        }
                    }
                }
                finally
                {
                    enumerator.Dispose();
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                base._objErrorLogger.write(base._strName + ": EXCEPTION IN GenerateFullOddsFromText: " + exception.Message);
                this.WriteProgramLogger(base._strName + ": EXCEPTION IN GenerateFullOddsFromText: " + exception.Message);
                ProjectData.ClearProjectError();
            }
            return list2;
        }