private void ListboxGames_ChangedSelection(object sender, SelectionChangedEventArgs e) { var game = ((ComboBoxItem)combobox_Games.SelectedItem).Tag.ToString();; if (game == "DBA") { creationTournament.Config.NumberRounds = DBA.GetDefaultRounds(); creationTournament.Config.PointsPerWin = DBA.GetDefaultPointsPerWin(); creationTournament.Config.PointsPerDraw = DBA.GetDefaultPointsPerDraw(); creationTournament.Config.PointsPerLoss = DBA.GetDefaultPointsPerLoss(); creationTournament.Config.Tags = DBA.GetDefaultTags(); creationTournament.Config.ScoreFormula = DBA.GetDefaultScoreFormula(); creationTournament.OnPropertyChanged("Config"); } else if (game == "BoltAction") { creationTournament.Config.NumberRounds = BoltAction.GetDefaultRounds(); creationTournament.Config.PointsPerWin = BoltAction.GetDefaultPointsPerWin(); creationTournament.Config.PointsPerDraw = BoltAction.GetDefaultPointsPerDraw(); creationTournament.Config.PointsPerLoss = BoltAction.GetDefaultPointsPerLoss(); creationTournament.Config.Tags = BoltAction.GetDefaultTags(); creationTournament.Config.ScoreFormula = BoltAction.GetDefaultScoreFormula(); creationTournament.OnPropertyChanged("Config"); } }
public Configuration() { NumberRounds = DBA.GetDefaultRounds(); PointsPerWin = DBA.GetDefaultPointsPerWin(); PointsPerDraw = DBA.GetDefaultPointsPerDraw(); PointsPerLoss = DBA.GetDefaultPointsPerLoss(); Tags = DBA.GetDefaultTags(); ScoreFormula = DBA.GetDefaultScoreFormula(); FirstRoundMatchmaking = MatchmakingType.CityClub; RoundMatchmaking = MatchmakingType.Swiss; }