2024-07-01 23:19:37 +00:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
|
|
namespace Neighbourhood.omg.lol {
|
2024-05-30 01:06:08 +00:00
|
|
|
|
public partial class App : Application {
|
2024-06-24 04:51:48 +00:00
|
|
|
|
|
2024-07-01 23:19:37 +00:00
|
|
|
|
public static Assembly Assembly { get; } = Assembly.GetExecutingAssembly();
|
|
|
|
|
public static string Name { get; } = App.Assembly.GetName().Name!;
|
|
|
|
|
public static string Version { get; } = App.Assembly.GetName().Version!.ToString();
|
2024-06-24 04:51:48 +00:00
|
|
|
|
|
2024-06-01 04:38:12 +00:00
|
|
|
|
public App(NavigatorService navigatorService) {
|
2024-05-30 01:06:08 +00:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
2024-06-01 04:38:12 +00:00
|
|
|
|
NavigatorService = navigatorService;
|
2024-05-30 01:06:08 +00:00
|
|
|
|
}
|
2024-06-01 04:38:12 +00:00
|
|
|
|
|
|
|
|
|
internal NavigatorService NavigatorService { get; private set; }
|
2024-06-24 00:41:27 +00:00
|
|
|
|
|
|
|
|
|
protected override Window CreateWindow(IActivationState? activationState) {
|
|
|
|
|
// always create new windows. This allows share intents to not crash on android
|
|
|
|
|
// (with the side effect that multiple windows are opened, which is messy but better than a crash)
|
2024-07-15 23:47:42 +00:00
|
|
|
|
NavigatorService.Page = new AppShell();
|
|
|
|
|
return new Window(NavigatorService.Page);
|
2024-06-24 00:41:27 +00:00
|
|
|
|
}
|
2024-05-30 01:06:08 +00:00
|
|
|
|
}
|
|
|
|
|
}
|