Esempio n. 1
0
        private void SetPoolItemsSources()
        {
            FinalsPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Finals, EPool.A));
            SemiAPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Semifinals, EPool.A));
            SemiBPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Semifinals, EPool.B));
            QuarterAPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Quarterfinals, EPool.A));
            QuarterBPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Quarterfinals, EPool.B));
            QuarterCPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Quarterfinals, EPool.C));
            QuarterDPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Quarterfinals, EPool.D));

            PrelimAPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.A));
            PrelimBPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.B));
            PrelimCPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.C));
            PrelimDPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.D));
        }
Esempio n. 2
0
        private void SeedPrelimPools(EDivision division, int numPools)
        {
            RoundData rd = tournamentData.GetRound(division, ERound.Prelims);

            rd.pools.Clear();
            for (int i = 0; i < numPools; ++i)
            {
                rd.pools.Add(new PoolData((EPool)i));
            }

            // Only seed teams 25-40 in prelims
            List <TeamData> teams = new List <TeamData>();

            for (int i = 24; i < poolsAllTeamsForDivision.Count() && i < 40; ++i)
            {
                teams.Add(poolsAllTeamsForDivision[i]);
            }

            PrelimAPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.A));

            if (numPools > 1)
            {
                PrelimBPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.B));
            }
            if (numPools > 2)
            {
                PrelimCPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.C));
            }
            if (numPools > 3)
            {
                PrelimDPoolItemsControl.SetItemsSource(tournamentData.GetPool(poolsDivision, ERound.Prelims, EPool.D));
            }


            FillPoolTeams(poolsDivision, poolsRound, teams);
        }