Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-17 12:15:13 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-17 12:15:13 +0300
commitb6335e3646843b937e249ef9ee98cafee8585cea (patch)
treed1d6930f85d48a8daab5341fa2f26f8895685ce7 /ImageGooglerForm.cs
parent8c4af6676268ffed40b0c46c8985dc9c6b34a5ce (diff)
RetroArch pack script
Diffstat (limited to 'ImageGooglerForm.cs')
-rw-r--r--ImageGooglerForm.cs21
1 files changed, 11 insertions, 10 deletions
diff --git a/ImageGooglerForm.cs b/ImageGooglerForm.cs
index db1cf819..0e66503d 100644
--- a/ImageGooglerForm.cs
+++ b/ImageGooglerForm.cs
@@ -25,22 +25,23 @@ namespace com.clusterrr.hakchi_gui
get { return result; }
}
- public ImageGooglerForm(string query, NesMiniApplication app)
+ public ImageGooglerForm(NesMiniApplication app)
{
InitializeComponent();
+ Text = "Google Images - " + app.Name ?? "";
+ searchThread = new Thread(SearchThread);
+ searchThread.Start(app);
+ }
+
+ public static string[] GetImageUrls(NesMiniApplication app)
+ {
+ string query = app.Name ?? "";
if (app is NesGame)
query += " nes|famicom box art";
else if (app is FdsGame)
query += " fds box art";
else
- query += " box art";
- Text = "Google Images - " + query;
- searchThread = new Thread(SearchThread);
- searchThread.Start(query);
- }
-
- public static string[] GetImageUrls(string query)
- {
+ query += " game (box|vover) art";
var url = string.Format("https://www.google.com/search?q={0}&source=lnms&tbm=isch", HttpUtility.UrlEncode(query));
Debug.WriteLine("Web request: " + url);
var request = WebRequest.Create(url);
@@ -80,7 +81,7 @@ namespace com.clusterrr.hakchi_gui
{
try
{
- var urls = GetImageUrls(o as string);
+ var urls = GetImageUrls(o as NesMiniApplication);
foreach (var url in urls)
{
//new Thread(DownloadImageThread).Start(url);