Пример #1
0
 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);
 }
Пример #2
0
 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;
 }
Пример #3
0
 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;
 }
Пример #4
0
        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();
        }