📄 aboutform.cs
字号:
/* File : AboutForm.cs
* Namespace : WinChatFormLibrary
* Classes : AboutForm
*/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WinChatFormLibrary
{
/* Class : AboutForm
* Base Class : System.Windows.Forms.Form
* Functionality : Display the About Form when the user press the About MenuItem.
*/
/// <summary>
/// Summary description for AboutForm.
/// </summary>
public class AboutForm : System.Windows.Forms.Form
{
private System.Windows.Forms.RichTextBox aboutRichTextBox;
private System.Windows.Forms.Button aboutBoxCloseButton;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public AboutForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
this.aboutRichTextBox.LoadFile("AboutWinChat.rtf");
Application.ApplicationExit += new EventHandler(Form_OnExit);
}
/// <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()
{
this.aboutRichTextBox = new System.Windows.Forms.RichTextBox();
this.aboutBoxCloseButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// aboutRichTextBox
//
this.aboutRichTextBox.AutoSize = true;
this.aboutRichTextBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.aboutRichTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.aboutRichTextBox.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(192)), ((System.Byte)(192)));
this.aboutRichTextBox.Location = new System.Drawing.Point(16, 56);
this.aboutRichTextBox.MaxLength = 32767;
this.aboutRichTextBox.Name = "aboutRichTextBox";
this.aboutRichTextBox.ReadOnly = true;
this.aboutRichTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.aboutRichTextBox.Size = new System.Drawing.Size(488, 496);
this.aboutRichTextBox.TabIndex = 0;
this.aboutRichTextBox.TabStop = false;
this.aboutRichTextBox.Text = "richTextBox1";
//
// aboutBoxCloseButton
//
this.aboutBoxCloseButton.ForeColor = System.Drawing.SystemColors.Highlight;
this.aboutBoxCloseButton.Location = new System.Drawing.Point(192, 592);
this.aboutBoxCloseButton.Name = "aboutBoxCloseButton";
this.aboutBoxCloseButton.TabIndex = 1;
this.aboutBoxCloseButton.Text = "Close";
this.aboutBoxCloseButton.Click += new System.EventHandler(this.aboutBoxCloseButton_Click);
//
// AboutForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(520, 629);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.aboutBoxCloseButton,
this.aboutRichTextBox});
this.ForeColor = System.Drawing.SystemColors.ActiveBorder;
this.Name = "AboutForm";
this.Text = "AboutForm";
this.TransparencyKey = System.Drawing.Color.Silver;
this.ResumeLayout(false);
}
#endregion
private void aboutBoxCloseButton_Click(object sender, System.EventArgs e)
{
Form_OnExit(sender, e);
}
private void Form_OnExit(object sender, System.EventArgs e)
{
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -