Exemplo 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();
        }
Exemplo n.º 2
0
        private void RemoveStatistics(PlayerStatistics statistics)
        {
            // For each statistic category
            foreach (String category in statistics.GetCategories())
            {
                // Find the tab page for this category
                TabPage tp = FindTabPage(category);

                // Clear it
                tp.Controls.Clear();
            }
        }
Exemplo n.º 3
0
        /* Displays the statistics for a player */
        public void DisplayStatistics(Player p)
        {
            lastPlayerDisplayed = p;
            lblPlayerName.Text  = p.Name;

            PlayerStatistics statistics = p.GetStatistics();

            ClearAllTabPages();

            GenerateTabPages(statistics.GetCategories());

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

                // Clear it
                tp.Controls.Clear();
            }
        }
Exemplo n.º 5
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();
        }