From 2bc2488a9f95237f9da2c1450b340d1b4770b0dc Mon Sep 17 00:00:00 2001 From: j502647092 Date: Thu, 30 Jul 2015 20:46:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHttpHelper...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frm_Main.cs | 6 +++--- HttpHelper.cs | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Frm_Main.cs b/Frm_Main.cs index 9fa36c7..790e4e8 100644 --- a/Frm_Main.cs +++ b/Frm_Main.cs @@ -106,15 +106,15 @@ namespace SEOKeywordSearch this.ResultView.Rows[index].Cells[s.ToString() + "r"].Value = "查询第" + i + "页..."; Application.DoEvents(); httpHelper.Send(HttpMethod.GET, url); - while (HttpHelper.readyState != HttpReadyState.完成) + while (httpHelper.readyState != HttpReadyState.完成) { Application.DoEvents(); } - string htmldoc = HttpHelper.responseBody; + string htmldoc = httpHelper.responseBody; if (string.IsNullOrEmpty(htmldoc)) { state.ForeColor = Color.Red; - state.Text = "关键词 " + key + " 在 " + s.ToString() + " 第 " + i + " 页 网页抓取失败 错误:" + HttpHelper.ErrMsg; + state.Text = "关键词 " + key + " 在 " + s.ToString() + " 第 " + i + " 页 网页抓取失败 错误:" + httpHelper.ErrMsg; this.ResultView.Rows[index].Cells[s.ToString() + "r"].Style.ForeColor = Color.Red; maybe = true; continue; diff --git a/HttpHelper.cs b/HttpHelper.cs index 04c0cc9..52d0ce9 100644 --- a/HttpHelper.cs +++ b/HttpHelper.cs @@ -42,13 +42,13 @@ namespace CityCraft } public class HttpHelper { - public static HttpReadyState readyState = HttpReadyState.未初始化; - public static int Status = 0; - public static string responseBody = ""; - public static string responseText = ""; - public static byte[] responseByte = null; - public static HttpArgs args = new HttpArgs(); - public static string ErrMsg = string.Empty; + public HttpReadyState readyState = HttpReadyState.未初始化; + public int Status = 0; + public string responseBody = ""; + public string responseText = ""; + public byte[] responseByte = null; + public HttpArgs args = new HttpArgs(); + public string ErrMsg = string.Empty; /// /// 提交方法 ///