📄 atm.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Bank;
namespace ATM
{
/// <summary>
/// Form1 的摘要说明。.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button9;
private bool IsVerified;
private bool IsWithdraw;
private bool IsDeposit;
private bool IsTransfer;
private bool IsUpdatePwd;
private bool IsTransfering;
private string TransferCardNo;
private decimal TransferAmount;
private Bank.Bank bank;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
IsVerified=false;
IsWithdraw=false;
IsDeposit=false;
IsTransfer=false;
IsUpdatePwd=false;
IsTransfering=false;
bank=new Bank.Bank();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
///清理所有正在使用的资源。
/// </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.groupBox1 = new System.Windows.Forms.GroupBox();
this.button9 = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button9);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Location = new System.Drawing.Point(136, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(360, 136);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "卡号信息";
//
// button9
//
this.button9.Location = new System.Drawing.Point(264, 88);
this.button9.Name = "button9";
this.button9.TabIndex = 4;
this.button9.Text = "确认口令";
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(88, 88);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.Size = new System.Drawing.Size(168, 21);
this.textBox2.TabIndex = 3;
this.textBox2.Text = "";
this.textBox2.Leave += new System.EventHandler(this.textBox2_Leave);
//
// label2
//
this.label2.Location = new System.Drawing.Point(24, 88);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 23);
this.label2.TabIndex = 2;
this.label2.Text = "口令:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(24, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(48, 23);
this.label1.TabIndex = 1;
this.label1.Text = "卡号:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(88, 40);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(264, 21);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "";
this.textBox1.Leave += new System.EventHandler(this.textBox1_Leave);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.textBox3);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.richTextBox1);
this.groupBox2.Location = new System.Drawing.Point(144, 152);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(344, 256);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(32, 56);
this.textBox3.Name = "textBox3";
this.textBox3.ReadOnly = true;
this.textBox3.Size = new System.Drawing.Size(240, 21);
this.textBox3.TabIndex = 2;
this.textBox3.Text = "";
this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
//
// label3
//
this.label3.Location = new System.Drawing.Point(32, 24);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(216, 23);
this.label3.TabIndex = 1;
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(8, 120);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(328, 128);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(32, 168);
this.button1.Name = "button1";
this.button1.TabIndex = 2;
this.button1.Text = "查询余额";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(32, 216);
this.button2.Name = "button2";
this.button2.TabIndex = 3;
this.button2.Text = "取款";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(32, 264);
this.button3.Name = "button3";
this.button3.TabIndex = 4;
this.button3.Text = "存款";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(32, 312);
this.button4.Name = "button4";
this.button4.TabIndex = 5;
this.button4.Text = "转帐";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(32, 360);
this.button5.Name = "button5";
this.button5.TabIndex = 6;
this.button5.Text = "修改口令";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
this.button6.Location = new System.Drawing.Point(520, 304);
this.button6.Name = "button6";
this.button6.TabIndex = 7;
this.button6.Text = "确认";
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(520, 336);
this.button7.Name = "button7";
this.button7.TabIndex = 8;
this.button7.Text = "重新输入";
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// button8
//
this.button8.Location = new System.Drawing.Point(520, 368);
this.button8.Name = "button8";
this.button8.TabIndex = 4;
this.button8.Text = "操作结束";
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(608, 429);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.button8);
this.Name = "Form1";
this.Text = "自动桂员机";
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -