@@ -34,7 +34,7 @@ private void Form1_Load(object sender, EventArgs e)
3434
3535 private void checkDirAndPatched ( )
3636 {
37- bool readSuccess = false , patched = false ;
37+ bool readSuccess = false , patched = false , fullscreen = false ;
3838
3939 while ( ! readSuccess )
4040 {
@@ -43,6 +43,11 @@ private void checkDirAndPatched()
4343 foreach ( var line in File . ReadAllLines ( "data2.dat" ) )
4444 if ( line == "Catalog URL=https://www.ricochetuniverse.com/gateway/catalog.php" || line == "Catalog URL=http://www.ricochetuniverse.com/gateway/catalog.php" )
4545 patched = true ;
46+
47+ foreach ( var line in File . ReadAllLines ( "Ricochet Infinity.CFG" ) )
48+ if ( line == "Full Screen=1" )
49+ fullscreen = true ;
50+
4651 readSuccess = true ;
4752 }
4853 catch
@@ -65,6 +70,8 @@ private void checkDirAndPatched()
6570 btnReviver . Enabled = false ;
6671 label4 . Visible = true ;
6772 }
73+
74+ cbFullscreen . Checked = fullscreen ;
6875 }
6976
7077 private void generateEnabled ( )
@@ -347,6 +354,7 @@ private void btnDown_Click(object sender, EventArgs e)
347354 }
348355 #endregion
349356
357+ #region delete and install
350358 private void btnDelete_Click ( object sender , EventArgs e )
351359 {
352360 if ( MessageBox . Show ( "Are you sure?" , "Confirmation" , MessageBoxButtons . YesNo , MessageBoxIcon . Question ) == DialogResult . Yes )
@@ -407,13 +415,33 @@ private void btnInstall_Click(object sender, EventArgs e)
407415 }
408416 }
409417 }
418+ #endregion
410419
411420 private void cbClose_CheckedChanged ( object sender , EventArgs e )
412421 {
413422 Program . ProgramSettings . CloseOnLaunch = cbClose . Checked ;
414423 File . WriteAllText ( Program . ConfigPath , JsonConvert . SerializeObject ( Program . ProgramSettings , Formatting . Indented ) ) ;
415424 }
416425
426+ private void cbFullscreen_CheckedChanged ( object sender , EventArgs e )
427+ {
428+ try
429+ {
430+ string [ ] lines = File . ReadAllLines ( "Ricochet Infinity.CFG" ) ;
431+
432+ for ( int i = 0 ; i < lines . Length ; i ++ )
433+ if ( lines [ i ] . Length >= 11 )
434+ if ( lines [ i ] . Substring ( 0 , 11 ) == "Full Screen" )
435+ lines [ i ] = "Full Screen=" + ( cbFullscreen . Checked ? "1" : "0" ) ;
436+
437+ File . WriteAllLines ( "Ricochet Infinity.CFG" , lines ) ;
438+ }
439+ catch ( Exception ex )
440+ {
441+ MessageBox . Show ( $ "An error has occurred while updating the game files. \r \n If you have the game installed in the Program Files folder, try running the mod manager as administrator. \r \n \r \n Details: \r \n { ex } ", "Error" , MessageBoxButtons . OK , MessageBoxIcon . Error ) ;
442+ }
443+ }
444+
417445 private void btnCd_Click ( object sender , EventArgs e )
418446 {
419447 using ( var fbd = new FolderBrowserDialog ( ) )
0 commit comments