资源简介
C# 网络爬虫 运行情况挺好的
代码片段和文件信息
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;
using NWebCrawlerLib;
using System.Diagnostics;
// 源码下载 www.51aspx.com
namespace NWebCrawler
{
public partial class MainForm : Form
{
#region Fields
private PerformanceCounter m_cpuCounter;
private PerformanceCounter m_ramCounter;
private Downloader m_downloader;
#endregion
#region Properties
// number of bytes downloaded
private int nByteCount;
private int ByteCount
{
get { return nByteCount; }
set
{
nByteCount = value;
this.statusStrip.Text = Commas(nByteCount / 1024 + 1) + “ KB“;
}
}
// number of Uri‘s found
private int nURLCount;
private int URLCount
{
get { return nURLCount; }
set
{
nURLCount = value;
this.statusBarPanelURLs.Text = Commas(nURLCount) + “ URL found“;
}
}
// available memory
private float nFreeMemory;
private float FreeMemory
{
get { return nFreeMemory; }
set
{
nFreeMemory = value;
this.statusBarPanelMem.Text = nFreeMemory + “ MB Available“;
}
}
// CPU usage
private int nCPUUsage;
private int CPUUsage
{
get { return nCPUUsage; }
set
{
nCPUUsage = value;
this.statusBarPanelCPU.Text = “CPU usage “ + nCPUUsage + “%“;
}
}
// number of files downloaded
private int nFileCount;
private int FileCount
{
get { return nFileCount; }
set
{
nFileCount = value;
this.statusBarPanelFiles.Text = Commas(nFileCount) + “ file(s) downloaded“;
}
}
#endregion
public MainForm()
{
InitializeComponent();
m_cpuCounter = new PerformanceCounter();
m_cpuCounter.CategoryName = “Processor“;
m_cpuCounter.CounterName = “% Processor Time“;
m_cpuCounter.InstanceName = “_Total“;
m_ramCounter = new PerformanceCounter(“Memory“ “Available MBytes“);
m_downloader = new Downloader();
m_downloader.StatusChanged += new DownloaderStatusChangedEventHandler(DownloaderStatusChanged);
}
#region Helpers
string Commas(int nNum)
{
string str = nNum.ToString();
int nIndex = str.Length;
while (nIndex > 3)
{
str = str
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 109 2009-12-30 17:01 NWebCrawler\Backup\NWebCrawler\config.ini
文件 6852 2010-01-05 10:33 NWebCrawler\Backup\NWebCrawler\MainForm.cs
文件 23228 2009-12-30 11:44 NWebCrawler\Backup\NWebCrawler\MainForm.Designer.cs
文件 44070 2009-12-30 11:44 NWebCrawler\Backup\NWebCrawler\MainForm.resx
文件 4349 2010-01-05 10:45 NWebCrawler\Backup\NWebCrawler\NWebCrawler.csproj
文件 506 2009-12-26 23:11 NWebCrawler\Backup\NWebCrawler\Program.cs
文件 1452 2009-12-26 08:57 NWebCrawler\Backup\NWebCrawler\Properties\AssemblyInfo.cs
文件 2851 2009-12-26 08:57 NWebCrawler\Backup\NWebCrawler\Properties\Resources.Designer.cs
文件 5612 2009-12-26 08:57 NWebCrawler\Backup\NWebCrawler\Properties\Resources.resx
文件 1096 2009-12-26 08:57 NWebCrawler\Backup\NWebCrawler\Properties\Settings.Designer.cs
文件 249 2009-12-26 08:57 NWebCrawler\Backup\NWebCrawler\Properties\Settings.settings
文件 2852 2010-01-05 10:39 NWebCrawler\Backup\NWebCrawler\SettingsForm.cs
文件 59153 2010-01-02 11:00 NWebCrawler\Backup\NWebCrawler\SettingsForm.Designer.cs
文件 5814 2010-01-02 11:00 NWebCrawler\Backup\NWebCrawler\SettingsForm.resx
文件 1419 2009-12-26 19:37 NWebCrawler\Backup\NWebCrawler.sln
..A..H. 21504 2010-01-05 10:47 NWebCrawler\Backup\NWebCrawler.suo
文件 2764 2009-12-29 21:51 NWebCrawler\Backup\NWebCrawlerLib\Common\Logger.cs
文件 4949 2009-12-27 12:50 NWebCrawler\Backup\NWebCrawlerLib\Common\PriorityQueue.cs
文件 323 2009-12-30 10:59 NWebCrawler\Backup\NWebCrawlerLib\CrawleHistroyEntry.cs
文件 11251 2010-01-04 23:54 NWebCrawler\Backup\NWebCrawlerLib\CrawlerThread.cs
文件 5124 2010-01-04 23:50 NWebCrawler\Backup\NWebCrawlerLib\Downloader.cs
文件 2938 2010-01-05 10:45 NWebCrawler\Backup\NWebCrawlerLib\NWebCrawlerLib.csproj
文件 2316 2009-12-30 10:17 NWebCrawler\Backup\NWebCrawlerLib\Parser.cs
文件 1308 2009-12-28 23:06 NWebCrawler\Backup\NWebCrawlerLib\Program.cs
文件 1458 2009-12-26 10:19 NWebCrawler\Backup\NWebCrawlerLib\Properties\AssemblyInfo.cs
文件 3677 2010-01-02 11:01 NWebCrawler\Backup\NWebCrawlerLib\Settings.cs
文件 3135 2010-01-02 20:13 NWebCrawler\Backup\NWebCrawlerLib\UrlFrontierQueueManager.cs
文件 3642 2010-01-02 20:18 NWebCrawler\Backup\NWebCrawlerLib\Utility.cs
文件 162 2010-01-05 10:27 NWebCrawler\bin\config.ini
文件 36654 2010-01-05 10:40 NWebCrawler\bin\download\0003be8238c8302e17c799d9f5d65876.gif
............此处省略189个文件信息
相关资源
- C# winform 权限控制 包括角色 用户 权限
- GIS算法c#实现:八方向栅格化,扫描线
- C#_超市进销存管理系统全套毕业设计
- 类似于QQ的软件C#编写
- C# 编写的类似于QQ即时通讯软件(源代
- 双像解析相对定向C#程序
- modbus tcp/rtu 基于C#的源码实现(老外的
- C#公交查询系统
- C#漂亮的MenuStrip和ContextMenuStrip皮肤
- GDAL c# 矢量栅格化
- C#批量图片切割和转dds格式源码
- C# 影院售票系统V2.0 (完整源码+注释
- C#三层开发的快餐店点餐系统
- .NET C#硬件编程源码
- C#简易网上报名系统
-
Minibl
ink C# 封装 - C#制作的简单学生信息管理系统
- C#实时获取CPU温度及其它硬件信息非
- 如何在水晶报表中分组汇总记录源程
- C#开发过程中碰到的问题 经验总结
- C#超市管理系统C#超市管理系统
- c#开发winform程序自动更新
- C#入门经典第五版源代码(随书源码)
- c# gdi+ 地图绘制
- c# 鼠标在窗体PictureBox上的十字光标
- 基于C#的AE二次开发基础篇和提高篇有
- 3个C#与GPRS进行通信的.rar
- C# Canon EDSDK附加 C# Nikon SDK
- C# web版 成绩管理系统asp、.net
- C#咖啡厅收费系统源码
评论
共有 条评论