コード例 #1
0
        private void Button_Click_Back(object sender, RoutedEventArgs e)
        {
            AdminWindow adminWindow = new AdminWindow();

            this.Close();
            adminWindow.Show();
        }
コード例 #2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (toChangePass)
     {
         password = passwordBox.Password;
         MessageBox.Show("Password changed successfuly!", "Password Changing", MessageBoxButton.OK, MessageBoxImage.Information);
         Close();
     }
     else
     {
         if (passwordBox.Password == password)
         {
             AdminWindow adminWindow = new AdminWindow();
             adminWindow.Show();
             main.Close();
             Close();
         }
         else
         {
             MessageBox.Show("Wrong Password! Try agein", "Security Alarm", MessageBoxButton.OK, MessageBoxImage.Stop);
         }
     }
 }