Minor changes

This commit is contained in:
bg45
2017-10-11 15:10:28 -04:00
committed by BONNEVILLE Geoffroy
parent 2f1355104e
commit f1737ca9f7
3 changed files with 10 additions and 4 deletions

View File

@@ -40,10 +40,10 @@ namespace ModernKeePass.Common
{ {
key.AddUserKey(new KcpPassword(password)); key.AddUserKey(new KcpPassword(password));
var ioConnection = IOConnectionInfo.FromFile(DatabaseFile); var ioConnection = IOConnectionInfo.FromFile(DatabaseFile);
if (createNew) /*if (createNew)
{ {
_pwDatabase.New(ioConnection, key); _pwDatabase.Save(new NullStatusLogger());
} }*/
_pwDatabase.Open(ioConnection, key, new NullStatusLogger()); _pwDatabase.Open(ioConnection, key, new NullStatusLogger());
if (_pwDatabase.IsOpen) if (_pwDatabase.IsOpen)

View File

@@ -1,5 +1,4 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Windows.Storage;
using Windows.System; using Windows.System;
using Windows.UI.Core; using Windows.UI.Core;
using Windows.UI.Xaml; using Windows.UI.Xaml;

View File

@@ -18,6 +18,13 @@ namespace ModernKeePass.ViewModels
get { return ((App)Application.Current).Database.Name; } get { return ((App)Application.Current).Database.Name; }
} }
public OpenVm()
{
var database = ((App)Application.Current).Database;
if (database == null || database.Status != DatabaseHelper.DatabaseStatus.Opening) return;
OpenFile(database.DatabaseFile);
}
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(string propertyName) private void NotifyPropertyChanged(string propertyName)