www.pudn.com > SharpDownload(FTP¼°WEBÏÂÔØ).zip > formHelpAbout.cs
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace SharpDownload
{
///
/// Summary description for formHelpAbout.
///
public class formHelpAbout : System.Windows.Forms.Form
{
private System.Windows.Forms.Button buttonClose;
private System.Windows.Forms.LinkLabel linkHomePage;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label labelVersion;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
///
/// Public default constructor
///
public formHelpAbout()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.buttonClose = new System.Windows.Forms.Button();
this.linkHomePage = new System.Windows.Forms.LinkLabel();
this.label1 = new System.Windows.Forms.Label();
this.labelVersion = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// buttonClose
//
this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonClose.Location = new System.Drawing.Point(208, 64);
this.buttonClose.Name = "buttonClose";
this.buttonClose.TabIndex = 0;
this.buttonClose.Text = "Close";
//
// linkHomePage
//
this.linkHomePage.AutoSize = true;
this.linkHomePage.Location = new System.Drawing.Point(16, 64);
this.linkHomePage.Name = "linkHomePage";
this.linkHomePage.Size = new System.Drawing.Size(191, 16);
this.linkHomePage.TabIndex = 1;
this.linkHomePage.TabStop = true;
this.linkHomePage.Text = "Visit the SharpDownload Home Page";
this.linkHomePage.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkHomePage_LinkClicked);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.Location = new System.Drawing.Point(16, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(146, 25);
this.label1.TabIndex = 2;
this.label1.Text = "SharpDownload";
//
// labelVersion
//
this.labelVersion.AutoSize = true;
this.labelVersion.Location = new System.Drawing.Point(16, 40);
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(49, 16);
this.labelVersion.TabIndex = 3;
this.labelVersion.Text = "Version: ";
//
// formHelpAbout
//
this.AcceptButton = this.buttonClose;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.buttonClose;
this.ClientSize = new System.Drawing.Size(292, 95);
this.Controls.Add(this.labelVersion);
this.Controls.Add(this.label1);
this.Controls.Add(this.linkHomePage);
this.Controls.Add(this.buttonClose);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "formHelpAbout";
this.ShowInTaskbar = false;
this.Text = "About SharpDownload";
this.Load += new System.EventHandler(this.formHelpAbout_Load);
this.ResumeLayout(false);
}
#endregion
private void formHelpAbout_Load(object sender, System.EventArgs e)
{
labelVersion.Text = "Version: " + Application.ProductVersion;
linkHomePage.Links[0].LinkData = "http://sharpdownload.sourceforge.net";
linkHomePage.Links[0].Start = 10;
}
private void linkHomePage_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(linkHomePage.Links[0].LinkData.ToString());
}
}
}