Save on close

This commit is contained in:
Kurt 2015-01-04 11:36:06 -08:00
parent 39bdcd2a9c
commit 33977fcb00
2 changed files with 5 additions and 0 deletions

View File

@ -945,6 +945,7 @@ private void InitializeComponent()
this.Controls.Add(this.L_Mode);
this.Name = "Personal";
this.Text = "Gen VI Personal.Garc Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
this.TC_Pokemon.ResumeLayout(false);
this.TP_General.ResumeLayout(false);
this.TP_General.PerformLayout();

View File

@ -372,5 +372,9 @@ private void saveEntry()
File.WriteAllBytes(paths[paths.Length - 1], data);
}
private void formClosing(object sender, FormClosingEventArgs e)
{
if (entry > -1) saveEntry();
}
}
}