GSDumpGUI: Now textbox path change requires enter key.

This commit is contained in:
KrossX authored and lightningterror committed 2019-08-07 16:50:59 +02:00
1 parent 7b6c2be067
commit c8a285dee6
2 files changed
+21 -3

No files matched your search

+2
View File
@@ -97,6 +97,7 @@
this.txtGSDXDirectory.TabStop = false;
this.txtGSDXDirectory.Enter += new System.EventHandler(this.txtGSDXDirectory_Enter);
this.txtGSDXDirectory.Leave += new System.EventHandler(this.txtGSDXDirectory_Leave);
this.txtGSDXDirectory.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtGSDXDirectory_KeyDown);
//
// lblDirectory
//
@@ -147,6 +148,7 @@
this.txtDumpsDirectory.TabStop = false;
this.txtDumpsDirectory.Enter += new System.EventHandler(this.txtDumpsDirectory_Enter);
this.txtDumpsDirectory.Leave += new System.EventHandler(this.txtDumpsDirectory_Leave);
this.txtDumpsDirectory.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDumpsDirectory_KeyDown);
//
// lstGSDX
//
+19 -3
View File
@@ -494,7 +494,7 @@ namespace GSDumpGUI
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 @@ namespace GSDumpGUI
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 @@ namespace GSDumpGUI
}
}
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))