Exemplo n.º 1
0
        private void Register_Click(object sender, RoutedEventArgs e)
        {
            RegisterWindow main = new RegisterWindow();

            App.Current.MainWindow = main;
            this.Close();
            main.Show();
        }
Exemplo n.º 2
0
        private void Login_Click(object sender, RoutedEventArgs e)
        {
            UserCollection.fillListFromDB();
            enteredUsername = Username_Textbox.Text;
            sessionPlayer   = UserCollection.ReturnAUser(enteredUsername);

            if (sessionPlayer.UserName == enteredUsername)
            {
                MainMenu main = new MainMenu(sessionPlayer);
                App.Current.MainWindow = main;
                this.Close();
                main.Show();
            }
            else
            {
                RegisterWindow main = new RegisterWindow();
                App.Current.MainWindow = main;
                this.Close();
                main.Show();
            }
        }