⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmuser.cs

📁 实现ATM模拟
💻 CS
📖 第 1 页 / 共 5 页
字号:
			// btnFanHui
			// 
			this.btnFanHui.BackColor = System.Drawing.Color.Transparent;
			this.btnFanHui.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnFanHui.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnFanHui.Location = new System.Drawing.Point(8, 96);
			this.btnFanHui.Name = "btnFanHui";
			this.btnFanHui.Size = new System.Drawing.Size(96, 40);
			this.btnFanHui.TabIndex = 1;
			this.btnFanHui.Text = "返回";
			this.btnFanHui.Click += new System.EventHandler(this.button24_Click);
			// 
			// lblOkMsg
			// 
			this.lblOkMsg.BackColor = System.Drawing.Color.Transparent;
			this.lblOkMsg.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.lblOkMsg.Location = new System.Drawing.Point(176, 68);
			this.lblOkMsg.Name = "lblOkMsg";
			this.lblOkMsg.Size = new System.Drawing.Size(264, 48);
			this.lblOkMsg.TabIndex = 0;
			// 
			// tabPage9
			// 
			this.tabPage9.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("tabPage9.BackgroundImage")));
			this.tabPage9.Controls.Add(this.lblYanZheng);
			this.tabPage9.Controls.Add(this.pictureBox1);
			this.tabPage9.Location = new System.Drawing.Point(4, 21);
			this.tabPage9.Name = "tabPage9";
			this.tabPage9.Size = new System.Drawing.Size(608, 455);
			this.tabPage9.TabIndex = 8;
			this.tabPage9.Text = "跳转";
			// 
			// groupBox1
			// 
			this.groupBox1.BackColor = System.Drawing.Color.Transparent;
			this.groupBox1.Controls.Add(this.btnNum0);
			this.groupBox1.Controls.Add(this.btnNum9);
			this.groupBox1.Controls.Add(this.btnNum8);
			this.groupBox1.Controls.Add(this.btnNum7);
			this.groupBox1.Controls.Add(this.btnNum6);
			this.groupBox1.Controls.Add(this.btnNum5);
			this.groupBox1.Controls.Add(this.btnNum4);
			this.groupBox1.Controls.Add(this.btnNum3);
			this.groupBox1.Controls.Add(this.btnNum2);
			this.groupBox1.Controls.Add(this.btnNum1);
			this.groupBox1.Location = new System.Drawing.Point(616, 0);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(144, 160);
			this.groupBox1.TabIndex = 1;
			this.groupBox1.TabStop = false;
			// 
			// btnNum0
			// 
			this.btnNum0.BackColor = System.Drawing.Color.Transparent;
			this.btnNum0.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum0.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum0.Location = new System.Drawing.Point(8, 120);
			this.btnNum0.Name = "btnNum0";
			this.btnNum0.Size = new System.Drawing.Size(32, 23);
			this.btnNum0.TabIndex = 10;
			this.btnNum0.Text = "0";
			this.btnNum0.Click += new System.EventHandler(this.button16_Click);
			// 
			// btnNum9
			// 
			this.btnNum9.BackColor = System.Drawing.Color.Transparent;
			this.btnNum9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum9.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum9.Location = new System.Drawing.Point(104, 88);
			this.btnNum9.Name = "btnNum9";
			this.btnNum9.Size = new System.Drawing.Size(32, 23);
			this.btnNum9.TabIndex = 8;
			this.btnNum9.Text = "9";
			this.btnNum9.Click += new System.EventHandler(this.button12_Click);
			// 
			// btnNum8
			// 
			this.btnNum8.BackColor = System.Drawing.Color.Transparent;
			this.btnNum8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum8.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum8.Location = new System.Drawing.Point(56, 88);
			this.btnNum8.Name = "btnNum8";
			this.btnNum8.Size = new System.Drawing.Size(32, 23);
			this.btnNum8.TabIndex = 7;
			this.btnNum8.Text = "8";
			this.btnNum8.Click += new System.EventHandler(this.button13_Click);
			// 
			// btnNum7
			// 
			this.btnNum7.BackColor = System.Drawing.Color.Transparent;
			this.btnNum7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum7.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum7.Location = new System.Drawing.Point(8, 88);
			this.btnNum7.Name = "btnNum7";
			this.btnNum7.Size = new System.Drawing.Size(32, 23);
			this.btnNum7.TabIndex = 6;
			this.btnNum7.Text = "7";
			this.btnNum7.Click += new System.EventHandler(this.button14_Click);
			// 
			// btnNum6
			// 
			this.btnNum6.BackColor = System.Drawing.Color.Transparent;
			this.btnNum6.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum6.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum6.Location = new System.Drawing.Point(104, 56);
			this.btnNum6.Name = "btnNum6";
			this.btnNum6.Size = new System.Drawing.Size(32, 23);
			this.btnNum6.TabIndex = 5;
			this.btnNum6.Text = "6";
			this.btnNum6.Click += new System.EventHandler(this.button11_Click);
			// 
			// btnNum5
			// 
			this.btnNum5.BackColor = System.Drawing.Color.Transparent;
			this.btnNum5.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum5.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum5.Location = new System.Drawing.Point(56, 56);
			this.btnNum5.Name = "btnNum5";
			this.btnNum5.Size = new System.Drawing.Size(32, 23);
			this.btnNum5.TabIndex = 4;
			this.btnNum5.Text = "5";
			this.btnNum5.Click += new System.EventHandler(this.button10_Click);
			// 
			// btnNum4
			// 
			this.btnNum4.BackColor = System.Drawing.Color.Transparent;
			this.btnNum4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum4.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum4.Location = new System.Drawing.Point(8, 56);
			this.btnNum4.Name = "btnNum4";
			this.btnNum4.Size = new System.Drawing.Size(32, 23);
			this.btnNum4.TabIndex = 3;
			this.btnNum4.Text = "4";
			this.btnNum4.Click += new System.EventHandler(this.button9_Click);
			// 
			// btnNum3
			// 
			this.btnNum3.BackColor = System.Drawing.Color.Transparent;
			this.btnNum3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum3.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum3.Location = new System.Drawing.Point(104, 24);
			this.btnNum3.Name = "btnNum3";
			this.btnNum3.Size = new System.Drawing.Size(32, 23);
			this.btnNum3.TabIndex = 2;
			this.btnNum3.Text = "3";
			this.btnNum3.Click += new System.EventHandler(this.button8_Click);
			// 
			// btnNum2
			// 
			this.btnNum2.BackColor = System.Drawing.Color.Transparent;
			this.btnNum2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum2.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum2.Location = new System.Drawing.Point(56, 24);
			this.btnNum2.Name = "btnNum2";
			this.btnNum2.Size = new System.Drawing.Size(32, 23);
			this.btnNum2.TabIndex = 1;
			this.btnNum2.Text = "2";
			this.btnNum2.Click += new System.EventHandler(this.button7_Click);
			// 
			// btnNum1
			// 
			this.btnNum1.BackColor = System.Drawing.Color.Transparent;
			this.btnNum1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnNum1.ForeColor = System.Drawing.SystemColors.ControlLightLight;
			this.btnNum1.Location = new System.Drawing.Point(8, 24);
			this.btnNum1.Name = "btnNum1";
			this.btnNum1.Size = new System.Drawing.Size(32, 23);
			this.btnNum1.TabIndex = 0;
			this.btnNum1.Text = "1";
			this.btnNum1.Click += new System.EventHandler(this.button6_Click);
			// 
			// btnBackY
			// 
			this.btnBackY.BackColor = System.Drawing.Color.Transparent;
			this.btnBackY.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnBackY.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnBackY.Location = new System.Drawing.Point(500, 96);
			this.btnBackY.Name = "btnBackY";
			this.btnBackY.Size = new System.Drawing.Size(96, 40);
			this.btnBackY.TabIndex = 5;
			this.btnBackY.Text = "返回";
			this.btnBackY.Click += new System.EventHandler(this.btnBackY_Click);
			// 
			// timer1
			// 
			this.timer1.Interval = 1000;
			this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
			// 
			// timer2
			// 
			this.timer2.Interval = 1000;
			this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
			// 
			// pictureBox1
			// 
			this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
			this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
			this.pictureBox1.Location = new System.Drawing.Point(176, 216);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(128, 120);
			this.pictureBox1.TabIndex = 0;
			this.pictureBox1.TabStop = false;
			// 
			// lblYanZheng
			// 
			this.lblYanZheng.BackColor = System.Drawing.Color.Transparent;
			this.lblYanZheng.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.lblYanZheng.ForeColor = System.Drawing.SystemColors.HighlightText;
			this.lblYanZheng.Location = new System.Drawing.Point(104, 56);
			this.lblYanZheng.Name = "lblYanZheng";
			this.lblYanZheng.Size = new System.Drawing.Size(328, 24);
			this.lblYanZheng.TabIndex = 1;
			this.lblYanZheng.Text = "正在验证,请稍候.";
			// 
			// timer3
			// 
			this.timer3.Interval = 1000;
			this.timer3.Tick += new System.EventHandler(this.timer3_Tick);
			// 
			// button2
			// 
			this.button2.BackColor = System.Drawing.Color.Transparent;
			this.button2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.button2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.button2.Location = new System.Drawing.Point(504, 96);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(96, 40);
			this.button2.TabIndex = 4;
			this.button2.Text = "返回";
			this.button2.Click += new System.EventHandler(this.button2_Click_1);
			// 
			// button3
			// 
			this.button3.BackColor = System.Drawing.Color.Transparent;
			this.button3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.button3.Location = new System.Drawing.Point(8, 180);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(96, 40);
			this.button3.TabIndex = 12;
			this.button3.Text = "返回";
			this.button3.Click += new System.EventHandler(this.button3_Click_1);
			// 
			// btnBackQu
			// 
			this.btnBackQu.BackColor = System.Drawing.Color.Transparent;
			this.btnBackQu.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnBackQu.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnBackQu.Location = new System.Drawing.Point(8, 180);
			this.btnBackQu.Name = "btnBackQu";
			this.btnBackQu.Size = new System.Drawing.Size(96, 40);
			this.btnBackQu.TabIndex = 8;
			this.btnBackQu.Text = "返回";
			this.btnBackQu.Click += new System.EventHandler(this.button4_Click_1);
			// 
			// btnBackCun
			// 
			this.btnBackCun.BackColor = System.Drawing.Color.Transparent;
			this.btnBackCun.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnBackCun.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.btnBackCun.Location = new System.Drawing.Point(8, 180);
			this.btnBackCun.Name = "btnBackCun";
			this.btnBackCun.Size = new System.Drawing.Size(96, 40);
			this.btnBackCun.TabIndex = 15;
			this.btnBackCun.Text = "返回";
			this.btnBackCun.Click += new System.EventHandler(this.btnBackCun_Click);
			// 
			// printPreviewDialog1
			// 
			this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
			this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
			this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
			this.printPreviewDialog1.Document = this.printDocument1;
			this.printPreviewDialog1.Enabled = true;
			this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
			this.printPreviewDialog1.Location = new System.Drawing.Point(66, 75);
			this.printPreviewDialog1.MinimumSize = new System.Drawing.Size(375, 250);
			this.printPreviewDialog1.Name = "printPreviewDialog1";
			this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
			this.printPreviewDialog1.Visible = false;
			// 
			// frmMain
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = new System.Drawing.Size(768, 450);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.tabControl1);
			this.Name = "frmMain";
			this.Text = "汇丰银行";
			this.Load += new System.EventHandler(this.Form1_Load);
			this.tabControl1.ResumeLayout(false);
			this.tabPage1.ResumeLayout(false);
			this.tabPage2.ResumeLayout(false);
			this.tabPage4.ResumeLayout(false);
			this.tabPage3.ResumeLayout(false);
			this.tabPage5.ResumeLayout(false);
			this.tabPage6.ResumeLayout(false);
			this.tabPage8.ResumeLayout(false);
			this.tabPage7.ResumeLayout(false);
			this.tabPage9.ResumeLayout(false);
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new frmMain());
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			try
			{
				string line="";
				if(this.tabControl1.SelectedIndex==1)
				{
					line="QUERYACCOUNTEXISTS|"+this.txtID.Text+"|"+this.txtPwd.Text;
				}
				TcpClient tcp=new TcpClient();
				tcp.Connect(IPAddress.Parse("127.0.0.1"),9000);
				NetworkStream net=tcp.GetStream();

				StreamWriter sw=new StreamWriter(net);
				StreamReader sr=new StreamReader(net);

				sw.WriteLine(line);
				sw.Flush();
				//MessageBox.Show(sr.ReadLine());

				
				string denglu=sr.ReadLine();
				//MessageBox.Show(denglu);
				if(denglu=="888")
				{
					this.btnPrint.Visible = false;
					this.timer3.Start();
					this.tabControl1.SelectedIndex=8;
					this.lblOkMsg.Text="登陆成功!";

				}
				else
				{
					this.tabControl1.SelectedIndex=7;
					this.lblErrorMsg.Text="账户不存在,或输入有误!";
					this.timer2.Start();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -