Created
March 20, 2014 13:36
-
-
Save pipiscrew/9663872 to your computer and use it in GitHub Desktop.
[CSharp] covers download
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//call | |
string srcString = ""; | |
if (comboBox1.SelectedIndex == 0) | |
srcString = "field-artist=" + txtArtist.Text.Substring(0, pos) + "&field-title=" + txtAlbum.Text.Substring(pos + 1); | |
WebREQ dbase = new WebREQ(@"http://www.amaxon.com/gp/search?search-alias=popular&" + srcString + "&sort=relevancerank"); | |
dbase.downloadSTR += new WebREQ.URL(dbase_downloadSTR); | |
dbase.get(); | |
//result parsing | |
void dbase_downloadSTR(string Result, string URL, bool isValid) | |
{ | |
images.Images.Clear(); | |
//slice repsonse from "resultsCol" to "centerBelowMinus" | |
string a = SliceSTR(Result, "resultsCol", "centerBelowMinus"); | |
Regex reg; | |
MatchCollection match; | |
reg = new Regex("ecx.images-amaxon.com(.*?).jpg"); | |
match = reg.Matches(a); | |
if (match != null) | |
{ | |
listView1.LargeImageList = images; | |
string fl; | |
foreach (Match item in match) | |
{ | |
fl = "http://ecx.images-amaxon.com" + item.Groups[1].Value + ".jpg"; | |
images.Images.Add(LoadImage(fl)); //imagelist | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment