using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate("http://t...content-available-to-author-only...h.net/test/read.cgi/tech/1334380881/");
}
int dccount = 0;
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
dccount++;
}
int ndcount = 0;
private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
ndcount++;
}
int ngcount = 0;
string url;
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
ngcount++;
url += e.Url.ToString() + Environment.NewLine;
}
private void button1_Click(object sender, EventArgs e)
{
this.Text = "DC =" + dccount.ToString() +
" ND = " + ndcount.ToString() +
" NG = " + ngcount.ToString();
this.textBox1.Text = url;
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLkNvbXBvbmVudE1vZGVsOwp1c2luZyBTeXN0ZW0uRGF0YTsKdXNpbmcgU3lzdGVtLkRyYXdpbmc7CnVzaW5nIFN5c3RlbS5MaW5xOwp1c2luZyBTeXN0ZW0uVGV4dDsKdXNpbmcgU3lzdGVtLldpbmRvd3MuRm9ybXM7CgpuYW1lc3BhY2UgV2luZG93c0Zvcm1zQXBwbGljYXRpb24xCnsKICAgIHB1YmxpYyBwYXJ0aWFsIGNsYXNzIEZvcm0xIDogRm9ybQogICAgewogICAgICAgIHB1YmxpYyBGb3JtMSgpCiAgICAgICAgewogICAgICAgICAgICBJbml0aWFsaXplQ29tcG9uZW50KCk7CiAgICAgICAgfQoKICAgICAgICBwcml2YXRlIHZvaWQgRm9ybTFfTG9hZChvYmplY3Qgc2VuZGVyLCBFdmVudEFyZ3MgZSkKICAgICAgICB7CiAgICAgICAgICA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IiArIG5kY291bnQuVG9TdHJpbmcoKSArCiAgICAgICAgICAgICAgICAiICAgTkcgPSAiICsgbmdjb3VudC5Ub1N0cmluZygpOwogICAgICAgICAgICB0aGlzLnRleHRCb3gxLlRleHQgPSB1cmw7CiAgICAgICAgfQogICAgfQp9Cg==