예제 #1
0
        /// <summary>
        /// Erstellt eine neue <see cref="FootballTeamCollection"/> aus der angegeben <see cref="IList"/>
        /// </summary>
        /// <param name="list">Liste</param>
        public static FootballTeamCollection CreateCollection(IList list)
        {
            var col = new FootballTeamCollection();

            col.Add(list);
            return(col);
        }
예제 #2
0
        private void GenerateMatchesButton_Click(object sender, RoutedEventArgs e)
        {
            Settings.LogButtonClicked(sender as Button);
            League.Teams = FootballTeamCollection.CreateCollection(FootballTeamsListBox.SelectedItems);
            League.CreateMatches();

            FillWikiCodeQualComboBoxes();
            FilterTemplatesList();
        }
예제 #3
0
 /// <summary>
 /// Setzt die KO-Runde zurück
 /// </summary>
 public void Reset()
 {
     CurrentTeams        = new FootballTeamCollection(OriginalTeams);
     Matches128          = new ObservableCollection <FootballMatch>();
     Matches64           = new ObservableCollection <FootballMatch>();
     Matches32           = new ObservableCollection <FootballMatch>();
     Matches16           = new ObservableCollection <FootballMatch>();
     MatchesQuarterFinal = new ObservableCollection <FootballMatch>();
     MatchesSemiFinal    = new ObservableCollection <FootballMatch>();
     MatchesFinal        = new ObservableCollection <FootballMatch>();
 }
예제 #4
0
        /// <summary>
        /// Filtert die Teamliste basierend auf Kontinent und Staat
        /// </summary>
        private void FilterTeamList()
        {
            SimpleLog.Info(String.Format("Filter Teamlist: Continent={0} State={1}", SelectedContinent, SelectedState?.Name));

            FilteredTeamList = new FootballTeamCollection(Settings.FootballTeams);
            if (SelectedContinent != EContinent.Unknown)
            {
                FilteredTeamList = new FootballTeamCollection(FilteredTeamList.Where(x => x.State.Continent == SelectedContinent));
            }
            if (SelectedState != null && SelectedState != State.NoneState)
            {
                FilteredTeamList = new FootballTeamCollection(FilteredTeamList.Where(x => x.State == SelectedState));
            }
        }
예제 #5
0
        /// <summary>
        /// Erstellt eine neue Fußballliga
        /// </summary>
        /// <param name="id">ID der Liga</param>
        /// <param name="name">Name der Liga</param>
        /// <param name="roundMode">Rundenmodus der Liga</param>
        /// <param name="teams">Teams der Liga</param>
        public FootballLeague(int id, string name, ELeagueRoundMode roundMode, FootballTeamCollection teams)
            : base(id, name)
        {
            RoundMode = roundMode;
            Teams     = teams;

            SimpleLog.Log(String.Format("Create Football League: {0}", ToString()));

            Matches = new ObservableCollection <FootballMatch>();
            CreateMatches();
            CreateTable();

            SimpleLog.Log(String.Format("Football League created with ID={0}", ID));
        }
예제 #6
0
        /// <summary>
        /// Erstellt eine neue KO-Runde für Fußballspiele
        /// </summary>
        /// <param name="id">ID der KO-Runde</param>
        /// <param name="name">Name der KO-Runde</param>
        /// <param name="roundMode">Rundenmodus der KO-Runde</param>
        /// <param name="teams">Teams der KO-Runde. Zwei direkt aufeinanderfolgende Teams spielen gegeneinander.</param>
        public FootballKORound(int id, string name, EKORoundMode roundMode, FootballTeamCollection teams)
            : base(id, name)
        {
            RoundMode     = roundMode;
            OriginalTeams = teams;


            SimpleLog.Log(String.Format("Create Football KO Round: {0}", ToString()));

            Reset();

            //Matches = new ObservableCollection<FootballMatch>();
            //CreateMatches();
            //CreateTable();

            SimpleLog.Log(String.Format("Football KO Round created with ID={0}", ID));
        }
예제 #7
0
 /// <summary>
 /// Erstellt eine neue KO-Runde für Fußballspiele
 /// </summary>
 /// <param name="teams">Teams der KO-Runde. Zwei direkt aufeinanderfolgende Teams spielen gegeneinander.</param>
 public FootballKORound(FootballTeamCollection teams)
     : this(EKORoundMode.OneMatch, teams)
 {
 }
예제 #8
0
 /// <summary>
 /// Erstellt eine neue KO-Runde für Fußballspiele
 /// </summary>
 /// <param name="roundMode">Rundenmodus der KO-Runde</param>
 /// <param name="teams">Teams der KO-Runde. Zwei direkt aufeinanderfolgende Teams spielen gegeneinander.</param>
 public FootballKORound(EKORoundMode roundMode, FootballTeamCollection teams)
     : this(new Guid().GetHashCode(), String.Empty, roundMode, teams)
 {
 }
예제 #9
0
 /// <summary>
 /// Erstellt eine neue Fußballliga
 /// </summary>
 /// <param name="teams">Teams der Liga</param>
 public FootballLeague(FootballTeamCollection teams)
     : this(ELeagueRoundMode.DoubleRound, teams)
 {
 }