📄 frmson.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using DS.EMIS.StartPrepare.Common;
using System.Threading;
namespace DS.EMIS.StartPrepare
{
/// <summary>
/// FrmSon 的摘要说明。
/// </summary>
public class FrmSon : FrmAncestor
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.PictureBox PictureBox1;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
#region ###控件变量###
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FrmSon));
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.PictureBox1 = new System.Windows.Forms.PictureBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 72);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(91, 17);
this.label1.TabIndex = 3;
this.label1.Text = "数据库用户名:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(32, 112);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(79, 17);
this.label2.TabIndex = 4;
this.label2.Text = "数据库密码:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(120, 68);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(152, 21);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(120, 108);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(152, 21);
this.textBox2.TabIndex = 6;
this.textBox2.Text = "";
//
// PictureBox1
//
this.PictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.PictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox1.Image")));
this.PictureBox1.Location = new System.Drawing.Point(0, 0);
this.PictureBox1.Name = "PictureBox1";
this.PictureBox1.Size = new System.Drawing.Size(314, 64);
this.PictureBox1.TabIndex = 18;
this.PictureBox1.TabStop = false;
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(128, 144);
this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 19;
this.btnOK.Text = "确定";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(216, 144);
this.btnClose.Name = "btnClose";
this.btnClose.TabIndex = 20;
this.btnClose.Text = "取消";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(128, 192);
this.button1.Name = "button1";
this.button1.TabIndex = 21;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(216, 192);
this.button2.Name = "button2";
this.button2.TabIndex = 22;
this.button2.Text = "button2";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// FrmSon
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(314, 176);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.PictureBox1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "FrmSon";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "锁定";
this.ResumeLayout(false);
}
#endregion
#endregion
#region ### CTOR & Dispose ###
#region CTOR
public FrmSon()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
#endregion
#region Dispose
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#endregion
#region ### 自定义变量 ###
#endregion
#region ### 自定义属性 ###
#endregion
#region ### 自定义方法 ###
protected override void FrmClose()
{
}
protected override void Initialise()
{
}
#endregion
#region ### 自定义事件 ###
#endregion
#region ### 控件事件方法 ###
private void btnClose_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void btnOK_Click(object sender, System.EventArgs e)
{
if( this.textBox1.Text.Trim().Equals(DBAccess.UserID)&&this.textBox1.Text.Trim().Equals(DBAccess.UserPD) )
{
this.Close();
}
else
{
MessageBox.Show(this,"密码错误!","提示");
}
}
private void button1_Click(object sender, System.EventArgs e)
{
this.ShowProgress("aaaaaaaaaa",true);
}
private void button2_Click(object sender, System.EventArgs e)
{
this.ShowProgress("",false);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -