Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("url:" + Url + "\nhost:" + host);
            Crawl crawl = new Crawl(this.textBox1.Text);

            crawl.OnDownload += (string filename) => {
                string text = this.richTextBox1.Text;
                this.richTextBox1.Text = text + filename + "\n";
            };
            new Thread(() => {
                Action action = () =>
                {
                    crawl.Start();
                };
                Invoke(action);
            }).Start();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Crawl c = new Crawl("https://www.cnblogs.com/dstang2000/");

            c.Start();
        }