public void Initialize() { Fishers = new ListRepository <Fisher>(); TournamentResults = new ListRepository <TournamentResult>(); AppSettings = new ListRepository <AppSettings>(); AppSettings.Data.Add(new AppSettings()); System = new TournamentSystem(Fishers, TournamentResults, AppSettings); }
public TournamentCategory(string name, Sex sex, int minAge, int maxAge, BallSize ball, TournamentSystem system) { CategoryName = name; Sex = sex; MinAge = minAge; MaxAge = maxAge; Ball = ball; System = system; }
public void SetSystem(TournamentSystem system) { if (system != TournamentSystem.Circle) { this.IsNumberOfToursEnabled = true; } else { SetNumberOfTours(this.players.Count + this.players.Count % 2 - 1); this.IsNumberOfToursEnabled = false; } this.System = system; }
public TournamentModel() { Players = new ReadOnlyObservableCollection <Player>(players); Judges = new ReadOnlyObservableCollection <Judge>(judges); name = "new tournament"; system = TournamentSystem.Circle; organizer = "Moscow Go Federation"; startDate = DateTime.Now; endDate = DateTime.Now.AddDays(1); numberOfTours = 0; isNumberOfToursEnabled = false; currentTour = 0; LoadAllPlayers(); }