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)); }
private void InitPools() { PoolsSettingsGrid.DataContext = this; OverlayCanvas.DataContext = this; FinalsPoolItemsControl.Init(this, ERound.Finals, EPool.A); SemiAPoolItemsControl.Init(this, ERound.Semifinals, EPool.A); SemiBPoolItemsControl.Init(this, ERound.Semifinals, EPool.B); QuarterAPoolItemsControl.Init(this, ERound.Quarterfinals, EPool.A); QuarterBPoolItemsControl.Init(this, ERound.Quarterfinals, EPool.B); QuarterCPoolItemsControl.Init(this, ERound.Quarterfinals, EPool.C); QuarterDPoolItemsControl.Init(this, ERound.Quarterfinals, EPool.D); PrelimAPoolItemsControl.Init(this, ERound.Prelims, EPool.A); PrelimBPoolItemsControl.Init(this, ERound.Prelims, EPool.B); PrelimCPoolItemsControl.Init(this, ERound.Prelims, EPool.C); PrelimDPoolItemsControl.Init(this, ERound.Prelims, EPool.D); SetPoolItemsSources(); // Try to generate any future pools GenerateFuturePools(); PoolsScrollViewer.ScrollToRightEnd(); }