private void viewPassword_Click(object sender, RoutedEventArgs e) { PasswordControl viewPassword = new PasswordControl(); viewPassword.Owner = mainWindow; mainWindow.Opacity = 0.4; viewPassword.controlType.Content = "View"; viewPassword.savePassword.Visibility = Visibility.Hidden; viewPassword.cancelSavePassword.Visibility = Visibility.Hidden; viewPassword.close.Visibility = Visibility.Visible; viewPassword.account_name.Text = selectedPassword.account_name; viewPassword.account_name.IsReadOnly = true; viewPassword.username.Text = selectedPassword.username; viewPassword.username.IsReadOnly = true; viewPassword.password.Text = selectedPassword.password; viewPassword.password.IsReadOnly = true; viewPassword.address.Text = selectedPassword.address; viewPassword.address.IsReadOnly = true; viewPassword.ShowDialog(); }
private void newPassword_Click(object sender, RoutedEventArgs e) { PasswordControl newPassword = new PasswordControl(); newPassword.Owner = mainWindow; mainWindow.Opacity = 0.4; newPassword.controlType.Content = "New Password"; newPassword.ShowDialog(); listPassword(); }
private void editPassword_Click(object sender, RoutedEventArgs e) { PasswordControl updatePassword = new PasswordControl(); updatePassword.Owner = mainWindow; mainWindow.Opacity = 0.4; updatePassword.controlType.Content = "Edit Password"; updatePassword.itemID = selectedPassword.id; updatePassword.account_name.Text = selectedPassword.account_name; updatePassword.username.Text = selectedPassword.username; updatePassword.password.Text = selectedPassword.password; updatePassword.address.Text = selectedPassword.address; updatePassword.ShowDialog(); listPassword(); }