mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Modlist can now be loaded using a shell command
This commit is contained in:
parent
f1a8cb41ed
commit
74d16ed8b7
@ -2,7 +2,6 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Wabbajack"
|
||||
StartupUri="UI\ModeSelectionWindow.xaml"
|
||||
ShutdownMode="OnExplicitShutdown">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
|
@ -29,6 +29,12 @@ namespace Wabbajack
|
||||
Environment.Exit(1);
|
||||
}*/
|
||||
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
StartupUri = new Uri("UI/ModeSelectionWindow.xaml", UriKind.Relative);
|
||||
if (args.Length != 3) return;
|
||||
if (!args[1].Contains("-i")) return;
|
||||
// modlists gets loaded using a shell command
|
||||
StartupUri = new Uri("UI/MainWindow.xaml", UriKind.Relative);
|
||||
}
|
||||
|
||||
private void SetupHandlers()
|
||||
|
@ -17,10 +17,19 @@ namespace Wabbajack
|
||||
{
|
||||
private AppState _state;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
|
||||
if (args.Length != 3) return;
|
||||
var modlistPath = args[2];
|
||||
var mainWindow = new MainWindow(RunMode.Install, modlistPath);
|
||||
mainWindow.Show();
|
||||
Close();
|
||||
}
|
||||
|
||||
public MainWindow(RunMode mode, string source)
|
||||
{
|
||||
var args = Environment.GetCommandLineArgs();
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
var context = new AppState(mode);
|
||||
|
@ -17,6 +17,7 @@
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@ -29,7 +30,6 @@
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user