Added password complexity indicator on new database

Database password control now inside a Border element
Save page also has a title
This commit is contained in:
2017-10-16 16:16:58 +02:00
committed by BONNEVILLE Geoffroy
parent 5497e6fc00
commit 2b8d37057c
13 changed files with 92 additions and 33 deletions

View File

@@ -0,0 +1,21 @@
using ModernKeePassLib.Cryptography;
namespace ModernKeePass.ViewModels
{
public class NewVm : OpenVm
{
private string _password = string.Empty;
public string Password
{
get { return _password; }
set
{
_password = value;
NotifyPropertyChanged("PasswordComplexityIndicator");
}
}
public double PasswordComplexityIndicator => QualityEstimation.EstimatePasswordBits(Password.ToCharArray());
}
}

View File

@@ -27,7 +27,7 @@ namespace ModernKeePass.ViewModels
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(string propertyName)
protected void NotifyPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

View File

@@ -9,7 +9,7 @@ namespace ModernKeePass.ViewModels
{
private RecentItemVm _selectedItem;
private ObservableCollection<RecentItemVm> _recentItems = new ObservableCollection<RecentItemVm>();
public ObservableCollection<RecentItemVm> RecentItems
{
get { return _recentItems; }