feat: MainView

This commit is contained in:
2026-04-13 09:29:03 +03:00
parent 8cf1c89863
commit 16c5b5d42f
9 changed files with 518 additions and 3 deletions
+27
View File
@@ -0,0 +1,27 @@
using Microsoft.Extensions.DependencyInjection;
using GSS2.UI.Core.ViewModels;
using GSS2.UI.Core.Services;
using GSS2.Views;
using GSS2.ViewModels;
using Microsoft.Extensions.Logging;
namespace GSS2;
public static class DependencyInjectionHelper
{
public static IServiceCollection AddViewsAndModels(this IServiceCollection services) =>
services
.AddSingleton<DependencyInjectionViewLocator>((services) =>
new DependencyInjectionViewLocator(
services.GetRequiredService<ILogger<DependencyInjectionViewLocator>>(),
services
)
)
.AddSingleton<NavigationService>((_) => new NavigationService(Application.Current?.ApplicationLifetime))
.AddSingleton<MainWindowViewModel>()
.AddSingleton<MainView>()
.AddSingleton<MainViewModel>()
.AddSingleton<AmineContentView>()
.AddSingleton<AmineContentViewModel>();
}