Whoops.
This commit is contained in:
Evan Dixon 2017-02-07 23:13:33 -06:00
parent 6504d5305a
commit bd4b400626

View file

@ -3118,17 +3118,14 @@ namespace PKHeX.WinForms
private void Main_FormClosing(object sender, FormClosingEventArgs e)
{
if (SAV.Edited)
if (SAV.Edited && DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Any unsaved changes will be lost.", "Are you sure you want to close PKHeX?"))
{
if (SAV.Edited && DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Any unsaved changes will be lost.", "Are you sure you want to close PKHeX?"))
{
e.Cancel = true;
return;
}
e.Cancel = true;
return;
}
try { Properties.Settings.Default.Save(); }
catch (Exception x) { File.WriteAllLines("config error.txt", new[] {x.ToString()}); }
catch (Exception x) { File.WriteAllLines("config error.txt", new[] { x.ToString() }); }
}
#endregion