Upgrade Avalonia

This commit is contained in:
Robert committed 2023-07-26 22:13:40 +02:00
1 parent e03d6b20e9
commit ee6d295fd8
24 files changed
+337 -311

No files matched your search

+6 -3
View File
@@ -43,8 +43,8 @@ public class App : Application
{
if (ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop || Design.IsDesignMode || _shutDown)
return;
_applicationStateManager = new ApplicationStateManager(_container!, desktop.Args);
_applicationStateManager = new ApplicationStateManager(_container!, desktop.Args ?? Array.Empty<string>());
ArtemisBootstrapper.Initialize();
RegisterProviders(_container!);
}
@@ -52,11 +52,14 @@ public class App : Application
private void RegisterProviders(IContainer container)
{
IInputService inputService = container.Resolve<IInputService>();
inputService.AddInputProvider(container.Resolve<InputProvider>(serviceKey: WindowsInputProvider.Id));
inputService.AddInputProvider(container.Resolve<InputProvider>(WindowsInputProvider.Id));
}
private bool FocusExistingInstance()
{
if (Design.IsDesignMode)
return false;
_artemisMutex = new Mutex(true, "Artemis-3c24b502-64e6-4587-84bf-9072970e535f", out bool createdNew);
return !createdNew && RemoteFocus();
}