示例#1
0
 public CrawlerForm()
 {
     this.InitializeComponent();
     this.urlStorage = new SortTree();
     this.threadsRun = new Thread[200];
     this.queueURLS = new System.Collections.Queue();
     this.cpuCounter = new PerformanceCounter();
     this.ramCounter = new PerformanceCounter("Memory", "Available MBytes");
     this.cpuCounter.CategoryName = "Processor";
     this.cpuCounter.CounterName = "% Processor Time";
     this.cpuCounter.InstanceName = "_Total";
 }
示例#2
0
 private void DeleteAllItems()
 {
     if (MessageBox.Show(this, "清空线程和列队?", "核实", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         this.listViewErrors.Items.Clear();
         this.listViewRequests.Items.Clear();
         this.urlStorage = new SortTree();
         this.URLCount = 0;
         this.FileCount = 0;
         this.ByteCount = 0;
         this.ErrorCount = 0;
     }
 }