Cheat Window - File menu - dropdownopened event implemented

This commit is contained in:
andres.delikat 2011-03-20 01:56:35 +00:00
parent eccefda314
commit 432dc26f14
2 changed files with 18 additions and 1 deletions

View File

@ -120,6 +120,7 @@
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
this.fileToolStripMenuItem.Text = "&File";
this.fileToolStripMenuItem.DropDownOpened += new System.EventHandler(this.fileToolStripMenuItem_DropDownOpened);
//
// newToolStripMenuItem
//

View File

@ -15,7 +15,6 @@ namespace BizHawk.MultiClient
{
//Implement Options menu settings
//Implement Freeze functions in all memory domains
//Save - implement (should default to SaveAs if no cheats file)
//Restore Window Size should restore column order as well
int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired
@ -853,5 +852,22 @@ namespace BizHawk.MultiClient
DisplayCheatsList();
Changes();
}
private void fileToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
if (Global.Config.AutoLoadCheats == true)
autoLoadToolStripMenuItem.Checked = true;
else
autoLoadToolStripMenuItem.Checked = false;
if (string.Compare(currentCheatFile, "") == 0 || !changes)
{
saveToolStripMenuItem.Enabled = false;
}
else
{
saveToolStripMenuItem.Enabled = true;
}
}
}
}