📄 selectbox.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace CSHARPOLEDB3
{
/// <summary>
/// Summary description for SelectBox.
/// </summary>
public class SelectBox : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox Selections;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox TableName;
private System.Windows.Forms.Label label2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private string strTable;
public string Table
{
get
{
return strTable;
}
set
{
strTable = value;
}
}
private string strSelection;
public string Selection
{
get
{
return strSelection;
}
set
{
strSelection = value;
}
}
public SelectBox()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <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.Selections = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.TableName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// Selections
//
this.Selections.Location = new System.Drawing.Point(16, 24);
this.Selections.Name = "Selections";
this.Selections.Size = new System.Drawing.Size(208, 20);
this.Selections.TabIndex = 0;
this.Selections.Text = "*";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(240, 16);
this.label1.TabIndex = 1;
this.label1.Text = "EnterThe Fields Required Or Leave * for all fields";
//
// button1
//
this.button1.Location = new System.Drawing.Point(264, 8);
this.button1.Name = "button1";
this.button1.TabIndex = 2;
this.button1.Text = "OK";
this.button1.Click += new System.EventHandler(this.OnOK);
//
// TableName
//
this.TableName.Location = new System.Drawing.Point(16, 96);
this.TableName.Name = "TableName";
this.TableName.Size = new System.Drawing.Size(208, 20);
this.TableName.TabIndex = 3;
this.TableName.Text = "";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(232, 16);
this.label2.TabIndex = 4;
this.label2.Text = "Enter The Table Name";
//
// SelectBox
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(354, 135);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label2,
this.TableName,
this.button1,
this.label1,
this.Selections});
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SelectBox";
this.Text = "SelectBox";
this.ResumeLayout(false);
}
#endregion
private void OnOK(object sender, System.EventArgs e)
{
Selection = Selections.Text;
Table = TableName.Text;
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -