Ejemplo n.º 1
0
        private void FillStatistics(PlayerStatistics statistics)
        {
            // For each statistic category
            foreach (String category in statistics.GetCategories())
            {
                // Find the tab page for this category
                TabPage tp = FindTabPage(category);

                StatisticItemListDisplay itemListDisplay = new StatisticItemListDisplay();

                // Initialize properties FIRST!
                itemListDisplay.Top               = topMargin;
                itemListDisplay.TopMargin         = 0;
                itemListDisplay.StatisticsSpacing = statisticsSpacing;
                itemListDisplay.Width             = this.ClientSize.Width - 1;
                itemListDisplay.Height            = this.ClientSize.Height - 1;
                itemListDisplay.AutoSize          = true;
                itemListDisplay.Anchor            = AnchorStyles.Left | AnchorStyles.Right;

                // Show stats
                itemListDisplay.Add(statistics.GetStatistics(category));

                tp.Controls.Add(itemListDisplay);
            }

            AdjustControls();
        }
Ejemplo n.º 2
0
        protected void DisplayOdds(HoldemHand playerHand, HoldemBoard board)
        {
            // Display odds
            List <Statistic> odds = ((HoldemOddsCalculator)oddsCalculator).Calculate(playerHand, board);

            StatisticItemListDisplay statisticListDisplay = CreateStatisticItemListDisplay();

            statisticListDisplay.Add(odds);

            handControlLayout.Controls.Add(statisticListDisplay);
        }
Ejemplo n.º 3
0
        protected virtual void DisplayOdds(Hand playerHand)
        {
            // Display odds
            List <Statistic> odds = oddsCalculator.Calculate(playerHand);

            StatisticItemListDisplay statisticListDisplay = CreateStatisticItemListDisplay();

            statisticListDisplay.Add(odds);

            handControlLayout.Controls.Add(statisticListDisplay);
        }
Ejemplo n.º 4
0
        protected StatisticItemListDisplay CreateStatisticItemListDisplay()
        {
            StatisticItemListDisplay statisticListDisplay = new StatisticItemListDisplay();

            statisticListDisplay.BackColor         = Color.Transparent;
            statisticListDisplay.TopMargin         = 0;
            statisticListDisplay.Anchor            = AnchorStyles.Left | AnchorStyles.Right;
            statisticListDisplay.Width             = handControlLayout.Width - handControlLayout.Padding.Right - handControlLayout.Padding.Left;
            statisticListDisplay.StatisticsSpacing = 2;
            statisticListDisplay.AutoSize          = true;
            return(statisticListDisplay);
        }
Ejemplo n.º 5
0
 protected StatisticItemListDisplay CreateStatisticItemListDisplay()
 {
     StatisticItemListDisplay statisticListDisplay = new StatisticItemListDisplay();
     statisticListDisplay.BackColor = Color.Transparent;
     statisticListDisplay.TopMargin = 0;
     statisticListDisplay.Anchor = AnchorStyles.Left | AnchorStyles.Right;
     statisticListDisplay.Width = handControlLayout.Width - handControlLayout.Padding.Right - handControlLayout.Padding.Left;
     statisticListDisplay.StatisticsSpacing = 2;
     statisticListDisplay.AutoSize = true;
     return statisticListDisplay;
 }
Ejemplo n.º 6
0
        private void FillStatistics(PlayerStatistics statistics)
        {
            // For each statistic category
            foreach (String category in statistics.GetCategories())
            {
                // Find the tab page for this category
                TabPage tp = FindTabPage(category);

                StatisticItemListDisplay itemListDisplay = new StatisticItemListDisplay();

                // Initialize properties FIRST!
                itemListDisplay.Top = topMargin;
                itemListDisplay.TopMargin = 0;
                itemListDisplay.StatisticsSpacing = statisticsSpacing;
                itemListDisplay.Width = this.ClientSize.Width - 1;
                itemListDisplay.Height = this.ClientSize.Height - 1;
                itemListDisplay.AutoSize = true;
                itemListDisplay.Anchor = AnchorStyles.Left | AnchorStyles.Right;

                // Show stats
                itemListDisplay.Add(statistics.GetStatistics(category));

                tp.Controls.Add(itemListDisplay);
            }

            AdjustControls();
        }