Hex Editor - open poke dialog in a logical location, update the hex editor when Poke is clicked on the Poke pop up dialog

This commit is contained in:
adelikat 2015-01-19 01:39:47 +00:00
parent 6da53b535b
commit ebf7273cbe
2 changed files with 9 additions and 1 deletions

View File

@ -1458,7 +1458,8 @@ namespace BizHawk.Client.EmuHawk
{
var poke = new RamPoke
{
InitialLocation = GetAddressCoordinates(addresses[0])
InitialLocation = PointToScreen(GetAddressCoordinates(addresses[0])),
ParentTool = this
};
var watches = addresses.Select(

View File

@ -20,6 +20,8 @@ namespace BizHawk.Client.EmuHawk
InitializeComponent();
}
public IToolForm ParentTool { get; set; }
public void SetWatch(IEnumerable<Watch> watches)
{
_watchList = watches.ToList();
@ -86,6 +88,11 @@ 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.";
}