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="Original" IsEnabled="False" /> | ||||||
|                     <ComboBoxItem Content="Remastered" /> |                     <ComboBoxItem Content="Remastered" /> | ||||||
|                 </ComboBox> |                 </ComboBox> | ||||||
|                 <CheckBox Content=" Windowed " Margin="0,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center" /> |                 <CheckBox Name="Windowed" Content=" Windowed " Margin="0,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center" /> | ||||||
|                 <CheckBox Content=" Close launcher " 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" /> |                 <Button Content=" Run Scrapland " Name="ButtonRunScrapland" Click="ButtonRunScrapland_Click" /> | ||||||
|             </StackPanel> |             </StackPanel> | ||||||
|         </Grid> |         </Grid> | ||||||
|     </Grid> |     </Grid> | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| using System; | using System; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
|  | using System.Diagnostics; | ||||||
| using System.IO; | using System.IO; | ||||||
| using System.Windows; | using System.Windows; | ||||||
| using System.Windows.Controls; | using System.Windows.Controls; | ||||||
|  | @ -153,5 +154,20 @@ namespace ScrapModLoader | ||||||
|                 modsLauncher.ScanMods(); |                 modsLauncher.ScanMods(); | ||||||
|             ModsList.Items.Refresh(); |             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…
	
	Add table
		Add a link
		
	
		Reference in a new issue