mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Create a shared project with all Win App common files (8.1 and 10)
Finally use the dependency injected Resource Service
This commit is contained in:
@@ -12,7 +12,6 @@ using ModernKeePass.Application.Security.Commands.GenerateKeyFile;
|
||||
using ModernKeePass.Application.Security.Queries.EstimatePasswordComplexity;
|
||||
using ModernKeePass.Domain.AOP;
|
||||
using ModernKeePass.Domain.Dtos;
|
||||
using ModernKeePass.Common;
|
||||
|
||||
namespace ModernKeePass.ViewModels
|
||||
{
|
||||
@@ -113,15 +112,18 @@ namespace ModernKeePass.ViewModels
|
||||
private string _keyFileText;
|
||||
private readonly IMediator _mediator;
|
||||
private readonly ISettingsProxy _settings;
|
||||
private readonly ResourceHelper _resource;
|
||||
private readonly IResourceProxy _resource;
|
||||
|
||||
public CompositeKeyVm() : this(App.Services.GetRequiredService<IMediator>(), App.Services.GetRequiredService<ISettingsProxy>()) { }
|
||||
public CompositeKeyVm() : this(
|
||||
App.Services.GetRequiredService<IMediator>(),
|
||||
App.Services.GetRequiredService<ISettingsProxy>(),
|
||||
App.Services.GetRequiredService<IResourceProxy>()) { }
|
||||
|
||||
public CompositeKeyVm(IMediator mediator, ISettingsProxy settings)
|
||||
public CompositeKeyVm(IMediator mediator, ISettingsProxy settings, IResourceProxy resource)
|
||||
{
|
||||
_mediator = mediator;
|
||||
_settings = settings;
|
||||
_resource = new ResourceHelper();
|
||||
_resource = resource;
|
||||
_keyFileText = _resource.GetResourceValue("CompositeKeyDefaultKeyFile");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user