📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using mshtml;
using Mf.Service.WebSpider;
using Mf.Util;
namespace Spider
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.StatusBar statusBar;
private System.Windows.Forms.StatusBarPanel statusBarPanel;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Label lblFailedLinks;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtOutput;
private System.Windows.Forms.TextBox txtBaseUri;
private System.Windows.Forms.Button btnStartStop;
private System.Windows.Forms.NumericUpDown spnProcessUriMax;
private System.Windows.Forms.TextBox txtUri;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label lblBaseUrl;
private System.Windows.Forms.Label lblUrl;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox txtUrlGraphicsRipper;
private AxSHDocVw.AxWebBrowser axWebBrowser;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.lblFailedLinks = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtOutput = new System.Windows.Forms.TextBox();
this.txtBaseUri = new System.Windows.Forms.TextBox();
this.btnStartStop = new System.Windows.Forms.Button();
this.spnProcessUriMax = new System.Windows.Forms.NumericUpDown();
this.txtUri = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.lblBaseUrl = new System.Windows.Forms.Label();
this.lblUrl = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.axWebBrowser = new AxSHDocVw.AxWebBrowser();
this.button1 = new System.Windows.Forms.Button();
this.txtUrlGraphicsRipper = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.statusBar = new System.Windows.Forms.StatusBar();
this.statusBarPanel = new System.Windows.Forms.StatusBarPanel();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.spnProcessUriMax)).BeginInit();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel)).BeginInit();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(10, 9);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(700, 585);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.lblFailedLinks);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Controls.Add(this.txtOutput);
this.tabPage1.Controls.Add(this.txtBaseUri);
this.tabPage1.Controls.Add(this.btnStartStop);
this.tabPage1.Controls.Add(this.spnProcessUriMax);
this.tabPage1.Controls.Add(this.txtUri);
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.lblBaseUrl);
this.tabPage1.Controls.Add(this.lblUrl);
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(692, 560);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Broken Links";
//
// lblFailedLinks
//
this.lblFailedLinks.Location = new System.Drawing.Point(10, 112);
this.lblFailedLinks.Name = "lblFailedLinks";
this.lblFailedLinks.Size = new System.Drawing.Size(120, 25);
this.lblFailedLinks.TabIndex = 23;
this.lblFailedLinks.Text = "Failed Links";
//
// label1
//
this.label1.Location = new System.Drawing.Point(259, 78);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(87, 24);
this.label1.TabIndex = 22;
this.label1.Text = "-1 Unlimited";
//
// txtOutput
//
this.txtOutput.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtOutput.Location = new System.Drawing.Point(10, 138);
this.txtOutput.Multiline = true;
this.txtOutput.Name = "txtOutput";
this.txtOutput.Size = new System.Drawing.Size(672, 370);
this.txtOutput.TabIndex = 21;
this.txtOutput.Text = "";
//
// txtBaseUri
//
this.txtBaseUri.Location = new System.Drawing.Point(182, 43);
this.txtBaseUri.Name = "txtBaseUri";
this.txtBaseUri.Size = new System.Drawing.Size(500, 21);
this.txtBaseUri.TabIndex = 20;
this.txtBaseUri.Text = "http://www.holidaycoast.net.au/";
//
// btnStartStop
//
this.btnStartStop.Location = new System.Drawing.Point(595, 517);
this.btnStartStop.Name = "btnStartStop";
this.btnStartStop.Size = new System.Drawing.Size(90, 25);
this.btnStartStop.TabIndex = 19;
this.btnStartStop.Text = "Start";
this.btnStartStop.Click += new System.EventHandler(this.btnStartStop_Click);
//
// spnProcessUriMax
//
this.spnProcessUriMax.Location = new System.Drawing.Point(182, 78);
this.spnProcessUriMax.Minimum = new System.Decimal(new int[] {
1,
0,
0,
-2147483648});
this.spnProcessUriMax.Name = "spnProcessUriMax";
this.spnProcessUriMax.Size = new System.Drawing.Size(68, 21);
this.spnProcessUriMax.TabIndex = 18;
this.spnProcessUriMax.Value = new System.Decimal(new int[] {
100,
0,
0,
0});
//
// txtUri
//
this.txtUri.Location = new System.Drawing.Point(182, 9);
this.txtUri.Name = "txtUri";
this.txtUri.Size = new System.Drawing.Size(500, 21);
this.txtUri.TabIndex = 17;
this.txtUri.Text = "http://www.holidaycoast.net.au/coffsharbour/";
//
// label4
//
this.label4.Location = new System.Drawing.Point(10, 78);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(163, 24);
this.label4.TabIndex = 16;
this.label4.Text = "Process Urls (Max)";
//
// lblBaseUrl
//
this.lblBaseUrl.Location = new System.Drawing.Point(10, 43);
this.lblBaseUrl.Name = "lblBaseUrl";
this.lblBaseUrl.Size = new System.Drawing.Size(163, 25);
this.lblBaseUrl.TabIndex = 15;
this.lblBaseUrl.Text = "Base Url";
//
// lblUrl
//
this.lblUrl.Location = new System.Drawing.Point(10, 9);
this.lblUrl.Name = "lblUrl";
this.lblUrl.Size = new System.Drawing.Size(163, 24);
this.lblUrl.TabIndex = 14;
this.lblUrl.Text = "Url";
//
// tabPage2
//
this.tabPage2.Controls.Add(this.axWebBrowser);
this.tabPage2.Controls.Add(this.button1);
this.tabPage2.Controls.Add(this.txtUrlGraphicsRipper);
this.tabPage2.Controls.Add(this.label2);
this.tabPage2.Location = new System.Drawing.Point(4, 21);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(692, 560);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -