Skip to content
Permalink
Browse files

GSDumpGUI: Now textbox path change requires enter key.

  • Loading branch information...
KrossX authored and lightningterror committed Aug 2, 2019
1 parent 7b6c2be commit c8a285dee60620290e7156dcc2691b89e70055fa
Showing with 21 additions and 3 deletions.
  1. +2 −0 tools/GSDumpGUI/Forms/frmMain.Designer.cs
  2. +19 −3 tools/GSDumpGUI/Forms/frmMain.cs

Some generated files are not rendered by default. Learn more.

@@ -494,7 +494,7 @@ private static void PreviewImageClick(object sender, EventArgs e)

private void GSDumpGUI_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
if (e.KeyCode == Keys.Return && !txtGSDXDirectory.Focused && !txtDumpsDirectory.Focused)
cmdRun_Click(sender, e);

if (e.KeyCode == Keys.F1)
@@ -524,7 +524,22 @@ private void txtDumpsDirectory_Enter(object sender, EventArgs e)
private void txtGSDXDirectory_Leave(object sender, EventArgs e)
{
string newpath = txtGSDXDirectory.Text;
if (!_gsdxPathOld.ToLower().Equals(newpath.ToLower()))
txtGSDXDirectory.Text = _gsdxPathOld;
}

private void txtDumpsDirectory_Leave(object sender, EventArgs e)
{
string newpath = txtDumpsDirectory.Text;
if(!_dumpPathOld.ToLower().Equals(newpath.ToLower()))
txtDumpsDirectory.Text = _dumpPathOld;
}

private void txtGSDXDirectory_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode != Keys.Return) return;

string newpath = txtGSDXDirectory.Text;
if (!String.IsNullOrEmpty(newpath) &&
!_gsdxPathOld.ToLower().Equals(newpath.ToLower()) &&
Directory.Exists(newpath))
@@ -536,10 +551,11 @@ private void txtGSDXDirectory_Leave(object sender, EventArgs e)
}
}

private void txtDumpsDirectory_Leave(object sender, EventArgs e)
private void txtDumpsDirectory_KeyDown(object sender, KeyEventArgs e)
{
string newpath = txtDumpsDirectory.Text;
if (e.KeyCode != Keys.Return) return;

string newpath = txtDumpsDirectory.Text;
if (!String.IsNullOrEmpty(newpath) &&
!_dumpPathOld.ToLower().Equals(newpath.ToLower()) &&
Directory.Exists(newpath))

0 comments on commit c8a285d

Please sign in to comment.
You can’t perform that action at this time.