Exemplo n.º 1
0
        private void ShowNextTour()
        {
            var tours       = League.Tours;
            int indexOfTour = Array.IndexOf(tours, Tour);

            IndexCarer.Increment(ref indexOfTour, tours.Length - 1);
            if (tours.Length > 0)
            {
                using (var repository = new GameRepository(DatabaseSourceDefinitor.ConnectionString))
                {
                    GamesInTour = repository.GetGamesInTour(tours[indexOfTour].Id);
                }
                Tour = tours[indexOfTour];
            }
        }
Exemplo n.º 2
0
        private void ShowNextSeason()
        {
            int indexOfLeague = Array.IndexOf(Leagues, League);

            IndexCarer.Increment(ref indexOfLeague, Leagues.Length - 1);
            if (Leagues.Length > 0)
            {
                League = Leagues[indexOfLeague];
                Tour   = League.Tours[0];
                using (var repository = new GameRepository(DatabaseSourceDefinitor.ConnectionString))
                {
                    GamesInTour = repository.GetGamesInTour(Tour.Id);
                }
                League.Calculate();
                TeamsStat = League.TeamStats;
            }
        }