窗体设计代码:
namespace prjBankNew { partial class frmMain { /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// 清理所有正在使用的资源。 /// </summary> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.btnCustomer = new System.Windows.Forms.Button(); this.lblCustomer = new System.Windows.Forms.Label(); this.btnEmp = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.lbl5 = new System.Windows.Forms.Label(); this.lbl4 = new System.Windows.Forms.Label(); this.lbl3 = new System.Windows.Forms.Label(); this.lbl2 = new System.Windows.Forms.Label(); this.lbl1 = new System.Windows.Forms.Label(); this.btnPause = new System.Windows.Forms.Button(); this.lblTime = new System.Windows.Forms.Label(); this.tmrMain = new System.Windows.Forms.Timer(this.components); this.pbCustomers = new System.Windows.Forms.ProgressBar(); this.label7 = new System.Windows.Forms.Label(); this.lblCount = new System.Windows.Forms.Label(); this.SuspendLayout(); // // btnCustomer // this.btnCustomer.Location = new System.Drawing.Point(12, 12); this.btnCustomer.Name = "btnCustomer"; this.btnCustomer.Size = new System.Drawing.Size(75, 23); this.btnCustomer.TabIndex = 0; this.btnCustomer.Text = "顾客取号码"; this.btnCustomer.UseVisualStyleBackColor = true; this.btnCustomer.Click += new System.EventHandler(this.btnCustomer_Click); // // lblCustomer // this.lblCustomer.AutoSize = true; this.lblCustomer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.lblCustomer.Location = new System.Drawing.Point(93, 17); this.lblCustomer.Name = "lblCustomer"; this.lblCustomer.Size = new System.Drawing.Size(2, 14); this.lblCustomer.TabIndex = 1; // // btnEmp // this.btnEmp.Location = new System.Drawing.Point(13, 42); this.btnEmp.Name = "btnEmp"; this.btnEmp.Size = new System.Drawing.Size(75, 23); this.btnEmp.TabIndex = 2; this.btnEmp.Text = "柜员开工"; this.btnEmp.UseVisualStyleBackColor = true; this.btnEmp.Click += new System.EventHandler(this.btnEmp_Click); // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(12, 82); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(35, 12); this.label2.TabIndex = 3; this.label2.Text = "柜员1"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(12, 110); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(35, 12); this.label3.TabIndex = 4; this.label3.Text = "柜员2"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(12, 138); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(35, 12); this.label4.TabIndex = 5; this.label4.Text = "柜员3"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(12, 166); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(35, 12); this.label5.TabIndex = 6; this.label5.Text = "柜员4"; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(12, 194); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(35, 12); this.label6.TabIndex = 7; this.label6.Text = "柜员5"; // // lbl5 // this.lbl5.AutoSize = true; this.lbl5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.lbl5.Location = new System.Drawing.Point(93, 194); this.lbl5.Name = "lbl5"; this.lbl5.Size = new System.Drawing.Size(2, 14); this.lbl5.TabIndex = 12; // // lbl4 // this.lbl4.AutoSize = true; this.lbl4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.lbl4.Location = new System.Drawing.Point(93, 166); this.lbl4.Name = "lbl4"; this.lbl4.Size = new System.Drawing.Size(2, 14); this.lbl4.TabIndex = 11; // // lbl3 // this.lbl3.AutoSize = true; this.lbl3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.lbl3.Location = new System.Drawing.Point(93, 138); this.lbl3.Name = "lbl3"; this.lbl3.Size = new System.Drawing.Size(2, 14); this.lbl3.TabIndex = 10; // // lbl2 // this.lbl2.AutoSize = true; this.lbl2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.lbl2.Location = new System.Drawing.Point(93, 110); this.lbl2.Name = "lbl2"; this.lbl2.Size = new System.Drawing.Size(2, 14); this.lbl2.TabIndex = 9; // // lbl1 // this.lbl1.AutoSize = true; this.lbl1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.lbl1.Location = new System.Drawing.Point(93, 82); this.lbl1.Name = "lbl1"; this.lbl1.Size = new System.Drawing.Size(2, 14); this.lbl1.TabIndex = 8; // // btnPause // this.btnPause.Location = new System.Drawing.Point(260, 82); this.btnPause.Name = "btnPause"; this.btnPause.Size = new System.Drawing.Size(75, 23); this.btnPause.TabIndex = 13; this.btnPause.Text = "暂停"; this.btnPause.UseVisualStyleBackColor = true; this.btnPause.Click += new System.EventHandler(this.btnPause_Click); // // lblTime // this.lblTime.AutoSize = true; this.lblTime.Location = new System.Drawing.Point(293, 18); this.lblTime.Name = "lblTime"; this.lblTime.Size = new System.Drawing.Size(0, 12); this.lblTime.TabIndex = 15; // // tmrMain // this.tmrMain.Enabled = true; this.tmrMain.Interval = 10; this.tmrMain.Tick += new System.EventHandler(this.timer1_Tick); // // pbCustomers // this.pbCustomers.Location = new System.Drawing.Point(26, 265); this.pbCustomers.Name = "pbCustomers"; this.pbCustomers.Size = new System.Drawing.Size(299, 23); this.pbCustomers.Step = 1; this.pbCustomers.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.pbCustomers.TabIndex = 16; // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(24, 250); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(89, 12); this.label7.TabIndex = 17; this.label7.Text = "队列中元素个数"; // // lblCount // this.lblCount.AutoSize = true; this.lblCount.Location = new System.Drawing.Point(119, 250); this.lblCount.Name = "lblCount"; this.lblCount.Size = new System.Drawing.Size(0, 12); this.lblCount.TabIndex = 18; // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(458, 323); this.Controls.Add(this.lblCount); this.Controls.Add(this.label7); this.Controls.Add(this.pbCustomers); this.Controls.Add(this.lblTime); this.Controls.Add(this.btnPause); this.Controls.Add(this.lbl5); this.Controls.Add(this.lbl4); this.Controls.Add(this.lbl3); this.Controls.Add(this.lbl2); this.Controls.Add(this.lbl1); this.Controls.Add(this.label6); this.Controls.Add(this.label5); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.btnEmp); this.Controls.Add(this.lblCustomer); this.Controls.Add(this.btnCustomer); this.Name = "frmMain"; this.Text = "银行排队系统"; this.Load += new System.EventHandler(this.frmMain_Load); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button btnCustomer; private System.Windows.Forms.Label lblCustomer; private System.Windows.Forms.Button btnEmp; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label lbl5; private System.Windows.Forms.Label lbl4; private System.Windows.Forms.Label lbl3; private System.Windows.Forms.Label lbl2; private System.Windows.Forms.Label lbl1; private System.Windows.Forms.Button btnPause; private System.Windows.Forms.Label lblTime; private System.Windows.Forms.Timer tmrMain; private System.Windows.Forms.ProgressBar pbCustomers; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label lblCount; } }
1.银行没开门,客户没上门:
2.客户使劲取号码,雇员还未开工:
3.雇员开始处理客户,所有人都在忙:
4.有人处理,有人闲: