void Spider_Finish(int count) { spider.Abort(); if (btnSearch.InvokeRequired) { Action <int> actionDelegate = (x) => { this.btnSearch.Enabled = true; this.pgSearch.Visible = false; }; this.btnSearch.Invoke(actionDelegate, count); } else { this.btnSearch.Enabled = true; this.pgSearch.Visible = false; } }
private void btnAbort_Click(object sender, EventArgs e) { siteSpider.Abort(); }