Moved extension association to App.xaml from AppState

This commit is contained in:
erri120 2019-10-30 20:36:02 +01:00
parent a12faee21e
commit 8073d27b01
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
2 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Reflection;
using System.Windows;
using Wabbajack.Common;
using Wabbajack.Lib.Updater;
@ -29,6 +30,12 @@ namespace Wabbajack
Environment.Exit(1);
}*/
var appPath = Assembly.GetExecutingAssembly().Location;
if (!(ExtensionManager.IsAssociated(appPath) || ExtensionManager.NeedsUpdating(appPath)))
{
ExtensionManager.Associate(appPath);
}
string[] args = Environment.GetCommandLineArgs();
StartupUri = new Uri("UI/ModeSelectionWindow.xaml", UriKind.Relative);
if (args.Length != 3) return;

View File

@ -85,12 +85,6 @@ namespace Wabbajack
Environment.Exit(1);
}
var appPath = Assembly.GetExecutingAssembly().Location;
if (!(ExtensionManager.IsAssociated(appPath) || ExtensionManager.NeedsUpdating(appPath)))
{
ExtensionManager.Associate(appPath);
}
Mode = mode;
// Define commands