Inheritance: PsHandler.PokerMath.PokerHand
Ejemplo n.º 1
0
 //
 public void AddHand(Hand hand)
 {
     lock (_lock)
     {
         Hands.Add(hand);
         Hands.Sort((o1, o2) => DateTime.Compare(o1.TimeStampET, o2.TimeStampET));
     }
 }
Ejemplo n.º 2
0
        public HandInfo(Hand hand)
        {
            Hand = hand;
            HandNumber = string.Format("{0}", Hand.HandNumber);
            TournamentNumber = Hand.TournamentNumber > 0 ? string.Format("{0}", Hand.TournamentNumber) : "";
            Level = string.Format("{0}/{1}{2}", Hand.LevelSmallBlind, Hand.LevelBigBlind, Hand.LevelAnte > 0 ? string.Format(" ({0})", Hand.LevelAnte) : "");
            BuyIn = Hand.IsTournament ? string.Format("{1}{0}", Hand.TotalBuyIn, PokerEnums.CurrencySigns[(int)Hand.Currency]) : "";

            Time = hand.TimeStampLocal;

            ImageSourceCard0 = new BitmapImage(new Uri(string.Format(@"pack://*****:*****@"pack://application:,,,/Images/Resources/Replayer/CardsSmall/blank.png"), UriKind.Absolute));
            ImageSourceCommunityCard0 = new BitmapImage(new Uri(string.Format(@"pack://*****:*****@"pack://application:,,,/Images/Resources/Replayer/CardsSmall/empty.png"), UriKind.Absolute));
            ImageSourceCommunityCard2 = new BitmapImage(new Uri(string.Format(@"pack://*****:*****@"pack://application:,,,/Images/Resources/Replayer/CardsSmall/empty.png"), UriKind.Absolute));
            ImageSourceCommunityCard4 = new BitmapImage(new Uri(string.Format(@"pack://*****:*****@"pack://application:,,,/Images/Resources/Replayer/CardsSmall/{0}.png", pocketCards[0]), UriKind.Absolute));
                    ImageSourceCard1 = new BitmapImage(new Uri(string.Format(@"pack://*****:*****@"pack://application:,,,/Images/Resources/Replayer/CardsSmall/{0}.png", flop.First().FlopCards[0]), UriKind.Absolute));
                ImageSourceCommunityCard1 = new BitmapImage(new Uri(string.Format(@"pack://*****:*****@"pack://application:,,,/Images/Resources/Replayer/CardsSmall/{0}.png", flop.First().FlopCards[2]), UriKind.Absolute));

                var turn = Hand.PokerCommands.OfType<PokerCommands.Turn>();
                if (turn.Count() == 1)
                {
                    ImageSourceCommunityCard3 = new BitmapImage(new Uri(string.Format(@"pack://*****:*****@"pack://application:,,,/Images/Resources/Replayer/CardsSmall/{0}.png", river.First().RiverCard), UriKind.Absolute));
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public void AddHand(Hand hand)
 {
     Methods.UiInvoke(() =>
     {
         if (_handsInfo.All(a => a.Hand.HandNumber != hand.HandNumber))
         {
             _handsInfo.Add(new HandInfo(hand));
         }
         GridView_TablesInfo.ResetColumnWidths();
     });
 }