displayform.cs
来自「《c#技术内幕代码》」· CS 代码 · 共 82 行
CS
82 行
namespace CH7_16
{
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.WinForms;
/// <summary>
/// Summary description for DisplayForm.
/// </summary>
public class DisplayForm : System.WinForms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components;
private System.WinForms.Button button1;
private System.WinForms.Label TimerInterval;
private System.WinForms.Label label1;
public DisplayForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
public override void Dispose()
{
base.Dispose();
components.Dispose();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container ();
this.button1 = new System.WinForms.Button ();
this.label1 = new System.WinForms.Label ();
this.TimerInterval = new System.WinForms.Label ();
//@this.TrayHeight = 0;
//@this.TrayLargeIcon = false;
//@this.TrayAutoArrange = true;
button1.Location = new System.Drawing.Point (240, 48);
button1.Size = new System.Drawing.Size (75, 23);
button1.TabIndex = 2;
button1.Text = "&Stop";
button1.Click += new System.EventHandler (this.button1_Click);
label1.Location = new System.Drawing.Point (8, 16);
label1.Text = "Timer Intervals";
label1.Size = new System.Drawing.Size (80, 16);
label1.TabIndex = 0;
TimerInterval.Location = new System.Drawing.Point (104, 16);
TimerInterval.Size = new System.Drawing.Size (100, 16);
TimerInterval.TabIndex = 1;
this.Text = "DisplayForm";
this.AutoScaleBaseSize = new System.Drawing.Size (5, 13);
this.ClientSize = new System.Drawing.Size (560, 85);
this.Controls.Add (this.button1);
this.Controls.Add (this.TimerInterval);
this.Controls.Add (this.label1);
}
protected void button1_Click (object sender, System.EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?