📄 connectform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace PSMS
{
/// <summary>
/// Summary description for connectForm.
/// </summary>
public class connectForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.Button sumbit;
public System.Windows.Forms.TextBox textBox2;
public System.Windows.Forms.TextBox textBox3;
public System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Button cancel;
public System.Windows.Forms.TextBox textBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public connectForm()
{
//
// 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.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.sumbit = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.cancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(120, 23);
this.label1.TabIndex = 0;
this.label1.Text = "连接主机名:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(136, 16);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(104, 21);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "(Local)";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(120, 23);
this.label2.TabIndex = 0;
this.label2.Text = "登录名:";
//
// label3
//
this.label3.Location = new System.Drawing.Point(16, 80);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(120, 23);
this.label3.TabIndex = 0;
this.label3.Text = "登录密码:";
//
// label4
//
this.label4.Location = new System.Drawing.Point(16, 112);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(120, 23);
this.label4.TabIndex = 0;
this.label4.Text = "数据库名称:";
//
// sumbit
//
this.sumbit.Location = new System.Drawing.Point(48, 144);
this.sumbit.Name = "sumbit";
this.sumbit.Size = new System.Drawing.Size(56, 24);
this.sumbit.TabIndex = 2;
this.sumbit.Text = "确定";
this.sumbit.Click += new System.EventHandler(this.sumbit_Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(136, 48);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(104, 21);
this.textBox2.TabIndex = 1;
this.textBox2.Text = "HQpsms_sa";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(136, 80);
this.textBox3.Name = "textBox3";
this.textBox3.PasswordChar = '*';
this.textBox3.Size = new System.Drawing.Size(104, 21);
this.textBox3.TabIndex = 1;
this.textBox3.Text = "";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(136, 112);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(104, 21);
this.textBox4.TabIndex = 1;
this.textBox4.Text = "PSMS_DB";
//
// cancel
//
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(144, 144);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(56, 24);
this.cancel.TabIndex = 2;
this.cancel.Text = "取消";
//
// connectForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.Color.AliceBlue;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(256, 182);
this.ControlBox = false;
this.Controls.Add(this.sumbit);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label3);
this.Controls.Add(this.label4);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.cancel);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(264, 216);
this.MinimumSize = new System.Drawing.Size(264, 216);
this.Name = "connectForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "connectForm";
this.ResumeLayout(false);
}
#endregion
private void sumbit_Click(object sender, System.EventArgs e)
{
sumbit.BackColor = Color.GreenYellow;
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -