Console.WriteLine("webbrowser2 : " + this.WebBrowser2.Url.OriginalString + " | " + e.Url.AbsoluteUri);
this._webbrowserTimes = 0;
try
{
if (this.WebBrowser2.Url.OriginalString.ToLower() != "about:blank")
{
HtmlDocument doc = this.WebBrowser2.Document;
string documentText = this.WebBrowser2.DocumentText;
if (e.Url.AbsoluteUri.ToLower().StartsWith("http://qm.pceggs.com/Web/ADQuestion.aspx".ToLower()))
{
doc = this.WebBrowser2.Document.Window.Frames["bottomFrame"].Document;
string innerHtml = doc.Body.InnerHtml;
doc.All["btnt"].AttachEventHandler("onclick", new EventHandler(this.SubmitEvent_40Gold));
this._questionId = "";
this._question = "";
this._answer = "";
this._answerId = "";
this._bean = new AnswerBean();
string startTag = "<SPAN class=STYLE2 style=\"FONT-SIZE: 14px\">";
string endTag = "</SPAN>";
string keyWord = "";
keyWord = this.GetValue(ref innerHtml, startTag, endTag).Trim().Trim(new char[] { 0xff1a, ':' });
this._bean.questionKeyWord = keyWord;
this._webbrowserTimes = 0;
try
{
if (this.WebBrowser2.Url.OriginalString.ToLower() != "about:blank")
{
HtmlDocument doc = this.WebBrowser2.Document;
string documentText = this.WebBrowser2.DocumentText;
if (e.Url.AbsoluteUri.ToLower().StartsWith("http://qm.pceggs.com/Web/ADQuestion.aspx".ToLower()))
{
doc = this.WebBrowser2.Document.Window.Frames["bottomFrame"].Document;
string innerHtml = doc.Body.InnerHtml;
doc.All["btnt"].AttachEventHandler("onclick", new EventHandler(this.SubmitEvent_40Gold));
this._questionId = "";
this._question = "";
this._answer = "";
this._answerId = "";
this._bean = new AnswerBean();
string startTag = "<SPAN class=STYLE2 style=\"FONT-SIZE: 14px\">";
string endTag = "</SPAN>";
string keyWord = "";
keyWord = this.GetValue(ref innerHtml, startTag, endTag).Trim().Trim(new char[] { 0xff1a, ':' });
this._bean.questionKeyWord = keyWord;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货