inject the widget assembly into the IoC as we are going to need it further in

This commit is contained in:
TheXamlGuy
2024-01-27 16:21:53 +00:00
parent 48925b89ff
commit 640b3292b2
16 changed files with 105 additions and 64 deletions
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.231202003-experimental1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26031-preview" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,31 @@
using Windows.ApplicationModel.Resources.Core;
using Windows.Storage;
namespace Hyperbar.Widget;
public interface IWidgetResourceInitialization :
IInitializer
{
}
public class WidgetResourceInitialization :
IInitializer
{
public async Task InitializeAsync()
{
//FileInfo resourcePriFileInfo = new(Path.Combine(ForeignAssemblyDir, "resources.pri"));
//if (!resourcePriFileInfo.Exists)
//{
// resourcePriFileInfo = new(Path.Combine(ForeignAssemblyDir, $"{ForeignAssemblyName}.pri"));
//}
//if (!resourcePriFileInfo.Exists)
//{
// return;
//}
//StorageFile file = await StorageFile.GetFileFromPathAsync(resourcePriFileInfo.FullName);
//ResourceManager.Current.LoadPriFiles(new[] { file });
}
}