Hex Editor - Fix so Ctrl+G hotkey works

This commit is contained in:
andres.delikat 2011-08-18 01:50:17 +00:00
parent 6905f69b6b
commit 4b021113fb
2 changed files with 21 additions and 12 deletions

View File

@ -173,18 +173,7 @@ namespace BizHawk.MultiClient
private void goToAddressToolStripMenuItem_Click(object sender, EventArgs e)
{
InputPrompt i = new InputPrompt();
i.Text = "Go to Address";
i.SetMessage("Enter a hexadecimal value");
i.ShowDialog();
if (i.UserOK)
{
if (InputValidate.IsValidHexNumber(i.UserText))
{
GoToAddress(int.Parse(i.UserText, NumberStyles.HexNumber));
}
}
MemoryViewer.GoToSpecifiedAddress();
}
public void GoToAddress(int address)

View File

@ -128,6 +128,8 @@ namespace BizHawk.MultiClient
{
if (!InputValidate.IsValidHexNumber(((char)e.KeyCode).ToString()))
{
if (e.Control && e.KeyCode == Keys.G)
GoToSpecifiedAddress();
e.Handled = true;
return;
}
@ -497,5 +499,23 @@ namespace BizHawk.MultiClient
ClearNibbles();
Refresh();
}
public void GoToSpecifiedAddress()
{
InputPrompt i = new InputPrompt();
i.Text = "Go to Address";
i.SetMessage("Enter a hexadecimal value");
Global.Sound.StopSound();
i.ShowDialog();
Global.Sound.StartSound();
if (i.UserOK)
{
if (InputValidate.IsValidHexNumber(i.UserText))
{
GoToAddress(int.Parse(i.UserText, NumberStyles.HexNumber));
}
}
}
}
}