HexFind: respond to escape key
This commit is contained in:
parent
4a968ab700
commit
c445dcf183
|
@ -99,11 +99,13 @@
|
|||
this.Controls.Add(this.Find_Prev);
|
||||
this.Controls.Add(this.FindBox);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.KeyPreview = true;
|
||||
this.Name = "HexFind";
|
||||
this.ShowIcon = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Find";
|
||||
this.Load += new System.EventHandler(this.HexFind_Load);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HexFind_KeyDown);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
|
@ -108,5 +108,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
GlobalWin.Tools.HexEditor.FindNext(GetFindBoxChars(), false);
|
||||
}
|
||||
}
|
||||
|
||||
private void HexFind_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
e.Handled = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue