📄 brushkaidframe.cs
字号:
// menuExitSystem
//
this.menuExitSystem.Index = 1;
this.menuExitSystem.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
this.menuExitSystem.Text = "退出系统(&E)";
this.menuExitSystem.Click += new System.EventHandler(this.menuExitSystem_Click);
//
// CurrentTime
//
this.CurrentTime.Enabled = true;
this.CurrentTime.Interval = 1000;
this.CurrentTime.Tick += new System.EventHandler(this.CurrentTime_Tick);
//
// btnClear
//
this.btnClear.Enabled = false;
this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClear.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.btnClear.ForeColor = System.Drawing.Color.Blue;
this.btnClear.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnClear.ImageIndex = 4;
this.btnClear.ImageList = this.imageList;
this.btnClear.Location = new System.Drawing.Point(32, 280);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(104, 24);
this.btnClear.TabIndex = 11;
this.btnClear.Text = "清空文本(&T)";
this.btnClear.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnClear.Visible = false;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
this.btnClear.MouseEnter += new System.EventHandler(this.btnOpen_MouseEnter);
this.btnClear.MouseLeave += new System.EventHandler(this.btnOpen_MouseLeave);
//
// textBox
//
this.textBox.BackColor = System.Drawing.SystemColors.HighlightText;
this.textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBox.Location = new System.Drawing.Point(176, 80);
this.textBox.MaxLength = 12;
this.textBox.Multiline = true;
this.textBox.Name = "textBox";
this.textBox.ReadOnly = true;
this.textBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox.Size = new System.Drawing.Size(192, 192);
this.textBox.TabIndex = 13;
this.textBox.Text = "";
//
// NameText
//
this.NameText.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.NameText.Cursor = System.Windows.Forms.Cursors.Hand;
this.NameText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.NameText.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.NameText.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.NameText.Location = new System.Drawing.Point(440, 360);
this.NameText.Name = "NameText";
this.NameText.Size = new System.Drawing.Size(128, 23);
this.NameText.TabIndex = 15;
this.NameText.Text = "姓名:";
this.NameText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.NameText.Visible = false;
//
// textName
//
this.textName.BackColor = System.Drawing.Color.White;
this.textName.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.textName.Location = new System.Drawing.Point(224, 320);
this.textName.MaxLength = 6;
this.textName.Name = "textName";
this.textName.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textName.Size = new System.Drawing.Size(136, 21);
this.textName.TabIndex = 16;
this.textName.Text = "";
//
// label1
//
this.label1.ForeColor = System.Drawing.Color.Blue;
this.label1.Location = new System.Drawing.Point(160, 320);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 23);
this.label1.TabIndex = 17;
this.label1.Text = "姓名:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textTextText
//
this.textTextText.Location = new System.Drawing.Point(200, 184);
this.textTextText.MaxLength = 12;
this.textTextText.Multiline = true;
this.textTextText.Name = "textTextText";
this.textTextText.Size = new System.Drawing.Size(100, 72);
this.textTextText.TabIndex = 21;
this.textTextText.Text = "";
//
// sqlDataAdapter
//
this.sqlDataAdapter.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "BrushIDHistory", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("编号", "编号"),
new System.Data.Common.DataColumnMapping("日期", "日期"),
new System.Data.Common.DataColumnMapping("时间", "时间"),
new System.Data.Common.DataColumnMapping("卡号", "卡号"),
new System.Data.Common.DataColumnMapping("职工名称", "职工名称"),
new System.Data.Common.DataColumnMapping("状态", "状态")})});
this.sqlDataAdapter.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM BrushIDHistory WHERE (编号 = @Original_编号) AND (卡号 = @Original_卡号 OR @Original_卡号 IS NULL AND 卡号 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND 日期 IS NULL) AND (时间 = @Original_时间 OR @Original_时间 IS NULL AND 时间 IS NULL) AND (状态 = @Original_状态 OR @Original_状态 IS NULL AND 状态 IS NULL) AND (职工名称 = @Original_职工名称 OR @Original_职工名称 IS NULL AND 职工名称 IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_编号", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "编号", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_卡号", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "卡号", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "日期", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_时间", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "时间", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_状态", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "状态", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职工名称", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "职工名称", System.Data.DataRowVersion.Original, null));
//
// sqlConnection
//
this.sqlConnection.ConnectionString = "workstation id=localhost;integrated security=SSPI;database=SystemODBC";
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "INSERT INTO BrushIDHistory(日期, 时间, 卡号, 职工名称, 状态) VALUES (@日期, @时间, @卡号, @职工名称, @状" +
"态); SELECT 编号, 日期, 时间, 卡号, 职工名称, 状态 FROM BrushIDHistory WHERE (编号 = @@IDENTITY)";
this.sqlInsertCommand1.Connection = this.sqlConnection;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.DateTime, 8, "日期"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@时间", System.Data.SqlDbType.VarChar, 50, "时间"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@卡号", System.Data.SqlDbType.VarChar, 50, "卡号"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职工名称", System.Data.SqlDbType.VarChar, 50, "职工名称"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@状态", System.Data.SqlDbType.VarChar, 10, "状态"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 编号, 日期, 时间, 卡号, 职工名称, 状态 FROM BrushIDHistory";
this.sqlSelectCommand1.Connection = this.sqlConnection;
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE BrushIDHistory SET 日期 = @日期, 时间 = @时间, 卡号 = @卡号, 职工名称 = @职工名称, 状态 = @状态 WHERE (编号 = @Original_编号) AND (卡号 = @Original_卡号 OR @Original_卡号 IS NULL AND 卡号 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND 日期 IS NULL) AND (时间 = @Original_时间 OR @Original_时间 IS NULL AND 时间 IS NULL) AND (状态 = @Original_状态 OR @Original_状态 IS NULL AND 状态 IS NULL) AND (职工名称 = @Original_职工名称 OR @Original_职工名称 IS NULL AND 职工名称 IS NULL); SELECT 编号, 日期, 时间, 卡号, 职工名称, 状态 FROM BrushIDHistory WHERE (编号 = @编号)";
this.sqlUpdateCommand1.Connection = this.sqlConnection;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.DateTime, 8, "日期"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@时间", System.Data.SqlDbType.VarChar, 50, "时间"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@卡号", System.Data.SqlDbType.VarChar, 50, "卡号"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职工名称", System.Data.SqlDbType.VarChar, 50, "职工名称"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@状态", System.Data.SqlDbType.VarChar, 10, "状态"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_编号", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "编号", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_卡号", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "卡号", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "日期", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_时间", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "时间", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_状态", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "状态", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职工名称", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "职工名称", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@编号", System.Data.SqlDbType.Int, 4, "编号"));
//
// brushIDSet
//
this.brushIDSet.DataSetName = "BrushIDSet";
this.brushIDSet.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// textListBox
//
this.textListBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textListBox.Cursor = System.Windows.Forms.Cursors.Hand;
this.textListBox.ForeColor = System.Drawing.Color.Blue;
this.textListBox.ItemHeight = 12;
this.textListBox.Location = new System.Drawing.Point(176, 80);
this.textListBox.Name = "textListBox";
this.textListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
this.textListBox.Size = new System.Drawing.Size(192, 218);
this.textListBox.TabIndex = 23;
//
// tListBox
//
this.tListBox.ForeColor = System.Drawing.Color.Blue;
this.tListBox.ItemHeight = 12;
this.tListBox.Location = new System.Drawing.Point(16, 216);
this.tListBox.Name = "tListBox";
this.tListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
this.tListBox.Size = new System.Drawing.Size(128, 88);
this.tListBox.TabIndex = 25;
//
// UnZhuCheLabel
//
this.UnZhuCheLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.UnZhuCheLabel.ForeColor = System.Drawing.Color.Blue;
this.UnZhuCheLabel.Location = new System.Drawing.Point(16, 320);
this.UnZhuCheLabel.Name = "UnZhuCheLabel";
this.UnZhuCheLabel.Size = new System.Drawing.Size(120, 23);
this.UnZhuCheLabel.TabIndex = 26;
this.UnZhuCheLabel.Text = "未注册:";
this.UnZhuCheLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tZhuCheListBox
//
this.tZhuCheListBox.ForeColor = System.Drawing.Color.Blue;
this.tZhuCheListBox.ItemHeight = 12;
this.tZhuCheListBox.Location = new System.Drawing.Point(384, 160);
this.tZhuCheListBox.Name = "tZhuCheListBox";
this.tZhuCheListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
this.tZhuCheListBox.Size = new System.Drawing.Size(144, 136);
this.tZhuCheListBox.TabIndex = 27;
//
// label3
//
this.label3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label3.ForeColor = System.Drawing.Color.Blue;
this.label3.Location = new System.Drawing.Point(384, 128);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(120, 23);
this.label3.TabIndex = 28;
this.label3.Text = "注册区:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tZhuCheLabel
//
this.tZhuCheLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.tZhuCheLabel.ForeColor = System.Drawing.Color.Blue;
this.tZhuCheLabel.Location = new System.Drawing.Point(392, 320);
this.tZhuCheLabel.Name = "tZhuCheLabel";
this.tZhuCheLabel.Size = new System.Drawing.Size(152, 23);
this.tZhuCheLabel.TabIndex = 29;
this.tZhuCheLabel.Text = "注册:";
this.tZhuCheLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// ControlTime
//
this.ControlTime.Interval = 3000;
this.ControlTime.Tick += new System.EventHandler(this.ControlTime_Tick);
//
// textBox1
//
this.textBox1.BackColor = System.Drawing.SystemColors.HighlightText;
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBox1.ForeColor = System.Drawing.Color.Blue;
this.textBox1.Location = new System.Drawing.Point(384, 80);
this.textBox1.MaxLength = 12;
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox1.Size = new System.Drawing.Size(144, 40);
this.textBox1.TabIndex = 31;
this.textBox1.Text = "";
this.textBox1.Visible = false;
//
// listBox
//
this.listBox.ForeColor = System.Drawing.Color.Blue;
this.listBox.ItemHeight = 12;
this.listBox.Location = new System.Drawing.Point(176, 80);
this.listBox.Name = "listBox";
this.listBox.Size = new System.Drawing.Size(192, 220);
this.listBox.TabIndex = 32;
//
// btnOpenPort
//
this.btnOpenPort.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.btnOpenPort.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOpenPort.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenPort.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.btnOpenPort.ForeColor = System.Drawing.Color.White;
this.btnOpenPort.Image = ((System.Drawing.Image)(resources.GetObject("btnOpenPort.Image")));
this.btnOpenPort.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnOpenPort.Location = new System.Drawing.Point(416, 360);
this.btnOpenPort.Name = "btnOpenPort";
this.btnOpenPort.Size = new System.Drawing.Size(120, 24);
this.btnOpenPort.TabIndex = 33;
this.btnOpenPort.Text = "关闭端口(&C)";
this.btnOpenPort.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnOpenPort.Visible = false;
this.btnOpenPort.Click += new System.EventHandler(this.btnOpenPort_Click);
this.btnOpenPort.MouseEnter += new System.EventHandler(this.btnOpenPort_MouseEnter);
this.btnOpenPort.MouseLeave += new System.EventHandler(this.btnOpenPort_MouseLeave);
//
// label4
//
this.label4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label4.ForeColor = System.Drawing.Color.Blue;
this.label4.Location = new System.Drawing.Point(384, 48);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(120, 23);
this.label4.TabIndex = 34;
this.label4.Text = "测试区:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label4.Visible = false;
//
// axMSComm2
//
this.axMSComm2.Enabled = true;
this.axMSComm2.Location = new System.Drawing.Point(248, 168);
this.axMSComm2.Name = "axMSComm2";
this.axMSComm2.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMSComm2.OcxState")));
this.axMSComm2.Size = new System.Drawing.Size(38, 38);
this.axMSComm2.TabIndex = 35;
this.axMSComm2.OnComm += new System.EventHandler(this.axMSComm2_OnComm);
//
// BrushKaIDFrame
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
this.ClientSize = new System.Drawing.Size(550, 392);
this.ContextMenu = this.contextMenu;
this.Controls.Add(this.axMSComm2);
this.Controls.Add(this.label4);
this.Controls.Add(this.btnOpenPort);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.textName);
this.Controls.Add(this.tZhuCheLabel);
this.Controls.Add(this.label3);
this.Controls.Add(this.tZhuCheListBox);
this.Controls.Add(this.UnZhuCheLabel);
this.Controls.Add(this.tListBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnOpen);
this.Controls.Add(this.DateLabel);
this.Controls.Add(this.TimeLabel);
this.Controls.Add(this.StitictisLabel);
this.Controls.Add(this.stautsLabel);
this.Controls.Add(this.label2);
this.Controls.Add(this.prictureBox);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -