mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Reloading settings doesn't work right
This commit is contained in:
parent
0946b00075
commit
beed20cfdf
1 changed files with 15 additions and 1 deletions
|
@ -167,8 +167,22 @@ namespace PKHeX.WinForms
|
|||
// Delete the settings if they exist
|
||||
var settingsFilename = (e.InnerException as ConfigurationErrorsException)?.Filename;
|
||||
if (File.Exists(settingsFilename))
|
||||
{
|
||||
if (MessageBox.Show("PKHeX's settings are corrupt. Would you like to reset the settings? (Click Yes to delete the settings or No to close the program.", "PKHeX", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
File.Delete(settingsFilename);
|
||||
|
||||
// This should theoretically work, but has failed in evandixon's testing
|
||||
// Properties.Settings.Default.Reload();
|
||||
|
||||
// Instead, restart the application
|
||||
MessageBox.Show("The settings have been deleted. Please restart PKHeX.");
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
else
|
||||
{
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue