Ejemplo n.º 1
0
        public bool IsMatchBetCanBet(MatchBetNew new1)
        {
            bool flag = false;
            if (this.IsToBetAll)
            {
                return true;
            }
            switch (new1.get_BetTarget())
            {
                case EnumCollection.eBetTarget.FT_Home:
                    if (!((new1.get_HomeColor() == Color.Blue) & (new1.get_AwayColor() == Color.Blue)))
                    {
                        if (((new1.get_HomeColor() == Color.Blue) & this.IsToBetFTEat) | ((new1.get_HomeColor() == Color.Red) & this.IsToBetFTPut))
                        {
                            flag = true;
                        }
                        return flag;
                    }
                    if (this.IsToBetFTEat | this.IsToBetFTPut)
                    {
                        flag = true;
                    }
                    return flag;

                case EnumCollection.eBetTarget.FT_Away:
                    if (!((new1.get_HomeColor() == Color.Blue) & (new1.get_AwayColor() == Color.Blue)))
                    {
                        if (((new1.get_AwayColor() == Color.Blue) & this.IsToBetFTEat) | ((new1.get_AwayColor() == Color.Red) & this.IsToBetFTPut))
                        {
                            flag = true;
                        }
                        return flag;
                    }
                    if (this.IsToBetFTEat | this.IsToBetFTPut)
                    {
                        flag = true;
                    }
                    return flag;

                case EnumCollection.eBetTarget.FT_Over:
                    if (this.IsToBetFTOver)
                    {
                        flag = true;
                    }
                    return flag;

                case EnumCollection.eBetTarget.FT_Under:
                    if (this.IsToBetFTUnder)
                    {
                        flag = true;
                    }
                    return flag;

                case EnumCollection.eBetTarget.Half_Home:
                    if (!((new1.get_HomeColor() == Color.Blue) & (new1.get_AwayColor() == Color.Blue)))
                    {
                        if (((new1.get_HomeColor() == Color.Blue) & this.IsToBetHalfEat) | ((new1.get_HomeColor() == Color.Red) & this.IsToBetHalfPut))
                        {
                            flag = true;
                        }
                        return flag;
                    }
                    if (this.IsToBetHalfEat | this.IsToBetHalfPut)
                    {
                        flag = true;
                    }
                    return flag;

                case EnumCollection.eBetTarget.Half_Away:
                    if (!((new1.get_HomeColor() == Color.Blue) & (new1.get_AwayColor() == Color.Blue)))
                    {
                        if (((new1.get_AwayColor() == Color.Blue) & this.IsToBetHalfEat) | ((new1.get_AwayColor() == Color.Red) & this.IsToBetHalfPut))
                        {
                            flag = true;
                        }
                        return flag;
                    }
                    if (this.IsToBetHalfEat | this.IsToBetHalfPut)
                    {
                        flag = true;
                    }
                    return flag;

                case EnumCollection.eBetTarget.Half_Over:
                    if (this.IsToBetHalfOver)
                    {
                        flag = true;
                    }
                    return flag;

                case EnumCollection.eBetTarget.Half_Under:
                    if (this.IsToBetHalfUnder)
                    {
                        flag = true;
                    }
                    return flag;
            }
            return flag;
        }
Ejemplo n.º 2
0
 public static MatchNew FindMatchByMatchBetViaMatchingID(MatchBetNew new1, List<MatchNew> list1)
 {
     MatchNew new3 = new MatchNew();
     MatchNew new4 = new MatchNew();
     if ((new1.get_HomeMatchingID() > 0) & (new1.get_AwayMatchingID() > 0))
     {
         new1.GenerateUpperCaseInfo();
         if (new1.get_BetCoverage() == EnumCollection.eBetCoverage.FT)
         {
             if (new1.get_BetType() == EnumCollection.eBetType.HDP)
             {
                 foreach (MatchNew neww3 in list1)
                 {
                     if ((((neww3.get_Type() == EnumCollection.eMatchType.Match) & (neww3.get_HomeMatchingID() > 0)) & (neww3.get_AwayMatchingID() > 0)) && (((((new1.get_HomeMatchingID() == neww3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == neww3.get_AwayMatchingID())) & (new1.get_HDP() == neww3.get_FTHDP())) & (new1.get_HomeColor() == neww3.get_FTHomeColor())) & (new1.get_AwayColor() == neww3.get_FTAwayColor())))
                     {
                         return neww3;
                     }
                 }
                 return new4;
             }
             foreach (MatchNew neww3 in list1)
             {
                 if ((((neww3.get_Type() == EnumCollection.eMatchType.Match) & (neww3.get_HomeMatchingID() > 0)) & (neww3.get_AwayMatchingID() > 0)) && (((new1.get_HomeMatchingID() == neww3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == neww3.get_AwayMatchingID())) & (new1.get_HDP() == neww3.get_FTOU())))
                 {
                     return neww3;
                 }
             }
             return new4;
         }
         if (new1.get_BetType() == EnumCollection.eBetType.HDP)
         {
             foreach (MatchNew newww3 in list1)
             {
                 if ((((newww3.get_Type() == EnumCollection.eMatchType.Match) & (newww3.get_HomeMatchingID() > 0)) & (newww3.get_AwayMatchingID() > 0)) && ((((new1.get_HomeMatchingID() == newww3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == newww3.get_AwayMatchingID())) & (new1.get_HDP() == newww3.get_HalfHDP())) & ((((new1.get_HomeColor() == newww3.get_HalfHomeColor()) & (new1.get_AwayColor() == newww3.get_HalfAwayColor())) & (new1.get_HDP() != "0.0")) | (new1.get_HDP() == "0.0"))))
                 {
                     return newww3;
                 }
             }
             return new4;
         }
         foreach (MatchNew newwwww3 in list1)
         {
             if ((((newwwww3.get_Type() == EnumCollection.eMatchType.Match) & (newwwww3.get_HomeMatchingID() > 0)) & (newwwww3.get_AwayMatchingID() > 0)) && (((new1.get_HomeMatchingID() == newwwww3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == newwwww3.get_AwayMatchingID())) & (new1.get_HDP() == newwwww3.get_HalfOU())))
             {
                 return newwwww3;
             }
         }
     }
     return new4;
 }
Ejemplo n.º 3
0
        public static MatchNew FindMatchByMatchBet(MatchBetNew new1, List<MatchNew> list1)
        {
            MatchNew new3 = new MatchNew();
            MatchNew new4 = new MatchNew();
            new1.GenerateUpperCaseInfo();
            if (new1.get_BetCoverage() == EnumCollection.eBetCoverage.FT)
            {
                if (new1.get_BetType() == EnumCollection.eBetType.HDP)
                {
                    foreach (MatchNew neww3 in list1)
                    {

                        if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTHDP())) & (new1.get_HomeColor() == neww3.get_FTHomeColor())) & (new1.get_AwayColor() == neww3.get_FTAwayColor())))
                        {
                            return neww3;
                        }
                    }
                    return new4;
                }
                foreach (MatchNew neww3 in list1)
                {
                    if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTOU())))
                    {
                        return neww3;
                    }

                    // add 1X2
                    if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FT1X2() & neww3.get_FT_1X2HomeOddsString() != 0)))
                    {
                        return neww3;
                    }
                }
                return new4;
            }
            if (new1.get_BetType() == EnumCollection.eBetType.HDP)
            {
                foreach (MatchNew neww3 in list1)
                {
                    if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfHDP())) & ((((new1.get_HomeColor() == neww3.get_HalfHomeColor()) & (new1.get_AwayColor() == neww3.get_HalfAwayColor())) & (new1.get_HDP() != "0.0")) | (new1.get_HDP() == "0.0"))))
                    {
                        return neww3;
                    }
                }
                return new4;
            }
            foreach (MatchNew neww3 in list1)
            {
                // o/u
                if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfOU())))
                {
                    return neww3;
                }

                // add 1X2
                if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_Half1X2() & neww3.get_Half_1X2HomeOddsString() != 0)))
                {
                    return neww3;
                }
            }
            return new4;
        }
Ejemplo n.º 4
0
 public static MatchNew FindMatchByMatchBetFuzzy(MatchBetNew new1, List<MatchNew> list1)
 {
     MatchNew new3 = new MatchNew();
     MatchNew new4 = new MatchNew();
     new1.GenerateUpperCaseInfo();
     if (new1.get_BetCoverage() == EnumCollection.eBetCoverage.FT)
     {
         if (new1.get_BetType() == EnumCollection.eBetType.HDP)
         {
             foreach (MatchNew neww3 in list1)
             {
                 if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTHDP())) & (new1.get_HomeColor() == neww3.get_FTHomeColor())) & (new1.get_AwayColor() == neww3.get_FTAwayColor())))
                 {
                     return neww3;
                 }
             }
             return new4;
         }
         foreach (MatchNew neww3 in list1)
         {
             if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTOU())))
             {
                 return neww3;
             }
         }
         return new4;
     }
     if (new1.get_BetType() == EnumCollection.eBetType.HDP)
     {
         foreach (MatchNew neww3 in list1)
         {
             if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfHDP())) & ((((new1.get_HomeColor() == neww3.get_HalfHomeColor()) & (new1.get_AwayColor() == neww3.get_HalfAwayColor())) & (new1.get_HDP() != "0.0")) | (new1.get_HDP() == "0.0"))))
             {
                 return neww3;
             }
         }
         return new4;
     }
     foreach (MatchNew neww3 in list1)
     {
         if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfOU())))
         {
             return neww3;
         }
     }
     return new4;
 }
Ejemplo n.º 5
0
 private int GetIndexByMatch(MatchBetNew new1)
 {
     int num2;
     int num3 = -1;
     if (this._intType != 1)
     {
         int num6 = this._objList.Count - 1;
         for (num2 = 0; num2 <= num6; num2++)
         {
             if ((this._objList[num2].get_HomeName() == new1.get_HomeName()) & (this._objList[num2].get_AwayName() == new1.get_AwayName()))
             {
                 num3 = num2;
                 break;
             }
         }
     }
     else
     {
         int num4 = this._objList.Count - 1;
         for (num2 = 0; num2 <= num4; num2++)
         {
             if (((((((this._objList[num2].get_HomeName() == new1.get_HomeName()) & (this._objList[num2].get_AwayName() == new1.get_AwayName())) & (this._objList[num2].get_BetCoverage() == new1.get_BetCoverage())) & (this._objList[num2].get_BetType() == new1.get_BetType())) & (this._objList[num2].get_HomeColor() == new1.get_HomeColor())) & (this._objList[num2].get_AwayColor() == new1.get_AwayColor())) & (this._objList[num2].get_HDP() == new1.get_HDP()))
             {
                 num3 = num2;
                 break;
             }
         }
         if (((num3 == -1) & (new1.get_HomeMatchingID() > 0)) & (new1.get_AwayMatchingID() > 0))
         {
             int num5 = this._objList.Count - 1;
             for (num2 = 0; num2 <= num5; num2++)
             {
                 if (((((((this._objList[num2].get_HomeMatchingID() == new1.get_HomeMatchingID()) & (this._objList[num2].get_AwayMatchingID() == new1.get_AwayMatchingID())) & (this._objList[num2].get_BetCoverage() == new1.get_BetCoverage())) & (this._objList[num2].get_BetType() == new1.get_BetType())) & (this._objList[num2].get_HomeColor() == new1.get_HomeColor())) & (this._objList[num2].get_AwayColor() == new1.get_AwayColor())) & (this._objList[num2].get_HDP() == new1.get_HDP()))
                 {
                     return num2;
                 }
             }
         }
         return num3;
     }
     if (((num3 == -1) & (new1.get_HomeMatchingID() > 0)) & (new1.get_AwayMatchingID() > 0))
     {
         int num7 = this._objList.Count - 1;
         for (num2 = 0; num2 <= num7; num2++)
         {
             if ((this._objList[num2].get_HomeMatchingID() == new1.get_HomeMatchingID()) & (this._objList[num2].get_AwayMatchingID() == new1.get_AwayMatchingID()))
             {
                 return num2;
             }
         }
     }
     return num3;
 }