private void Button_Click(object sender, RoutedEventArgs e)
 {
     Pass pass = new Pass();
    if (pass.checkPass(PassWord.Password) || pass.checkPassMaster(PassWord.Password))
     {
         buttonClose = false;
         if (!buttonClose)
         {
             _edit.Show();
             Close();
         }
     }
     else
     {
         MessageBox.Show("Incorrect Password");
     }
 }
示例#2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Pass pass = new Pass();
     if (pass.checkPass(PassWord.Password) || pass.checkPassMaster(PassWord.Password))
     {
         try
         {
             new Admin().Show();
             buttonClickClose++;
             this.Close();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.ToString());
         }
     }
     else
     {
         MessageBox.Show("Incorrect Password");
     }
 }
示例#3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
           
            Pass pass = new Pass();
            if (Convert.ToBoolean(!SU.IsChecked))
            {
                if (pass.checkPass(Current.Password))
                {

                    if (New1.Password == New2.Password)
                    {
                        pass.changePassword(New1.Password);
                        this.Close();
                    }
                }
            }
            else if (Convert.ToBoolean(SU.IsChecked))
            {
                MessageBox.Show(SU.IsChecked.ToString());
                if (pass.checkPassMaster(Current.Password))
                {

                    if (New1.Password == New2.Password)
                    {
                        pass.changeSU(New1.Password);
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("The passwords do not match", "Error");
                    }
                }
                else
                {
                    MessageBox.Show("Current password is incorrect", "Try Again");
                }
            }

        }