private void RemovePasswordButton_Click(object sender, RoutedEventArgs e) { if (_currentPasswordEntity is null) { MessageBox.Show("Please select password before."); return; } if (MessageBox.Show("Are you want remove passowrd?", "Warning", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { _passwordRepository.Remove(_currentPasswordEntity); RefreshPasswords(); } }