mirror of
https://github.com/Strongleong/ScrapModLoader.git
synced 2024-08-15 00:03:19 +00:00
Implemented launching scapland
This commit is contained in:
parent
b168b7403a
commit
4d34f4eaa6
2 changed files with 19 additions and 3 deletions
|
@ -73,9 +73,9 @@
|
|||
<ComboBoxItem Content="Original" IsEnabled="False" />
|
||||
<ComboBoxItem Content="Remastered" />
|
||||
</ComboBox>
|
||||
<CheckBox Content=" Windowed " Margin="0,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<CheckBox Content=" Close launcher " Margin="0,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<Button Content=" Run Scrapland " Name="ButtonRunScrapland" />
|
||||
<CheckBox Name="Windowed" Content=" Windowed " Margin="0,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<CheckBox Name="CloseLauncher" Content=" Close launcher " Margin="0,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<Button Content=" Run Scrapland " Name="ButtonRunScrapland" Click="ButtonRunScrapland_Click" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
@ -153,5 +154,20 @@ namespace ScrapModLoader
|
|||
modsLauncher.ScanMods();
|
||||
ModsList.Items.Refresh();
|
||||
}
|
||||
|
||||
private void ButtonRunScrapland_Click(Object sender, RoutedEventArgs e)
|
||||
{
|
||||
String executablePath = ScraplandVersion.SelectedIndex == 0
|
||||
? modsLauncher.ScraplandPath : modsLauncher.ScraplandRemasteredPath;
|
||||
|
||||
String args = "-fullscreen:1";
|
||||
if (Windowed.IsChecked ?? false)
|
||||
args = "-fullscreen:0";
|
||||
|
||||
Process.Start(executablePath + @"\bin\Scrap.exe", args);
|
||||
|
||||
if (CloseLauncher.IsChecked ?? false)
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue