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) private void Ok_Click(object sender, EventArgs e)
{ {
var success = _watchList.All(watch => watch.Poke(ValueBox.Text)); var success = _watchList.All(watch => watch.Poke(ValueBox.Text));
if (ParentTool != null) if (ParentTool != null)
{ {
ParentTool.UpdateValues(); ParentTool.UpdateValues();
} }
OutputLabel.Text = success ? "Value successfully written." if (success)
: "An error occured when writing Value."; {
DialogResult = DialogResult.OK;
Close();
}
else
{
OutputLabel.Text = "An error occured when writing Value.";
}
} }
} }
} }