Esempio n. 1
0
        public void Play(object param)
        {
            if (SelectedUser.GameProperty == null)
            {
                SelectedUser.GameProperty = new Game();
            }
            ChooseWindow    chooseWindow = new ChooseWindow();
            ChooseViewModel chooseVM     = new ChooseViewModel(SelectedUser);

            chooseWindow.DataContext = chooseVM;
            App.Current.MainWindow.Close();
            App.Current.MainWindow = chooseWindow;
            chooseWindow.Show();
        }
Esempio n. 2
0
 public void Back(object param)
 {
     if (fromSignUp == false)
     {
         ChooseWindow    chooseWindow = new ChooseWindow();
         ChooseViewModel chooseVM     = new ChooseViewModel(user);
         chooseWindow.DataContext = chooseVM;
         App.Current.MainWindow.Close();
         App.Current.MainWindow = chooseWindow;
         chooseWindow.Show();
     }
     else
     {
         SignInWindow    signInWindow = new SignInWindow();
         SignInViewModel signInVM     = new SignInViewModel();
         signInWindow.DataContext = signInVM;
         App.Current.MainWindow.Close();
         App.Current.MainWindow = signInWindow;
         signInWindow.Show();
     }
 }