Пример #1
0
 private static UserControl reInstance(UserControl page)
 {
     if (page is MatchList)
     {
         if (TournamentListVM.getInstance().IsEditing)
         {
             TournamentListVM.getInstance().UnlockTournament();
         }
         return(new MatchList());
     }
     else if (page is PlayerList)
     {
         if (TournamentListVM.getInstance().IsEditing)
         {
             TournamentListVM.getInstance().UnlockTournament();
         }
         return(new PlayerList());
     }
     else if (page is TournamentList)
     {
         TournamentListVM.getInstance().LoadTournaments();
         TournamentListVM.getInstance().LockTournament();
         return(new TournamentList());
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
        public TournamentList()
        {
            InitializeComponent();
            this.DataContext = TournamentListVM.getInstance();

            activePlayerList.SelectionChanged += ActivePlayerClick;
        }
Пример #3
0
 public void NavTournamentsButton(object sender, object e)
 {
     Authentication.CheckIfLoggedIn(new TournamentList());
     if (Authentication.isAuthenticated)
     {
         TournamentListVM.getInstance().LockTournament();
     }
     ChangeButtonColor(TournamentsButton);
 }
Пример #4
0
 public void NavHomeButton(object sender, object e)
 {
     if (TournamentListVM.getInstance().IsEditing)
     {
         TournamentListVM.getInstance().UnlockTournament();
     }
     ChangeButtonColor(HomeButton);
     MainWindow.main.Content = Home.getInstance();
 }
Пример #5
0
        public void NavMatchesButton(object sender, object e)
        {
            if (TournamentListVM.getInstance().IsEditing)
            {
                TournamentListVM.getInstance().UnlockTournament();
            }

            ChangeButtonColor(MatchesButton);
            Authentication.CheckIfLoggedIn(new MatchList());
        }