Exemplo n.º 1
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;
        }
Exemplo n.º 2
0
        public List<MatchNew> GenerateFullOddsFromText(string text1, bool bb2, bool bb3, bool bb4, bool flag1)
        {
            List<MatchNew> list2 = new List<MatchNew>();
            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;
                                    MatchNew item = new MatchNew();
                                    if (match.info.Count >= 0x13)
                                    {
                                        item.set_Type(EnumCollection.eMatchType.Match);
                                        item.set_Website("BW3388");
                                        if (match.info[5] != string.Empty)
                                        {
                                            str2 = match.info[5];
                                        }
                                        item.set_FT_ID(match.info[1]);
                                        item.set_Half_ID(match.info[1]);
                                        item.set_UniqueID(item.get_FT_ID() + "a");
                                        item.set_League(str2);
                                        item.set_HomeName(match.info[6]);
                                        item.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)
                                            {
                                                item.set_GameType(EnumCollection.eGameType.Running);
                                                item.set_HomeScore((int) Math.Round(Conversion.Val(match.info[0x13])));
                                                item.set_AwayScore((int) Math.Round(Conversion.Val(match.info[20])));
                                                if (match.info[0x15].Length >= 4)
                                                {
                                                    item.set_RunningMinutes((int) Math.Round((double) (Conversion.Val(match.info[0x15].Substring(0, 1)) * Conversion.Val(match.info[0x15].Substring(3)))));
                                                }
                                            }
                                        }
                                    }
                                    item.set_MatchTime(time2);
                                    if (item.get_GameType() != EnumCollection.eGameType.Running)
                                    {
                                        if (SpiderFunction.IsEarlyMarket(time, item.get_MatchTime()))
                                        {
                                            item.set_GameType(EnumCollection.eGameType.Early);
                                        }
                                        else
                                        {
                                            item.set_GameType(EnumCollection.eGameType.Today);
                                        }
                                    }
                                    if (match.ah1.Count >= 8)
                                    {
                                        item.set_FTHDP_ID(match.ah1[7]);
                                        item.set_FTHDP(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ah1[1].Replace("/", "-")));
                                        item.set_FT_HomeOddsString(match.ah1[2]);
                                        item.set_FT_AwayOddsString(match.ah1[3]);
                                        if (item.get_FTHDP() == "0.0")
                                        {
                                            item.set_FTHomeColor(Color.Blue);
                                            item.set_FTAwayColor(Color.Blue);
                                        }
                                        else if (match.ah1[4] == "b")
                                        {
                                            item.set_FTHomeColor(Color.Blue);
                                            item.set_FTAwayColor(Color.Red);
                                        }
                                        else
                                        {
                                            item.set_FTHomeColor(Color.Red);
                                            item.set_FTAwayColor(Color.Blue);
                                        }
                                        switch (malay)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                item.set_FT_HomeOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_FT_HomeOddsString()));
                                                item.set_FT_AwayOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_FT_AwayOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                item.set_FT_HomeOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_FT_HomeOddsString()));
                                                item.set_FT_AwayOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_FT_AwayOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                item.set_FT_HomeOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_FT_HomeOddsString()));
                                                item.set_FT_AwayOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_FT_AwayOddsString()));
                                                break;
                                        }
                                    }
                                    if (match.ou1.Count >= 7)
                                    {
                                        item.set_FTOU_ID(match.ou1[6]);
                                        item.set_FTOU(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ou1[1].Replace("/", "-")));
                                        item.set_FT_OverOddsString(match.ou1[2]);
                                        item.set_FT_UnderOddsString(match.ou1[3]);
                                        switch (malay)
                                        {
                                            case EnumCollection.eOddsType.HK:
                                                item.set_FT_OverOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_FT_OverOddsString()));
                                                item.set_FT_UnderOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_FT_UnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Euro:
                                                item.set_FT_OverOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_FT_OverOddsString()));
                                                item.set_FT_UnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_FT_UnderOddsString()));
                                                break;

                                            case EnumCollection.eOddsType.Indo:
                                                item.set_FT_OverOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_FT_OverOddsString()));
                                                item.set_FT_UnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_FT_UnderOddsString()));
                                                break;
                                        }
                                    }
                                    if (flag1)
                                    {
                                        if (match.ahht1.Count >= 8)
                                        {
                                            item.set_HalfHDP_ID(match.ahht1[7]);
                                            item.set_HalfHDP(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ahht1[1].Replace("/", "-")));
                                            item.set_Half_HomeOddsString(match.ahht1[2]);
                                            item.set_Half_AwayOddsString(match.ahht1[3]);
                                            if (item.get_HalfHDP() == "0.0")
                                            {
                                                item.set_HalfHomeColor(Color.Blue);
                                                item.set_HalfAwayColor(Color.Blue);
                                            }
                                            else if (match.ahht1[4] == "b")
                                            {
                                                item.set_HalfHomeColor(Color.Blue);
                                                item.set_HalfAwayColor(Color.Red);
                                            }
                                            else
                                            {
                                                item.set_HalfHomeColor(Color.Red);
                                                item.set_HalfAwayColor(Color.Blue);
                                            }
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    item.set_Half_HomeOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_Half_HomeOddsString()));
                                                    item.set_Half_AwayOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_Half_AwayOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    item.set_Half_HomeOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_Half_HomeOddsString()));
                                                    item.set_Half_AwayOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_Half_AwayOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    item.set_Half_HomeOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_Half_HomeOddsString()));
                                                    item.set_Half_AwayOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_Half_AwayOddsString()));
                                                    break;
                                            }
                                        }
                                        if (match.ouht1.Count >= 7)
                                        {
                                            item.set_HalfOU_ID(match.ouht1[6]);
                                            item.set_HalfOU(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ouht1[1].Replace("/", "-")));
                                            item.set_Half_OverOddsString(match.ouht1[2]);
                                            item.set_Half_UnderOddsString(match.ouht1[3]);
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    item.set_Half_OverOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_Half_OverOddsString()));
                                                    item.set_Half_UnderOddsString(SportBookFunction.ConvertHKToMalayOdds(item.get_Half_UnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    item.set_Half_OverOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_Half_OverOddsString()));
                                                    item.set_Half_UnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(item.get_Half_UnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    item.set_Half_OverOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_Half_OverOddsString()));
                                                    item.set_Half_UnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(item.get_Half_UnderOddsString()));
                                                    break;
                                            }
                                        }
                                    }
                                    item.set_GlobalLastUpdate(DateTime.Now);
                                    list2.Add(item);
                                    if ((match.ah2.Count > 0) | (match.ou2.Count > 0))
                                    {
                                        MatchNew new3 = new MatchNew();
                                        new3.set_Type(EnumCollection.eMatchType.Match);
                                        new3.set_Website("BW3388");
                                        new3.set_FT_ID(item.get_FT_ID());
                                        new3.set_Half_ID(item.get_Half_ID());
                                        new3.set_UniqueID(item.get_FT_ID() + "b");
                                        new3.set_League(item.get_League());
                                        new3.set_HomeName(item.get_HomeName());
                                        new3.set_AwayName(item.get_AwayName());
                                        new3.set_AwayScore(item.get_AwayScore());
                                        new3.set_GameType(item.get_GameType());
                                        new3.set_MatchTime(item.get_MatchTime());
                                        new3.set_RunningMinutes(item.get_RunningMinutes());
                                        new3.set_RunningStatus(item.get_RunningStatus());
                                        if (match.ah2.Count >= 8)
                                        {
                                            new3.set_FTHDP_ID(match.ah2[7]);
                                            new3.set_FTHDP(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ah2[1].Replace("/", "-")));
                                            new3.set_FT_HomeOddsString(match.ah2[2]);
                                            new3.set_FT_AwayOddsString(match.ah2[3]);
                                            if (new3.get_FTHDP() == "0.0")
                                            {
                                                new3.set_FTHomeColor(Color.Blue);
                                                new3.set_FTAwayColor(Color.Blue);
                                            }
                                            else if (match.ah2[4] == "b")
                                            {
                                                new3.set_FTHomeColor(Color.Blue);
                                                new3.set_FTAwayColor(Color.Red);
                                            }
                                            else
                                            {
                                                new3.set_FTHomeColor(Color.Red);
                                                new3.set_FTAwayColor(Color.Blue);
                                            }
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    new3.set_FT_HomeOddsString(SportBookFunction.ConvertHKToMalayOdds(new3.get_FT_HomeOddsString()));
                                                    new3.set_FT_AwayOddsString(SportBookFunction.ConvertHKToMalayOdds(new3.get_FT_AwayOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    new3.set_FT_HomeOddsString(SportBookFunction.ConvertEuroToMalayOdds(new3.get_FT_HomeOddsString()));
                                                    new3.set_FT_AwayOddsString(SportBookFunction.ConvertEuroToMalayOdds(new3.get_FT_AwayOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    new3.set_FT_HomeOddsString(SportBookFunction.ConvertIndoToMalayOdds(new3.get_FT_HomeOddsString()));
                                                    new3.set_FT_AwayOddsString(SportBookFunction.ConvertIndoToMalayOdds(new3.get_FT_AwayOddsString()));
                                                    break;
                                            }
                                        }
                                        if (match.ou2.Count >= 7)
                                        {
                                            new3.set_FTOU_ID(match.ou2[6]);
                                            new3.set_FTOU(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ou2[1].Replace("/", "-")));
                                            new3.set_FT_OverOddsString(match.ou2[2]);
                                            new3.set_FT_UnderOddsString(match.ou2[3]);
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    new3.set_FT_OverOddsString(SportBookFunction.ConvertHKToMalayOdds(new3.get_FT_OverOddsString()));
                                                    new3.set_FT_UnderOddsString(SportBookFunction.ConvertHKToMalayOdds(new3.get_FT_UnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    new3.set_FT_OverOddsString(SportBookFunction.ConvertEuroToMalayOdds(new3.get_FT_OverOddsString()));
                                                    new3.set_FT_UnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(new3.get_FT_UnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    new3.set_FT_OverOddsString(SportBookFunction.ConvertIndoToMalayOdds(new3.get_FT_OverOddsString()));
                                                    new3.set_FT_UnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(new3.get_FT_UnderOddsString()));
                                                    break;
                                            }
                                        }
                                        new3.set_GlobalLastUpdate(DateTime.Now);
                                        list2.Add(new3);
                                    }
                                    if ((match.ah3.Count > 0) | (match.ou3.Count > 0))
                                    {
                                        MatchNew new4 = new MatchNew();
                                        new4.set_Type(EnumCollection.eMatchType.Match);
                                        new4.set_Website("BW3388");
                                        new4.set_FT_ID(item.get_FT_ID());
                                        new4.set_Half_ID(item.get_Half_ID());
                                        new4.set_UniqueID(item.get_FT_ID() + "c");
                                        new4.set_League(item.get_League());
                                        new4.set_HomeName(item.get_HomeName());
                                        new4.set_AwayName(item.get_AwayName());
                                        new4.set_AwayScore(item.get_AwayScore());
                                        new4.set_GameType(item.get_GameType());
                                        new4.set_MatchTime(item.get_MatchTime());
                                        new4.set_RunningMinutes(item.get_RunningMinutes());
                                        new4.set_RunningStatus(item.get_RunningStatus());
                                        if (match.ah3.Count >= 8)
                                        {
                                            new4.set_FTHDP_ID(match.ah3[7]);
                                            new4.set_FTHDP(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ah3[1].Replace("/", "-")));
                                            new4.set_FT_HomeOddsString(match.ah3[2]);
                                            new4.set_FT_AwayOddsString(match.ah3[3]);
                                            if (new4.get_FTHDP() == "0.0")
                                            {
                                                new4.set_FTHomeColor(Color.Blue);
                                                new4.set_FTAwayColor(Color.Blue);
                                            }
                                            else if (match.ah3[4] == "b")
                                            {
                                                new4.set_FTHomeColor(Color.Blue);
                                                new4.set_FTAwayColor(Color.Red);
                                            }
                                            else
                                            {
                                                new4.set_FTHomeColor(Color.Red);
                                                new4.set_FTAwayColor(Color.Blue);
                                            }
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    new4.set_FT_HomeOddsString(SportBookFunction.ConvertHKToMalayOdds(new4.get_FT_HomeOddsString()));
                                                    new4.set_FT_AwayOddsString(SportBookFunction.ConvertHKToMalayOdds(new4.get_FT_AwayOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    new4.set_FT_HomeOddsString(SportBookFunction.ConvertEuroToMalayOdds(new4.get_FT_HomeOddsString()));
                                                    new4.set_FT_AwayOddsString(SportBookFunction.ConvertEuroToMalayOdds(new4.get_FT_AwayOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    new4.set_FT_HomeOddsString(SportBookFunction.ConvertIndoToMalayOdds(new4.get_FT_HomeOddsString()));
                                                    new4.set_FT_AwayOddsString(SportBookFunction.ConvertIndoToMalayOdds(new4.get_FT_AwayOddsString()));
                                                    break;
                                            }
                                        }
                                        if (match.ou3.Count >= 7)
                                        {
                                            new4.set_FTOU_ID(match.ou3[6]);
                                            new4.set_FTOU(SportBookFunction.ConvertHDPDashedTypeWithZero(match.ou3[1].Replace("/", "-")));
                                            new4.set_FT_OverOddsString(match.ou3[2]);
                                            new4.set_FT_UnderOddsString(match.ou3[3]);
                                            switch (malay)
                                            {
                                                case EnumCollection.eOddsType.HK:
                                                    new4.set_FT_OverOddsString(SportBookFunction.ConvertHKToMalayOdds(new4.get_FT_OverOddsString()));
                                                    new4.set_FT_UnderOddsString(SportBookFunction.ConvertHKToMalayOdds(new4.get_FT_UnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Euro:
                                                    new4.set_FT_OverOddsString(SportBookFunction.ConvertEuroToMalayOdds(new4.get_FT_OverOddsString()));
                                                    new4.set_FT_UnderOddsString(SportBookFunction.ConvertEuroToMalayOdds(new4.get_FT_UnderOddsString()));
                                                    break;

                                                case EnumCollection.eOddsType.Indo:
                                                    new4.set_FT_OverOddsString(SportBookFunction.ConvertIndoToMalayOdds(new4.get_FT_OverOddsString()));
                                                    new4.set_FT_UnderOddsString(SportBookFunction.ConvertIndoToMalayOdds(new4.get_FT_UnderOddsString()));
                                                    break;
                                            }
                                        }
                                        new4.set_GlobalLastUpdate(DateTime.Now);
                                        list2.Add(new4);
                                    }
                                }
                                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;
        }