?? inputbox.cs
字號(hào):
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace 醫(yī)院管理系統(tǒng)
{
/// <summary>
/// InputBox 的摘要說明。
/// </summary>
public class InputBox : System.Windows.Forms.Form
{
public string result="";//默認(rèn)為空
private System.Windows.Forms.Button btnOK;
public System.Windows.Forms.TextBox txt1;
public System.Windows.Forms.Label label1;
/// <summary>
/// 必需的設(shè)計(jì)器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public InputBox()
{
//
// Windows 窗體設(shè)計(jì)器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 調(diào)用后添加任何構(gòu)造函數(shù)代碼
//
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗體設(shè)計(jì)器生成的代碼
/// <summary>
/// 設(shè)計(jì)器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內(nèi)容。
/// </summary>
private void InitializeComponent()
{
this.btnOK = new System.Windows.Forms.Button();
this.txt1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(32, 40);
this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 0;
this.btnOK.Text = "確定";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// txt1
//
this.txt1.Location = new System.Drawing.Point(128, 40);
this.txt1.Name = "txt1";
this.txt1.Size = new System.Drawing.Size(320, 21);
this.txt1.TabIndex = 1;
this.txt1.Text = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(128, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(312, 16);
this.label1.TabIndex = 2;
this.label1.Text = "label1";
//
// InputBox
//
this.AcceptButton = this.btnOK;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(528, 93);
this.Controls.Add(this.label1);
this.Controls.Add(this.txt1);
this.Controls.Add(this.btnOK);
this.Name = "InputBox";
this.Text = "InputBox";
this.ResumeLayout(false);
}
#endregion
private void btnOK_Click(object sender, System.EventArgs e)//返回輸入的值
{
this.result=txt1.Text.Trim();
this.Close();
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -