RAM Poke: Pressing the "Poke" button now also closes the dialog.

This commit is contained in:
scepheo 2015-01-30 16:15:08 +00:00
parent 860227ee66
commit bdfdd96686
1 changed files with 10 additions and 2 deletions

View File

@ -103,13 +103,21 @@ namespace BizHawk.Client.EmuHawk
private void Ok_Click(object sender, EventArgs e)
{
var success = _watchList.All(watch => watch.Poke(ValueBox.Text));
if (ParentTool != null)
{
ParentTool.UpdateValues();
}
OutputLabel.Text = success ? "Value successfully written."
: "An error occured when writing Value.";
if (success)
{
DialogResult = DialogResult.OK;
Close();
}
else
{
OutputLabel.Text = "An error occured when writing Value.";
}
}
}
}