示例#1
0
        private void NewsButton_Click(object sender, RoutedEventArgs e)
        {
            NewsPage newsPage = new NewsPage();

            newsPage.Show();
            this.Close();
        }
 private void Register_Button(object sender, RoutedEventArgs e)
 {
     // Register new user
     if (passwordTxt.Password == confirmPasswordTxt.Password)
     {
         User newUser = new User();
         newUser.login    = loginTxt.Text;
         newUser.Email    = emailTxt.Text;
         newUser.password = passwordTxt.Password;
         if (emailTxt.Text.Contains("@gmail.com"))
         {
             // SendEmail(emailTxt.Text);
         }
         NewsPage newsPage = new NewsPage();
         newsPage.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Passwords are not the same");
     }
     // Open News page
 }