📄 about.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace GATetrisControl
{
[ToolboxItem(false)]
public class About : System.Windows.Forms.Form
{
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.LinkLabel mail;
private System.Windows.Forms.Button ok;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public About()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
mail.Links.Add(0,mail.Text.Length,"mailto:gogouata@yahoo.com");
}
/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.mail = new System.Windows.Forms.LinkLabel();
this.label5 = new System.Windows.Forms.Label();
this.ok = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(2, 2);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(252, 188);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint);
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 58);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(232, 16);
this.label1.TabIndex = 1;
this.label1.Text = "GATetris version 1.0.";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 74);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(232, 16);
this.label2.TabIndex = 2;
this.label2.Text = "Written entirely in C#.";
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 90);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(232, 16);
this.label3.TabIndex = 3;
this.label3.Text = ".NET Framework version 2.0 used.";
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 106);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(232, 16);
this.label4.TabIndex = 4;
this.label4.Text = "This is a freeware product.";
//
// mail
//
this.mail.Cursor = System.Windows.Forms.Cursors.Hand;
this.mail.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.mail.LinkColor = System.Drawing.Color.Navy;
this.mail.Location = new System.Drawing.Point(78, 122);
this.mail.Name = "mail";
this.mail.Size = new System.Drawing.Size(120, 16);
this.mail.TabIndex = 6;
this.mail.TabStop = true;
this.mail.Text = "duytuej@gmail.com";
this.mail.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.mail.VisitedLinkColor = System.Drawing.Color.Brown;
this.mail.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.mail_LinkClicked);
//
// label5
//
this.label5.Location = new System.Drawing.Point(8, 122);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(64, 16);
this.label5.TabIndex = 5;
this.label5.Text = "E-mail:";
//
// ok
//
this.ok.Location = new System.Drawing.Point(165, 154);
this.ok.Name = "ok";
this.ok.Size = new System.Drawing.Size(75, 23);
this.ok.TabIndex = 0;
this.ok.Text = "&Ok";
this.ok.Click += new System.EventHandler(this.ok_Click);
//
// About
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.SystemColors.Window;
this.ClientSize = new System.Drawing.Size(256, 192);
this.Controls.Add(this.ok);
this.Controls.Add(this.label5);
this.Controls.Add(this.mail);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "About";
this.Padding = new System.Windows.Forms.Padding(2);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About GATetris";
this.Paint += new System.Windows.Forms.PaintEventHandler(this.About_Paint);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void About_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
e.Graphics.DrawRectangle(SystemPens.ControlDarkDark,0,0,e.ClipRectangle.Width-1,
e.ClipRectangle.Height-1);
e.Graphics.DrawRectangle(SystemPens.ControlDarkDark,1,1,e.ClipRectangle.Width-3,
e.ClipRectangle.Height-3);
}
private void fButton1_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
e.Graphics.DrawLine(SystemPens.ControlDarkDark,e.ClipRectangle.Left,
e.ClipRectangle.Bottom-1,e.ClipRectangle.Right, e.ClipRectangle.Bottom-1);
}
private void mail_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
mail.Links[mail.Links.IndexOf(e.Link)].Visited = true;
System.Diagnostics.Process.Start(e.Link.LinkData.ToString());
}
private void ok_Click(object sender, System.EventArgs e)
{
Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -