Add project files.

This commit is contained in:
dan_c
2024-01-04 17:32:36 +00:00
parent 6358cf9567
commit da8af59391
48 changed files with 1710 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
using Hyperbar.Desktop.Controls;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.UI.Xaml;
using System;
namespace Hyperbar.Desktop;
public partial class App :
Application
{
public App() => InitializeComponent();
protected override async void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
IHost? host = Host.CreateDefaultBuilder()
.UseContentRoot(AppContext.BaseDirectory)
.ConfigureServices(args =>
{
args.AddTransient<IInitializer, AppInitializer>();
args.AddTransient<DesktopFlyout>();
args.AddTransient<ITemplateFactory, TemplateFactory>();
args.AddTransient<ITemplateGeneratorFactory, TemplateGeneratorFactory>();
args.AddDataTemplate<CommandViewModel, CommandView>("Commands");
args.AddDataTemplate<ContextualCommandViewModel, ContextualCommandView>();
args.AddHostedService<AppService>();
})
.Build();
await host.RunAsync();
}
}