mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Moved application code to the Application layer
Imported Win10 project Code cleanup WIP - Use common UWP services for Win8.1 and Win10
This commit is contained in:
20
ModernKeePass10/ViewModels/SettingsViewModel.cs
Normal file
20
ModernKeePass10/ViewModels/SettingsViewModel.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Autofac;
|
||||
using ModernKeePass.Domain.Interfaces;
|
||||
|
||||
namespace ModernKeePass.ViewModels
|
||||
{
|
||||
public class SettingsViewModel
|
||||
{
|
||||
private readonly IDatabaseService _database;
|
||||
|
||||
public bool IsDatabaseOpened => _database != null && _database.IsOpen;
|
||||
|
||||
public SettingsViewModel() : this(App.Container.Resolve<IDatabaseService>())
|
||||
{ }
|
||||
|
||||
public SettingsViewModel(IDatabaseService database)
|
||||
{
|
||||
_database = database;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user