Skip to content

Commit

Permalink
Added handler for Enter key to search field
Browse files Browse the repository at this point in the history
  • Loading branch information
fireshaper committed Oct 4, 2019
1 parent 02f13e8 commit 4fc24db
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Omnibus
public partial class Form1 : Form
{

private String version = "1.4.4";
private String version = "1.4.5";
private String url = "https://getcomics.info/?s=";
private int cancelled = 0;
private int complete;
Expand Down Expand Up @@ -504,7 +504,17 @@ private void DownloadCancelled()
DownloadComic(idCount);
}
}


private void tbComicSearch_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
btnSearch_Click(this, new EventArgs());
e.Handled = true;
e.SuppressKeyPress = true;
}
}

private void DownloadComplete()
{

Expand Down Expand Up @@ -666,5 +676,6 @@ private void LogWriter(string line)
string datetime = DateTime.Now.ToString("MM-dd-yy HH:mm:ss");
File.AppendAllText(@"log.txt", "(" + datetime + ") - " + line + Environment.NewLine);
}

}
}

0 comments on commit 4fc24db

Please sign in to comment.