port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
using System.Runtime.CompilerServices;
using System.Windows;
using Intromat.Graphics;
using Intromat.ViewModels;
using Intromat.Views;
using NodeNetwork;
using NodeNetwork.Toolkit;
using ReactiveUI;
using Splat;
namespace Intromat
{
public partial class App : Application
{
public AutoSuspendHelper SuspendHelper { get; }
public App()
{
// Initialize the suspension driver after AutoSuspendHelper.
SuspendHelper = new AutoSuspendHelper(this);
RxApp.SuspensionHost.CreateNewAppState = () => new AppStateViewModel();
RxApp.SuspensionHost.SetupDefaultSuspendResume(new AkavacheSuspensionDriver<AppStateViewModel>());
}
protected override void OnStartup(StartupEventArgs e)
{
var splashScreen = new SplashScreenWindow();
MainWindow = splashScreen;
splashScreen.Show();
var dxHost = new DxHost();
Locator.CurrentMutable.RegisterConstant(dxHost);
var mainWindow = new MainWindow { Visibility = Visibility.Collapsed };
base.OnStartup(e);
foreach (var assemblyType in typeof(NNViewRegistrar).Assembly.GetTypes())
RuntimeHelpers.RunClassConstructor(assemblyType.TypeHandle);
foreach (var assemblyType in typeof(NodeTemplate).Assembly.GetTypes())
RuntimeHelpers.RunClassConstructor(assemblyType.TypeHandle);
foreach (var assemblyType in GetType().Assembly.GetTypes())
RuntimeHelpers.RunClassConstructor(assemblyType.TypeHandle);
NNViewRegistrar.RegisterSplat();
MainWindow = mainWindow;
mainWindow.Show();
splashScreen.Close();
mainWindow.Visibility = Visibility.Visible;
}
}
}