mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Layout change in CompositeKey user control
Button text is now settable Opening database is placed in async task dispatcher to return control to the UI
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Storage;
|
||||
using Windows.UI.Xaml;
|
||||
using ModernKeePass.Common;
|
||||
@@ -73,6 +74,7 @@ namespace ModernKeePass.ViewModels
|
||||
_password = value;
|
||||
OnPropertyChanged("PasswordComplexityIndicator");
|
||||
StatusType = (int)StatusTypes.Normal;
|
||||
Status = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +106,7 @@ namespace ModernKeePass.ViewModels
|
||||
Database = database;
|
||||
}
|
||||
|
||||
public bool OpenDatabase(bool createNew)
|
||||
public async Task<bool> OpenDatabase(bool createNew)
|
||||
{
|
||||
var error = string.Empty;
|
||||
try
|
||||
@@ -118,7 +120,7 @@ namespace ModernKeePass.ViewModels
|
||||
switch ((DatabaseHelper.DatabaseStatus)Database.Status)
|
||||
{
|
||||
case DatabaseHelper.DatabaseStatus.Opened:
|
||||
RootGroup = Database.RootGroup;
|
||||
await Task.Run( () => RootGroup = Database.RootGroup);
|
||||
return true;
|
||||
case DatabaseHelper.DatabaseStatus.CompositeKeyError:
|
||||
var errorMessage = new StringBuilder("Error: wrong ");
|
||||
|
@@ -1,6 +1,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.Text;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
Reference in New Issue
Block a user