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:
Geoffroy BONNEVILLE
2020-04-17 16:56:07 +02:00
parent 2fb5b14085
commit 73670e8689
73 changed files with 131 additions and 1872 deletions

View File

@@ -6,10 +6,11 @@ namespace ModernKeePass.Infrastructure.UWP
public class UwpResourceClient: IResourceProxy
{
private const string ResourceFileName = "CodeBehind";
private readonly ResourceLoader _resourceLoader = ResourceLoader.GetForCurrentView();
private ResourceLoader _resourceLoader;
public string GetResourceValue(string key)
{
if (_resourceLoader == null) _resourceLoader = ResourceLoader.GetForCurrentView();
var resource = _resourceLoader.GetString($"/{ResourceFileName}/{key}");
return resource;
}