Add project files.
This commit is contained in:
38
Gready_Poang/App.xaml.cs
Normal file
38
Gready_Poang/App.xaml.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using GreadyPoang.DataLayer.Database;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace GreadyPoang;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
private readonly IServiceProvider _services;
|
||||
|
||||
public App(IServiceProvider services, DataContext dataContext)
|
||||
{
|
||||
InitializeComponent();
|
||||
dataContext.Database.EnsureCreated();
|
||||
_services = services;
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
Debugger.Break();
|
||||
};
|
||||
|
||||
TaskScheduler.UnobservedTaskException += (sender, e) =>
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
Debugger.Break();
|
||||
};
|
||||
}
|
||||
|
||||
protected override Window CreateWindow(IActivationState? activationState)
|
||||
{
|
||||
|
||||
//var splashVm = ServiceLocator.Services.GetRequiredService<SplashViewModelCommands>();
|
||||
//var shell = new AppShell(splashVm);
|
||||
|
||||
var shell = _services.GetRequiredService<AppShell>();
|
||||
return new Window(shell);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user