@ -44,13 +44,13 @@ namespace AM2RLauncher
// Try to pull first.
// Try to pull first.
try
try
{
{
L og. Info ( "Attempting to pull repository " + currentMirror + "..." ) ;
l og. Info ( "Attempting to pull repository " + currentMirror + "..." ) ;
await Task . Run ( ( ) = > Profile . PullPatchData ( TransferProgressHandlerMethod ) ) ;
await Task . Run ( ( ) = > Profile . PullPatchData ( TransferProgressHandlerMethod ) ) ;
// Thank you druid, for this case that should never happen
// Thank you druid, for this case that should never happen
if ( ! File . Exists ( CrossPlatformOperations . CURRENTPATH + "/PatchData/profile.xml" ) )
if ( ! File . Exists ( CrossPlatformOperations . CURRENTPATH + "/PatchData/profile.xml" ) )
{
{
L og. Error ( "Druid PatchData corruption occurred!" ) ;
l og. Error ( "Druid PatchData corruption occurred!" ) ;
await Application . Instance . InvokeAsync ( ( ) = >
await Application . Instance . InvokeAsync ( ( ) = >
{
{
MessageBox . Show ( Language . Text . CorruptPatchData , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( Language . Text . CorruptPatchData , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
@ -61,7 +61,7 @@ namespace AM2RLauncher
}
}
catch ( UserCancelledException ex )
catch ( UserCancelledException ex )
{
{
L og. Info ( ex . Message ) ;
l og. Info ( ex . Message ) ;
MessageBox . Show ( Language . Text . CorruptPatchData , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( Language . Text . CorruptPatchData , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) ;
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) ;
}
}
@ -73,19 +73,19 @@ namespace AM2RLauncher
{
{
if ( ! ( bool ) autoUpdateAM2RCheck . Checked )
if ( ! ( bool ) autoUpdateAM2RCheck . Checked )
{
{
L og. Error ( "Internet connection failed while attempting to pull repository" + currentMirror + "!" ) ;
l og. Error ( "Internet connection failed while attempting to pull repository" + currentMirror + "!" ) ;
MessageBox . Show ( Language . Text . InternetConnectionDrop , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
MessageBox . Show ( Language . Text . InternetConnectionDrop , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
}
}
}
}
else
else
{
{
L og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
l og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
}
}
}
}
catch ( Exception ex ) // This is if somehow any other exception might get thrown as well.
catch ( Exception ex ) // This is if somehow any other exception might get thrown as well.
{
{
L og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
l og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
}
}
finally
finally
@ -103,7 +103,7 @@ namespace AM2RLauncher
if ( currentXML . Version ! = profileList [ 0 ] . Version )
if ( currentXML . Version ! = profileList [ 0 ] . Version )
{
{
L og. Info ( "New game version (" + profileList [ 0 ] . Version + ") detected! Beginning archival of version " + currentXML . Version + "..." ) ;
l og. Info ( "New game version (" + profileList [ 0 ] . Version + ") detected! Beginning archival of version " + currentXML . Version + "..." ) ;
string profileArchivePath = CrossPlatformOperations . CURRENTPATH + "/Profiles/Community Updates (" + currentXML . Version + ")" ;
string profileArchivePath = CrossPlatformOperations . CURRENTPATH + "/Profiles/Community Updates (" + currentXML . Version + ")" ;
@ -126,12 +126,12 @@ namespace AM2RLauncher
{
{
Directory . CreateDirectory ( modArchivePath ) ;
Directory . CreateDirectory ( modArchivePath ) ;
File . WriteAllText ( modArchivePath + "/profile.xml" , Serializer . Serialize < ProfileXML > ( currentXML ) ) ;
File . WriteAllText ( modArchivePath + "/profile.xml" , Serializer . Serialize < ProfileXML > ( currentXML ) ) ;
L og. Info ( "Finished archival." ) ;
l og. Info ( "Finished archival." ) ;
}
}
else
else
{
{
HelperMethods . DeleteDirectory ( profileArchivePath ) ;
HelperMethods . DeleteDirectory ( profileArchivePath ) ;
L og. Info ( "Cancelling archival! User-defined archive in Mods already exists." ) ;
l og. Info ( "Cancelling archival! User-defined archive in Mods already exists." ) ;
}
}
@ -139,7 +139,7 @@ namespace AM2RLauncher
else // If our desired rename already exists, it's probably a user archive... so we just delete the folder and move on with installation of the new version.
else // If our desired rename already exists, it's probably a user archive... so we just delete the folder and move on with installation of the new version.
{
{
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/Profiles/Community Updates (Latest)" ) ;
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/Profiles/Community Updates (Latest)" ) ;
L og. Info ( "Cancelling archival! User-defined archive in Profiles already exists." ) ;
l og. Info ( "Cancelling archival! User-defined archive in Profiles already exists." ) ;
}
}
profileDropDown . SelectedIndex = 0 ;
profileDropDown . SelectedIndex = 0 ;
@ -165,7 +165,7 @@ namespace AM2RLauncher
#region Download
#region Download
case UpdateState . Download :
case UpdateState . Download :
L og. Info ( "Attempting to clone repository " + currentMirror + "..." ) ;
l og. Info ( "Attempting to clone repository " + currentMirror + "..." ) ;
bool successful = true ;
bool successful = true ;
// Update playButton states
// Update playButton states
@ -187,7 +187,7 @@ namespace AM2RLauncher
{
{
if ( Directory . Exists ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) )
if ( Directory . Exists ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) )
{
{
L og. Info ( "PatchData directory already exists, cleaning up..." ) ;
l og. Info ( "PatchData directory already exists, cleaning up..." ) ;
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) ;
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) ;
}
}
@ -204,12 +204,12 @@ namespace AM2RLauncher
if ( ex . Message . ToLower ( ) . Contains ( "failed to send request" ) | | ex . Message . ToLower ( ) . Contains ( "connection with the server was terminated" ) | |
if ( ex . Message . ToLower ( ) . Contains ( "failed to send request" ) | | ex . Message . ToLower ( ) . Contains ( "connection with the server was terminated" ) | |
ex . Message . ToLower ( ) . Contains ( "failed to resolve address" ) )
ex . Message . ToLower ( ) . Contains ( "failed to resolve address" ) )
{
{
L og. Error ( "Internet connection dropped while attempting to clone repository" + currentMirror + "!" ) ;
l og. Error ( "Internet connection dropped while attempting to clone repository" + currentMirror + "!" ) ;
MessageBox . Show ( Language . Text . InternetConnectionDrop , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
MessageBox . Show ( Language . Text . InternetConnectionDrop , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
}
}
else
else
{
{
L og. Error ( "LibGit2SharpException: " + ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
l og. Error ( "LibGit2SharpException: " + ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
if ( Directory . Exists ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) )
if ( Directory . Exists ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) )
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) ;
HelperMethods . DeleteDirectory ( CrossPlatformOperations . CURRENTPATH + "/PatchData" ) ;
@ -218,7 +218,7 @@ namespace AM2RLauncher
}
}
catch ( Exception ex ) // This is if somehow any other exception might get thrown as well.
catch ( Exception ex ) // This is if somehow any other exception might get thrown as well.
{
{
L og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
l og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
if ( Directory . Exists ( CrossPlatformOperations . CURRENTPATH + " / PatchData" ) )
if ( Directory . Exists ( CrossPlatformOperations . CURRENTPATH + " / PatchData" ) )
@ -226,7 +226,7 @@ namespace AM2RLauncher
successful = false ;
successful = false ;
}
}
L og. Info ( "Repository clone attempt finished " + ( successful ? "successfully." : "unsuccessfully." ) ) ;
l og. Info ( "Repository clone attempt finished " + ( successful ? "successfully." : "unsuccessfully." ) ) ;
currentGitObject = 0 ;
currentGitObject = 0 ;
@ -256,7 +256,7 @@ namespace AM2RLauncher
return ;
return ;
else
else
{
{
L og. Info ( "User cancelled download!" ) ;
l og. Info ( "User cancelled download!" ) ;
isGitProcessGettingCancelled = true ;
isGitProcessGettingCancelled = true ;
}
}
// We don't need to delete any folders here, the cancelled gitClone will do that automatically for us :)
// We don't need to delete any folders here, the cancelled gitClone will do that automatically for us :)
@ -270,7 +270,7 @@ namespace AM2RLauncher
#region Select11
#region Select11
case UpdateState . Select11 :
case UpdateState . Select11 :
L og. Info ( "Requesting user input for AM2R_11.zip..." ) ;
l og. Info ( "Requesting user input for AM2R_11.zip..." ) ;
OpenFileDialog fileFinder = new OpenFileDialog
OpenFileDialog fileFinder = new OpenFileDialog
{
{
@ -283,7 +283,7 @@ namespace AM2RLauncher
if ( fileFinder . ShowDialog ( this ) ! = DialogResult . Ok )
if ( fileFinder . ShowDialog ( this ) ! = DialogResult . Ok )
{
{
L og. Info ( "User cancelled the selection." ) ;
l og. Info ( "User cancelled the selection." ) ;
return ;
return ;
}
}
@ -292,14 +292,14 @@ namespace AM2RLauncher
if ( Directory . Exists ( fileFinder . FileName ) )
if ( Directory . Exists ( fileFinder . FileName ) )
{
{
// This can happen on linux, and maybe windows as well
// This can happen on linux, and maybe windows as well
L og. Error ( "User selected a Directory. Cancelling import." ) ;
l og. Error ( "User selected a Directory. Cancelling import." ) ;
return ;
return ;
}
}
IsZipAM2R11ReturnCodes errorCode = Profile . CheckIfZipIsAM2R11 ( fileFinder . FileName ) ;
IsZipAM2R11ReturnCodes errorCode = Profile . CheckIfZipIsAM2R11 ( fileFinder . FileName ) ;
if ( errorCode ! = IsZipAM2R11ReturnCodes . Successful )
if ( errorCode ! = IsZipAM2R11ReturnCodes . Successful )
{
{
L og. Error ( "User tried to input invalid AM2R_11.zip file (" + errorCode + "). Cancelling import." ) ;
l og. Error ( "User tried to input invalid AM2R_11.zip file (" + errorCode + "). Cancelling import." ) ;
MessageBox . Show ( Language . Text . ZipIsNotAM2R11 + "\n\nError Code: " + errorCode , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( Language . Text . ZipIsNotAM2R11 + "\n\nError Code: " + errorCode , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
return ;
return ;
}
}
@ -307,7 +307,7 @@ namespace AM2RLauncher
// If either a directory was selected or the file somehow went missing, cancel
// If either a directory was selected or the file somehow went missing, cancel
if ( ! File . Exists ( fileFinder . FileName ) )
if ( ! File . Exists ( fileFinder . FileName ) )
{
{
L og. Error ( "Selected AM2R_11.zip file not found! Cancelling import." ) ;
l og. Error ( "Selected AM2R_11.zip file not found! Cancelling import." ) ;
break ;
break ;
}
}
@ -315,11 +315,11 @@ namespace AM2RLauncher
if ( ! File . Exists ( CrossPlatformOperations . CURRENTPATH + "/AM2R_11.zip" ) )
if ( ! File . Exists ( CrossPlatformOperations . CURRENTPATH + "/AM2R_11.zip" ) )
File . Copy ( fileFinder . FileName , CrossPlatformOperations . CURRENTPATH + "/AM2R_11.zip" ) ;
File . Copy ( fileFinder . FileName , CrossPlatformOperations . CURRENTPATH + "/AM2R_11.zip" ) ;
L og. Info ( "AM2R_11.zip successfully imported." ) ;
l og. Info ( "AM2R_11.zip successfully imported." ) ;
}
}
else
else
{
{
L og. Error ( "User did not supply valid input. Cancelling import." ) ;
l og. Error ( "User did not supply valid input. Cancelling import." ) ;
}
}
UpdateStateMachine ( ) ;
UpdateStateMachine ( ) ;
@ -346,7 +346,7 @@ namespace AM2RLauncher
SetPlayButtonState ( UpdateState . Install ) ;
SetPlayButtonState ( UpdateState . Install ) ;
UpdateStateMachine ( ) ;
UpdateStateMachine ( ) ;
L og. Error ( "Xdelta not found. Aborting installing a profile..." ) ;
l og. Error ( "Xdelta not found. Aborting installing a profile..." ) ;
break ;
break ;
}
}
var progressIndicator = new Progress < int > ( UpdateProgressBar ) ;
var progressIndicator = new Progress < int > ( UpdateProgressBar ) ;
@ -358,7 +358,7 @@ namespace AM2RLauncher
}
}
catch ( Exception ex )
catch ( Exception ex )
{
{
L og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
l og. Error ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( ex . Message + "\n*****Stack Trace*****\n\n" + ex . StackTrace , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
}
}
progressBar . Visible = false ;
progressBar . Visible = false ;
@ -457,7 +457,7 @@ namespace AM2RLauncher
MessageBox . Show ( Language . Text . JavaNotFound , Language . Text . WarningWindowTitle , MessageBoxButtons . OK ) ;
MessageBox . Show ( Language . Text . JavaNotFound , Language . Text . WarningWindowTitle , MessageBoxButtons . OK ) ;
SetApkButtonState ( ApkButtonState . Create ) ;
SetApkButtonState ( ApkButtonState . Create ) ;
UpdateStateMachine ( ) ;
UpdateStateMachine ( ) ;
L og. Error ( "Java not found! Aborting Android APK creation." ) ;
l og. Error ( "Java not found! Aborting Android APK creation." ) ;
return ;
return ;
}
}
// Check if xdelta is installed on linux
// Check if xdelta is installed on linux
@ -466,7 +466,7 @@ namespace AM2RLauncher
MessageBox . Show ( Language . Text . XdeltaNotFound , Language . Text . WarningWindowTitle , MessageBoxButtons . OK ) ;
MessageBox . Show ( Language . Text . XdeltaNotFound , Language . Text . WarningWindowTitle , MessageBoxButtons . OK ) ;
SetApkButtonState ( ApkButtonState . Create ) ;
SetApkButtonState ( ApkButtonState . Create ) ;
UpdateStateMachine ( ) ;
UpdateStateMachine ( ) ;
L og. Error ( "Xdelta not found. Aborting Android APK creation..." ) ;
l og. Error ( "Xdelta not found. Aborting Android APK creation..." ) ;
return ;
return ;
}
}
@ -535,7 +535,7 @@ namespace AM2RLauncher
/// </summary>
/// </summary>
private void AddModButtonClicked ( object sender , EventArgs e )
private void AddModButtonClicked ( object sender , EventArgs e )
{
{
L og. Info ( "User requested to add mod. Requesting user input for new mod .zip..." ) ;
l og. Info ( "User requested to add mod. Requesting user input for new mod .zip..." ) ;
ProfileXML addedProfile ;
ProfileXML addedProfile ;
@ -550,18 +550,18 @@ namespace AM2RLauncher
if ( fileFinder . ShowDialog ( this ) ! = DialogResult . Ok )
if ( fileFinder . ShowDialog ( this ) ! = DialogResult . Ok )
{
{
L og. Info ( "User cancelled the Mod selection." ) ;
l og. Info ( "User cancelled the Mod selection." ) ;
return ;
return ;
}
}
if ( ! String . IsNullOrWhiteSpace ( fileFinder . FileName ) ) // This is default
if ( ! String . IsNullOrWhiteSpace ( fileFinder . FileName ) ) // This is default
{
{
L og. Info ( "User selected \"" + fileFinder . FileName + "\"" ) ;
l og. Info ( "User selected \"" + fileFinder . FileName + "\"" ) ;
// If either a directory was selected or the file somehow went missing, cancel
// If either a directory was selected or the file somehow went missing, cancel
if ( ! File . Exists ( fileFinder . FileName ) )
if ( ! File . Exists ( fileFinder . FileName ) )
{
{
L og. Error ( "Selected mod .zip file not found! Cancelling import." ) ;
l og. Error ( "Selected mod .zip file not found! Cancelling import." ) ;
return ;
return ;
}
}
@ -576,19 +576,19 @@ namespace AM2RLauncher
if ( Directory . Exists ( modsDir + "/" + extractedName ) )
if ( Directory . Exists ( modsDir + "/" + extractedName ) )
{
{
ProfileXML profile2 = Serializer . Deserialize < ProfileXML > ( File . ReadAllText ( modsDir + "/" + extractedName + "/profile.xml" ) ) ;
ProfileXML profile2 = Serializer . Deserialize < ProfileXML > ( File . ReadAllText ( modsDir + "/" + extractedName + "/profile.xml" ) ) ;
L og. Error ( "Mod is already imported as " + extractedName + "! Cancelling mod import." ) ;
l og. Error ( "Mod is already imported as " + extractedName + "! Cancelling mod import." ) ;
MessageBox . Show ( Language . Text . ModIsAlreadyInstalledMessage . Replace ( "$NAME" , profile2 . Name ) , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
MessageBox . Show ( Language . Text . ModIsAlreadyInstalledMessage . Replace ( "$NAME" , profile2 . Name ) , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
return ;
return ;
}
}
// Directory doesn't exist -> extract!
// Directory doesn't exist -> extract!
ZipFile . ExtractToDirectory ( fileFinder . FileName , modsDir + "/" + extractedName ) ;
ZipFile . ExtractToDirectory ( fileFinder . FileName , modsDir + "/" + extractedName ) ;
L og. Info ( "Imported and extracted mod .zip as " + extractedName ) ;
l og. Info ( "Imported and extracted mod .zip as " + extractedName ) ;
// Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
// Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
if ( ! File . Exists ( modsDir + "/" + extractedName + "/profile.xml" ) )
if ( ! File . Exists ( modsDir + "/" + extractedName + "/profile.xml" ) )
{
{
L og. Error ( fileFinder . FileName + " does not contain profile.xml! Cancelling mod import." ) ;
l og. Error ( fileFinder . FileName + " does not contain profile.xml! Cancelling mod import." ) ;
MessageBox . Show ( Language . Text . ModIsInvalidMessage . Replace ( "$NAME" , extractedName ) , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( Language . Text . ModIsInvalidMessage . Replace ( "$NAME" , extractedName ) , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
Directory . Delete ( modsDir + "/" + extractedName , true ) ;
Directory . Delete ( modsDir + "/" + extractedName , true ) ;
@ -601,7 +601,7 @@ namespace AM2RLauncher
// Check if the OS versions match
// Check if the OS versions match
if ( OS . Name ! = profile . OperatingSystem )
if ( OS . Name ! = profile . OperatingSystem )
{
{
L og. Error ( "Mod is for " + profile . OperatingSystem + " while current OS is " + OS . Name + ". Cancelling mod import." ) ;
l og. Error ( "Mod is for " + profile . OperatingSystem + " while current OS is " + OS . Name + ". Cancelling mod import." ) ;
MessageBox . Show ( Language . Text . ModIsForWrongOS . Replace ( "$NAME" , profile . Name ) . Replace ( "$OS" , profile . OperatingSystem ) . Replace ( "$CURRENTOS" , OS . Name ) ,
MessageBox . Show ( Language . Text . ModIsForWrongOS . Replace ( "$NAME" , profile . Name ) . Replace ( "$OS" , profile . OperatingSystem ) . Replace ( "$CURRENTOS" , OS . Name ) ,
Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
@ -612,20 +612,20 @@ namespace AM2RLauncher
// Check by *name*, if the mod was installed already
// Check by *name*, if the mod was installed already
if ( profileList . FirstOrDefault ( p = > p . Name = = profile . Name ) ! = null | | Directory . Exists ( CrossPlatformOperations . CURRENTPATH + "/Profiles/" + profile . Name ) )
if ( profileList . FirstOrDefault ( p = > p . Name = = profile . Name ) ! = null | | Directory . Exists ( CrossPlatformOperations . CURRENTPATH + "/Profiles/" + profile . Name ) )
{
{
L og. Error ( profile . Name + " is already installed." ) ;
l og. Error ( profile . Name + " is already installed." ) ;
MessageBox . Show ( Language . Text . ModIsAlreadyInstalledMessage . Replace ( "$NAME" , profile . Name ) , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
MessageBox . Show ( Language . Text . ModIsAlreadyInstalledMessage . Replace ( "$NAME" , profile . Name ) , Language . Text . WarningWindowTitle , MessageBoxType . Warning ) ;
HelperMethods . DeleteDirectory ( modsDir + "/" + extractedName ) ;
HelperMethods . DeleteDirectory ( modsDir + "/" + extractedName ) ;
return ;
return ;
}
}
addedProfile = profile ;
addedProfile = profile ;
L og. Info ( profile . Name + " successfully installed." ) ;
l og. Info ( profile . Name + " successfully installed." ) ;
MessageBox . Show ( Language . Text . ModSuccessfullyInstalledMessage . Replace ( "$NAME" , profile . Name ) , Language . Text . SuccessWindowTitle ) ;
MessageBox . Show ( Language . Text . ModSuccessfullyInstalledMessage . Replace ( "$NAME" , profile . Name ) , Language . Text . SuccessWindowTitle ) ;
}
}
else
else
{
{
L og. Error ( "User did not supply valid input. Cancelling import." ) ;
l og. Error ( "User did not supply valid input. Cancelling import." ) ;
LoadProfiles ( ) ;
LoadProfiles ( ) ;
return ;
return ;
}
}
@ -643,7 +643,7 @@ namespace AM2RLauncher
{
{
if ( ! IsProfileIndexValid ( ) )
if ( ! IsProfileIndexValid ( ) )
return ;
return ;
L og. Info ( "User opened the profile directory for profile " + profileList [ settingsProfileDropDown . SelectedIndex ] . Name +
l og. Info ( "User opened the profile directory for profile " + profileList [ settingsProfileDropDown . SelectedIndex ] . Name +
", which is " + profileList [ settingsProfileDropDown . SelectedIndex ] . SaveLocation ) ;
", which is " + profileList [ settingsProfileDropDown . SelectedIndex ] . SaveLocation ) ;
CrossPlatformOperations . OpenFolder ( CrossPlatformOperations . CURRENTPATH + "/Profiles/" + profileList [ settingsProfileDropDown . SelectedIndex ] . Name ) ;
CrossPlatformOperations . OpenFolder ( CrossPlatformOperations . CURRENTPATH + "/Profiles/" + profileList [ settingsProfileDropDown . SelectedIndex ] . Name ) ;
}
}
@ -655,7 +655,7 @@ namespace AM2RLauncher
{
{
if ( IsProfileIndexValid ( ) )
if ( IsProfileIndexValid ( ) )
{
{
L og. Info ( "User opened the save directory for profile " + profileList [ settingsProfileDropDown . SelectedIndex ] . Name + ", which is " + profileList [ settingsProfileDropDown . SelectedIndex ] . SaveLocation ) ;
l og. Info ( "User opened the save directory for profile " + profileList [ settingsProfileDropDown . SelectedIndex ] . Name + ", which is " + profileList [ settingsProfileDropDown . SelectedIndex ] . SaveLocation ) ;
CrossPlatformOperations . OpenFolder ( profileList [ settingsProfileDropDown . SelectedIndex ] . SaveLocation ) ;
CrossPlatformOperations . OpenFolder ( profileList [ settingsProfileDropDown . SelectedIndex ] . SaveLocation ) ;
}
}
}
}
@ -667,7 +667,7 @@ namespace AM2RLauncher
{
{
if ( settingsProfileDropDown . SelectedIndex = = - 1 & & settingsProfileDropDown . Items . Count = = 0 ) return ;
if ( settingsProfileDropDown . SelectedIndex = = - 1 & & settingsProfileDropDown . Items . Count = = 0 ) return ;
L og. Info ( "SettingsProfileDropDown.SelectedIndex has been changed to " + settingsProfileDropDown . SelectedIndex + "." ) ;
l og. Info ( "SettingsProfileDropDown.SelectedIndex has been changed to " + settingsProfileDropDown . SelectedIndex + "." ) ;
if ( settingsProfileDropDown . SelectedIndex < = 0 | | settingsProfileDropDown . Items . Count = = 0 )
if ( settingsProfileDropDown . SelectedIndex < = 0 | | settingsProfileDropDown . Items . Count = = 0 )
{
{
deleteModButton . Enabled = false ;
deleteModButton . Enabled = false ;
@ -749,7 +749,7 @@ namespace AM2RLauncher
/// <summary>Gets called when <see cref="showButton"/> gets clicked and shows the <see cref="MainForm"/> and brings it to the front again.</summary>
/// <summary>Gets called when <see cref="showButton"/> gets clicked and shows the <see cref="MainForm"/> and brings it to the front again.</summary>
private void ShowButtonClick ( object sender , EventArgs e )
private void ShowButtonClick ( object sender , EventArgs e )
{
{
L og. Info ( "User has opened the launcher from system tray." ) ;
l og. Info ( "User has opened the launcher from system tray." ) ;
this . Show ( ) ;
this . Show ( ) ;
this . BringToFront ( ) ;
this . BringToFront ( ) ;
@ -758,14 +758,14 @@ namespace AM2RLauncher
/// <summary>Gets called when <see cref="hqMusicPCCheck"/> gets clicked and writes its new value to the config.</summary>
/// <summary>Gets called when <see cref="hqMusicPCCheck"/> gets clicked and writes its new value to the config.</summary>
private void HqMusicPCCheckChanged ( object sender , EventArgs e )
private void HqMusicPCCheckChanged ( object sender , EventArgs e )
{
{
L og. Info ( "PC HQ Music option has been changed to " + hqMusicPCCheck . Checked ) ;
l og. Info ( "PC HQ Music option has been changed to " + hqMusicPCCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "MusicHQPC" , hqMusicPCCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "MusicHQPC" , hqMusicPCCheck . Checked ) ;
}
}
/// <summary>Gets called when <see cref="hqMusicAndroidCheck"/> gets clicked and writes its new value to the config.</summary>
/// <summary>Gets called when <see cref="hqMusicAndroidCheck"/> gets clicked and writes its new value to the config.</summary>
private void HqMusicAndroidCheckChanged ( object sender , EventArgs e )
private void HqMusicAndroidCheckChanged ( object sender , EventArgs e )
{
{
L og. Info ( "Android HQ Music option has been changed to " + hqMusicAndroidCheck . Checked ) ;
l og. Info ( "Android HQ Music option has been changed to " + hqMusicAndroidCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "MusicHQAndroid" , hqMusicAndroidCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "MusicHQAndroid" , hqMusicAndroidCheck . Checked ) ;
}
}
@ -775,7 +775,7 @@ namespace AM2RLauncher
if ( profileDropDown . SelectedIndex = = - 1 & & profileDropDown . Items . Count = = 0 ) return ;
if ( profileDropDown . SelectedIndex = = - 1 & & profileDropDown . Items . Count = = 0 ) return ;
profileIndex = profileDropDown . SelectedIndex ;
profileIndex = profileDropDown . SelectedIndex ;
L og. Info ( "profileDropDown.SelectedIndex has been changed to " + profileIndex + "." ) ;
l og. Info ( "profileDropDown.SelectedIndex has been changed to " + profileIndex + "." ) ;
profileAuthorLabel . Text = Language . Text . Author + " " + profileList [ profileDropDown . SelectedIndex ] . Author ;
profileAuthorLabel . Text = Language . Text . Author + " " + profileList [ profileDropDown . SelectedIndex ] . Author ;
profileVersionLabel . Text = Language . Text . VersionLabel + " " + profileList [ profileDropDown . SelectedIndex ] . Version ;
profileVersionLabel . Text = Language . Text . VersionLabel + " " + profileList [ profileDropDown . SelectedIndex ] . Version ;
@ -794,21 +794,21 @@ namespace AM2RLauncher
/// <summary>Gets called when user selects a different item from <see cref="languageDropDown"/> and writes that to the config.</summary>
/// <summary>Gets called when user selects a different item from <see cref="languageDropDown"/> and writes that to the config.</summary>
private void LanguageDropDownSelectedIndexChanged ( object sender , EventArgs e )
private void LanguageDropDownSelectedIndexChanged ( object sender , EventArgs e )
{
{
L og. Info ( "languageDropDown.SelectedIndex has been changed to " + languageDropDown . SelectedIndex + "." ) ;
l og. Info ( "languageDropDown.SelectedIndex has been changed to " + languageDropDown . SelectedIndex + "." ) ;
CrossPlatformOperations . WriteToConfig ( "Language" , languageDropDown . SelectedIndex = = 0 ? "Default" : languageDropDown . Items [ languageDropDown . SelectedIndex ] . Text ) ;
CrossPlatformOperations . WriteToConfig ( "Language" , languageDropDown . SelectedIndex = = 0 ? "Default" : languageDropDown . Items [ languageDropDown . SelectedIndex ] . Text ) ;
}
}
/// <summary>Gets called when <see cref="autoUpdateAM2RCheck"/> gets clicked and writes its new value to the config.</summary>
/// <summary>Gets called when <see cref="autoUpdateAM2RCheck"/> gets clicked and writes its new value to the config.</summary>
private void AutoUpdateAM2RCheckChanged ( object sender , EventArgs e )
private void AutoUpdateAM2RCheckChanged ( object sender , EventArgs e )
{
{
L og. Info ( "Auto Update AM2R has been set to " + autoUpdateAM2RCheck . Checked + "." ) ;
l og. Info ( "Auto Update AM2R has been set to " + autoUpdateAM2RCheck . Checked + "." ) ;
CrossPlatformOperations . WriteToConfig ( "AutoUpdateAM2R" , ( bool ) autoUpdateAM2RCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "AutoUpdateAM2R" , ( bool ) autoUpdateAM2RCheck . Checked ) ;
}
}
/// <summary>Gets called when <see cref="autoUpdateLauncherCheck"/> gets clicked and writes its new value to the config.</summary>
/// <summary>Gets called when <see cref="autoUpdateLauncherCheck"/> gets clicked and writes its new value to the config.</summary>
private void AutoUpdateLauncherCheckChanged ( object sender , EventArgs e )
private void AutoUpdateLauncherCheckChanged ( object sender , EventArgs e )
{
{
L og. Info ( "Auto Update Launcher has been set to " + autoUpdateAM2RCheck . Checked + "." ) ;
l og. Info ( "Auto Update Launcher has been set to " + autoUpdateAM2RCheck . Checked + "." ) ;
CrossPlatformOperations . WriteToConfig ( "AutoUpdateLauncher" , ( bool ) autoUpdateAM2RCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "AutoUpdateLauncher" , ( bool ) autoUpdateAM2RCheck . Checked ) ;
}
}
@ -816,7 +816,7 @@ namespace AM2RLauncher
/// and enables <see cref="customMirrorTextBox"/> accordingly.</summary>
/// and enables <see cref="customMirrorTextBox"/> accordingly.</summary>
private void CustomMirrorCheckChanged ( object sender , EventArgs e )
private void CustomMirrorCheckChanged ( object sender , EventArgs e )
{
{
L og. Info ( "Use Custom Mirror option has been set to " + customMirrorCheck . Checked + "." ) ;
l og. Info ( "Use Custom Mirror option has been set to " + customMirrorCheck . Checked + "." ) ;
CrossPlatformOperations . WriteToConfig ( "CustomMirrorEnabled" , ( bool ) customMirrorCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "CustomMirrorEnabled" , ( bool ) customMirrorCheck . Checked ) ;
bool enabled = ( bool ) customMirrorCheck . Checked ;
bool enabled = ( bool ) customMirrorCheck . Checked ;
@ -847,14 +847,14 @@ namespace AM2RLauncher
{
{
currentMirror = mirrorList [ mirrorDropDown . SelectedIndex ] ;
currentMirror = mirrorList [ mirrorDropDown . SelectedIndex ] ;
L og. Info ( "Current mirror has been set to " + currentMirror + "." ) ;
l og. Info ( "Current mirror has been set to " + currentMirror + "." ) ;
CrossPlatformOperations . WriteToConfig ( "MirrorIndex" , mirrorDropDown . SelectedIndex ) ;
CrossPlatformOperations . WriteToConfig ( "MirrorIndex" , mirrorDropDown . SelectedIndex ) ;
// Don't overwrite the git config while we download!!!
// Don't overwrite the git config while we download!!!
if ( updateState = = UpdateState . Downloading ) return ;
if ( updateState = = UpdateState . Downloading ) return ;
L og. Info ( "Overwriting mirror in gitconfig." ) ;
l og. Info ( "Overwriting mirror in gitconfig." ) ;
// Check if the gitConfig exists, if yes regex the gitURL, and replace it with the new current Mirror.
// Check if the gitConfig exists, if yes regex the gitURL, and replace it with the new current Mirror.
string gitConfigPath = CrossPlatformOperations . CURRENTPATH + "/PatchData/.git/config" ;
string gitConfigPath = CrossPlatformOperations . CURRENTPATH + "/PatchData/.git/config" ;
@ -871,7 +871,7 @@ namespace AM2RLauncher
/// </summary>
/// </summary>
private void ProfileDebugLogCheckedChanged ( object sender , EventArgs e )
private void ProfileDebugLogCheckedChanged ( object sender , EventArgs e )
{
{
L og. Info ( "Create Game Debug Logs option has been set to " + profileDebugLogCheck . Checked + "." ) ;
l og. Info ( "Create Game Debug Logs option has been set to " + profileDebugLogCheck . Checked + "." ) ;
CrossPlatformOperations . WriteToConfig ( "ProfileDebugLog" , profileDebugLogCheck . Checked ) ;
CrossPlatformOperations . WriteToConfig ( "ProfileDebugLog" , profileDebugLogCheck . Checked ) ;
}
}
@ -885,7 +885,7 @@ namespace AM2RLauncher
string mirrorText = customMirrorTextBox . Text ;
string mirrorText = customMirrorTextBox . Text ;
if ( ! gitURLRegex . IsMatch ( mirrorText ) )
if ( ! gitURLRegex . IsMatch ( mirrorText ) )
{
{
L og. Info ( "User used " + mirrorText + " as a custom Mirror, didn't pass git validation test." ) ;
l og. Info ( "User used " + mirrorText + " as a custom Mirror, didn't pass git validation test." ) ;
MessageBox . Show ( Language . Text . InvalidGitURL . Replace ( "$NAME" , mirrorText ) , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( Language . Text . InvalidGitURL . Replace ( "$NAME" , mirrorText ) , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
return ;
return ;
}
}
@ -893,7 +893,7 @@ namespace AM2RLauncher
currentMirror = mirrorText ;
currentMirror = mirrorText ;
CrossPlatformOperations . WriteToConfig ( "CustomMirrorText" , currentMirror ) ;
CrossPlatformOperations . WriteToConfig ( "CustomMirrorText" , currentMirror ) ;
L og. Info ( "Overwriting mirror in gitconfig." ) ;
l og. Info ( "Overwriting mirror in gitconfig." ) ;
// Check if the gitConfig exists, if yes regex the gitURL, and replace it with the new current Mirror.
// Check if the gitConfig exists, if yes regex the gitURL, and replace it with the new current Mirror.
string gitConfigPath = CrossPlatformOperations . CURRENTPATH + "/PatchData/.git/config" ;
string gitConfigPath = CrossPlatformOperations . CURRENTPATH + "/PatchData/.git/config" ;
@ -903,7 +903,7 @@ namespace AM2RLauncher
gitConfig = gitConfig . Replace ( match . Value , currentMirror ) ;
gitConfig = gitConfig . Replace ( match . Value , currentMirror ) ;
File . WriteAllText ( gitConfigPath , gitConfig ) ;
File . WriteAllText ( gitConfigPath , gitConfig ) ;
L og. Info ( "Custom Mirror has been set to " + currentMirror + "." ) ;
l og. Info ( "Custom Mirror has been set to " + currentMirror + "." ) ;
}
}
/// <summary>
/// <summary>
@ -911,7 +911,7 @@ namespace AM2RLauncher
/// </summary>
/// </summary>
private void CustomEnvVarTextBoxLostFocus ( object sender , EventArgs e )
private void CustomEnvVarTextBoxLostFocus ( object sender , EventArgs e )
{
{
L og. Info ( "Custom Environment variables have been set to \"" + customEnvVarTextBox . Text + "\"." ) ;
l og. Info ( "Custom Environment variables have been set to \"" + customEnvVarTextBox . Text + "\"." ) ;
CrossPlatformOperations . WriteToConfig ( "CustomEnvVar" , customEnvVarTextBox . Text ) ;
CrossPlatformOperations . WriteToConfig ( "CustomEnvVar" , customEnvVarTextBox . Text ) ;
}
}
@ -932,21 +932,21 @@ namespace AM2RLauncher
private void DeleteModButtonClicked ( object sender , EventArgs e )
private void DeleteModButtonClicked ( object sender , EventArgs e )
{
{
ProfileXML profile = profileList [ settingsProfileDropDown . SelectedIndex ] ;
ProfileXML profile = profileList [ settingsProfileDropDown . SelectedIndex ] ;
L og. Info ( "User is attempting to delete profile " + profile . Name + "." ) ;
l og. Info ( "User is attempting to delete profile " + profile . Name + "." ) ;
DialogResult result = MessageBox . Show ( Language . Text . DeleteModWarning . Replace ( "$NAME" , profile . Name ) , Language . Text . WarningWindowTitle ,
DialogResult result = MessageBox . Show ( Language . Text . DeleteModWarning . Replace ( "$NAME" , profile . Name ) , Language . Text . WarningWindowTitle ,
MessageBoxButtons . OKCancel , MessageBoxType . Warning , MessageBoxDefaultButton . Cancel ) ;
MessageBoxButtons . OKCancel , MessageBoxType . Warning , MessageBoxDefaultButton . Cancel ) ;
if ( result = = DialogResult . Ok )
if ( result = = DialogResult . Ok )
{
{
L og. Info ( "User did not cancel. Proceeding to delete " + profile ) ;
l og. Info ( "User did not cancel. Proceeding to delete " + profile ) ;
DeleteProfile ( profile ) ;
DeleteProfile ( profile ) ;
L og. Info ( profile + " has been deleted" ) ;
l og. Info ( profile + " has been deleted" ) ;
MessageBox . Show ( Language . Text . DeleteModButtonSuccess . Replace ( "$NAME" , profile . Name ) , Language . Text . SuccessWindowTitle ) ;
MessageBox . Show ( Language . Text . DeleteModButtonSuccess . Replace ( "$NAME" , profile . Name ) , Language . Text . SuccessWindowTitle ) ;
}
}
else
else
{
{
L og. Info ( "User has cancelled profile deletion." ) ;
l og. Info ( "User has cancelled profile deletion." ) ;
}
}
}
}
@ -956,7 +956,7 @@ namespace AM2RLauncher
/// </summary>
/// </summary>
private void UpdateModButtonClicked ( object sender , EventArgs e )
private void UpdateModButtonClicked ( object sender , EventArgs e )
{
{
L og. Info ( "User requested to update mod. Requesting user input for new mod .zip..." ) ;
l og. Info ( "User requested to update mod. Requesting user input for new mod .zip..." ) ;
bool abort = false ;
bool abort = false ;
@ -973,18 +973,18 @@ namespace AM2RLauncher
if ( fileFinder . ShowDialog ( this ) ! = DialogResult . Ok )
if ( fileFinder . ShowDialog ( this ) ! = DialogResult . Ok )
{
{
L og. Info ( "User cancelled the Mod selection." ) ;
l og. Info ( "User cancelled the Mod selection." ) ;
return ;
return ;
}
}
if ( ! String . IsNullOrWhiteSpace ( fileFinder . FileName ) ) // This is default
if ( ! String . IsNullOrWhiteSpace ( fileFinder . FileName ) ) // This is default
{
{
L og. Info ( "User selected \"" + fileFinder . FileName + "\"" ) ;
l og. Info ( "User selected \"" + fileFinder . FileName + "\"" ) ;
// If either a directory was selected or the file somehow went missing, cancel
// If either a directory was selected or the file somehow went missing, cancel
if ( ! File . Exists ( fileFinder . FileName ) )
if ( ! File . Exists ( fileFinder . FileName ) )
{
{
L og. Error ( "Selected mod .zip file not found! Cancelling mod update." ) ;
l og. Error ( "Selected mod .zip file not found! Cancelling mod update." ) ;
return ;
return ;
}
}
@ -1001,7 +1001,7 @@ namespace AM2RLauncher
// Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
// Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
if ( ! File . Exists ( modsDir + "/" + extractedName + "/profile.xml" ) )
if ( ! File . Exists ( modsDir + "/" + extractedName + "/profile.xml" ) )
{
{
L og. Error ( fileFinder . FileName + " does not contain profile.xml! Cancelling mod update." ) ;
l og. Error ( fileFinder . FileName + " does not contain profile.xml! Cancelling mod update." ) ;
MessageBox . Show ( Language . Text . ModIsInvalidMessage . Replace ( "$NAME" , extractedName ) , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
MessageBox . Show ( Language . Text . ModIsInvalidMessage . Replace ( "$NAME" , extractedName ) , Language . Text . ErrorWindowTitle , MessageBoxType . Error ) ;
Directory . Delete ( modsDir + "/" + extractedName , true ) ;
Directory . Delete ( modsDir + "/" + extractedName , true ) ;
File . Delete ( CrossPlatformOperations . CURRENTPATH + "/Mods/" + modFile . Name ) ;
File . Delete ( CrossPlatformOperations . CURRENTPATH + "/Mods/" + modFile . Name ) ;
@ -1029,7 +1029,7 @@ namespace AM2RLauncher
}
}
else // Cancel the operation!
else // Cancel the operation!
{
{
L og. Error ( "User has cancelled mod update!" ) ;
l og. Error ( "User has cancelled mod update!" ) ;
abort = true ;
abort = true ;
}
}
}
}
@ -1037,7 +1037,7 @@ namespace AM2RLauncher
{
{
// Cancel the operation!
// Cancel the operation!
// Show message to tell user that mod could not be found, install this separately
// Show message to tell user that mod could not be found, install this separately
L og. Error ( "Mod is not installed! Cancelling mod update." ) ;
l og. Error ( "Mod is not installed! Cancelling mod update." ) ;
MessageBox . Show ( Language . Text . UpdateModButtonWrongMod . Replace ( "$NAME" , currentProfile . Name ) . Replace ( "$SELECT" , profile . Name ) ,
MessageBox . Show ( Language . Text . UpdateModButtonWrongMod . Replace ( "$NAME" , currentProfile . Name ) . Replace ( "$SELECT" , profile . Name ) ,
Language . Text . WarningWindowTitle , MessageBoxButtons . OK ) ;
Language . Text . WarningWindowTitle , MessageBoxButtons . OK ) ;
abort = true ;
abort = true ;
@ -1051,7 +1051,7 @@ namespace AM2RLauncher
return ;
return ;
}
}
L og. Info ( "Successfully updated mod profile " + profile . Name + "." ) ;
l og. Info ( "Successfully updated mod profile " + profile . Name + "." ) ;
MessageBox . Show ( Language . Text . ModSuccessfullyInstalledMessage . Replace ( "$NAME" , currentProfile . Name ) , Language . Text . SuccessWindowTitle ) ;
MessageBox . Show ( Language . Text . ModSuccessfullyInstalledMessage . Replace ( "$NAME" , currentProfile . Name ) , Language . Text . SuccessWindowTitle ) ;
UpdateStateMachine ( ) ;
UpdateStateMachine ( ) ;
}
}
@ -1070,7 +1070,7 @@ namespace AM2RLauncher
/// </summary>
/// </summary>
private void MainformClosing ( object sender , CancelEventArgs e )
private void MainformClosing ( object sender , CancelEventArgs e )
{
{
L og. Info ( "Attempting to close MainForm!" ) ;
l og. Info ( "Attempting to close MainForm!" ) ;
CrossPlatformOperations . WriteToConfig ( "Width" , ClientSize . Width ) ;
CrossPlatformOperations . WriteToConfig ( "Width" , ClientSize . Width ) ;
CrossPlatformOperations . WriteToConfig ( "Height" , ClientSize . Height ) ;
CrossPlatformOperations . WriteToConfig ( "Height" , ClientSize . Height ) ;
@ -1101,9 +1101,9 @@ namespace AM2RLauncher
trayIndicator . Visible = false ;
trayIndicator . Visible = false ;
if ( e . Cancel )
if ( e . Cancel )
L og. Info ( "Cancelled MainForm closing event during UpdateState." + updateState + "." ) ;
l og. Info ( "Cancelled MainForm closing event during UpdateState." + updateState + "." ) ;
else
else
L og. Info ( "Successfully closed MainForm. Exiting main thread." ) ;
l og. Info ( "Successfully closed MainForm. Exiting main thread." ) ;
}
}
}
}