RBLNews/RBLNews.Maui/App.xaml.cs
Tobias Wohlleben 2b74f17012
All checks were successful
Restart Docker Container on Production / build (pull_request) Successful in 3m4s
umbau auf enviroment appsettings
2024-09-25 10:57:23 +02:00

38 lines
961 B
C#

using Microsoft.Maui;
using Microsoft.Maui.Controls;
using RBLNews.Shared.Services;
namespace RBLNews.Maui
{
public partial class App : Application
{
private readonly AppLifecycleService _appLifecycleService;
public App(AppLifecycleService appLifecycleService)
{
_appLifecycleService = appLifecycleService;
InitializeComponent();
MainPage = new MainPage();
}
protected override Window CreateWindow(IActivationState activationState)
{
Window window = base.CreateWindow(activationState);
window.Activated += (sender, eventArgs) =>
{
_appLifecycleService.Activated();
};
window.Resumed += (sender, eventArgs) =>
{
_appLifecycleService.Resumed();
// take actions here...
};
return window;
}
}
}