private void btnQuery_Click(object sender, EventArgs e) { if (txtQuery.Text == "") { ShowNull(); return; } string urlString = txtQuery.Text; num = 0; labNum.Text = num.ToString(); if (!URLtool.IsURLString(urlString)) { ShowUrlError(); txtQuery.Text = ""; return; } urlString = URLtool.GetURLInnerString(urlString); URLVariantClass uRLVariantClass = new URLVariantClass(new string[] { @"http://www.", @"https://www." }, new string[] { ".net", ".com", ".cn" }); var list = uRLVariantClass.URLstringCreate(urlString); labCount.Text = list.Count.ToString(); URLClient uRLClient = new URLClient(AddUrlList); uRLClient.UrlListQuery(list, () => { num++; labNum.Text = num.ToString(); }); }
static void Main(string[] args) { URLVariantClass uRLVariantClass = new URLVariantClass(new string[] { @"https://www.", @"http://www." }, new string[] { ".net", ".com", ".cn" }); var list = uRLVariantClass.URLstringCreate("hao123"); URLClient uRLClient = new URLClient(a => Console.WriteLine(a)); uRLClient.UrlListQuery(list); Console.ReadKey(); }