Added UI app.

This commit is contained in:
2025-06-01 22:29:14 -04:00
parent 1348684144
commit 7dbcdc6169
36 changed files with 1645 additions and 25 deletions

View File

@@ -0,0 +1,37 @@
using MangaReader.WinUI.ViewModels;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.UI.Xaml;
using System;
namespace MangaReader.WinUI;
public partial class App : Application
{
private Window? _window;
public static IServiceProvider ServiceProvider { get; private set; }
static App()
{
ServiceCollection services = new();
services.AddSingleton<MainWindow>();
services.AddSingleton<SearchViewModel>();
services.AddMangaReader();
ServiceProvider = services.BuildServiceProvider();
}
public App()
{
InitializeComponent();
}
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
_window = ServiceProvider.GetRequiredService<MainWindow>();
_window.Activate();
}
}