예제 #1
0
 private void edit_Click(object sender, RoutedEventArgs e)
 {
     if (newPassword.Password.Length <= 5)
     {
         newPassword.Background = new SolidColorBrush(Color.FromRgb(219, 88, 86));
     }
     if (checkOldPassword(strlogin, RegistrationWindow.Encrypt(oldPassword.Password, "kursach")) && newPassword.Password.Length > 5)
     {
         EditPassword(strlogin, RegistrationWindow.Encrypt(oldPassword.Password, "kursach"), RegistrationWindow.Encrypt(newPassword.Password, "kursach"));
         MessageBox.Show("Пароль успешно изменён.");
         this.Close();
     }
     else
     {
         oldPassword.Background = new SolidColorBrush(Color.FromRgb(219, 88, 86));
     }
 }