30 lines
793 B
C#
30 lines
793 B
C#
using Test.Replicate.Services;
|
|
|
|
namespace Test.Replicate
|
|
{
|
|
public partial class App : Application
|
|
{
|
|
public App(IServiceProvider serviceProvider)
|
|
{
|
|
InitializeComponent();
|
|
ServiceProvider = serviceProvider;
|
|
|
|
// Load saved settings from secure storage
|
|
_ = LoadSettingsAsync();
|
|
}
|
|
|
|
public static IServiceProvider ServiceProvider { get; private set; } = null!;
|
|
|
|
protected override Window CreateWindow(IActivationState? activationState)
|
|
{
|
|
return new Window(new AppShell());
|
|
}
|
|
|
|
private async Task LoadSettingsAsync()
|
|
{
|
|
var appSettings = ServiceProvider.GetRequiredService<AppSettings>();
|
|
await appSettings.LoadAsync();
|
|
}
|
|
}
|
|
}
|