📄 frmuser.cs
字号:
this.tabControl1.SelectedIndex = 2;
}
private void button20_Click(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 5;
}
private void button22_Click(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 4;
}
//点击报警按钮进行判断
private void button23_Click(object sender, System.EventArgs e)
{
MessageBox.Show("您的卡已被暂存入银行安全保管,请凭有效证件前去认领");
Application.Exit();
}
private void button24_Click(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
this.txtQueQian.Text = "";
this.txtChunQian.Text="";
this.txtDuiZhang.Text = "";
this.txtADuiZhang.Text ="";
this.txtZhuanMoney.Text = "";
}
//点击报警按钮进行判断
private void button25_Click(object sender, System.EventArgs e)
{
DialogResult answer = MessageBox.Show("您确定要退出系统吗","提示",MessageBoxButtons.YesNo);
if(answer == DialogResult.Yes)
{
Application.Exit();
}if(answer == DialogResult.No)
{
return;
}
}
private void button26_Click(object sender, System.EventArgs e)
{
this.txtDuiZhang.Text = "";
this.txtZhuanMoney.Text = "";
this.txtADuiZhang.Text = "";
}
private void button27_Click(object sender, System.EventArgs e)
{
this.txtQueQian.Text = "";
}
private void button28_Click(object sender, System.EventArgs e)
{
this.txtChunQian.Text="";
}
private void button8_Click(object sender, System.EventArgs e)
{
btn("3");
}
private void button9_Click(object sender, System.EventArgs e)
{
btn("4");
}
private void button10_Click(object sender, System.EventArgs e)
{
btn("5");
}
private void button11_Click(object sender, System.EventArgs e)
{
btn("6");
}
private void button14_Click(object sender, System.EventArgs e)
{
btn("7");
}
private void button13_Click(object sender, System.EventArgs e)
{
btn("8");
}
private void button12_Click(object sender, System.EventArgs e)
{
btn("9");
}
private void button16_Click(object sender, System.EventArgs e)
{
btn("0");
}
private void Form1_Load(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 1;
PrintDocument pdo=this.printDocument1;
pdo.PrintPage+=new PrintPageEventHandler(pd_PrintPage);
}
//生成随机数
private void pibYanZheng_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
byte[] x = new byte[5];
x[0] = (byte)(97 +ran.Next(26));
x[1] = (byte)(97 +ran.Next(26));
x[2] = (byte)(97 +ran.Next(26));
x[3] = (byte)(97 +ran.Next(26));
x[4] = (byte)(97 +ran.Next(26));
System.Text.ASCIIEncoding data = new System.Text.ASCIIEncoding();
string line = data.GetString(x);
Point[] p = new Point[30];
for(int i = 0 ;i < 30;i++)
{
p[i].X = ran.Next(400);
p[i].Y = ran.Next(200);
}
e.Graphics.DrawString(line,new Font("宋体",20.0f),new System.Drawing.SolidBrush(Color.Red),0,0);
e.Graphics.DrawLines(new Pen(new System.Drawing.SolidBrush(Color.Blue),ran.Next(5)),p);
e.Graphics.DrawCurve(new Pen(new System.Drawing.SolidBrush(Color.Blue),ran.Next(5)),p,5,5,2.0f);
}
//重置按钮清空文本框
private void btnChongZhi_Click(object sender, System.EventArgs e)
{
this.txtID.Text="";
this.txtPwd.Text="";
}
private void txtZhuanMoney_TextChanged(object sender, System.EventArgs e)
{
}
private void tabPage2_Click(object sender, System.EventArgs e)
{
}
private void tabPage7_Click(object sender, System.EventArgs e)
{
}
private void tabPage1_Click(object sender, System.EventArgs e)
{
}
private void tabPage3_Click(object sender, System.EventArgs e)
{
}
private void tabPage8_Click(object sender, System.EventArgs e)
{
}
private void tabPage4_Click(object sender, System.EventArgs e)
{
}
private void tabPage6_Click(object sender, System.EventArgs e)
{
}
private void tabPage5_Click(object sender, System.EventArgs e)
{
}
private void txtChunQian_TextChanged(object sender, System.EventArgs e)
{
}
//小键盘方法
public void btn(string i)
{
//欢迎界面
if (this.tabControl1.SelectedIndex == 1)
{
if (this.txtID.Text.Length != 4)
{
this.txtID.AppendText(i);
}
else if (this.txtPwd.Text.Length != 15)
{
this.txtPwd.AppendText(i);
}
}
//取款
else if (this.tabControl1.SelectedIndex == 3)
{
if (this.txtQueQian.Text.Length != 4)
{
this.txtQueQian.AppendText(i.ToString());
}
}
//存款
else if (this.tabControl1.SelectedIndex == 4)
{
if (this.txtChunQian.Text.Length != 8)
{
this.txtChunQian.AppendText(i);
}
}
//转账
else if (this.tabControl1.SelectedIndex == 5)
{
if (this.txtDuiZhang.Text.Length != 4)
{
this.txtDuiZhang.AppendText(i);
}
else if (this.txtADuiZhang.Text.Length != 4)
{
this.txtADuiZhang.AppendText(i);
}
else
{
this.txtZhuanMoney.AppendText(i);
}
}
}
private void txtQueQian_TextChanged(object sender, System.EventArgs e)
{
}
//清空文本框
private void button1_Click_1(object sender, System.EventArgs e)
{
this.txtQueQian.Text="";
}
//返回主界面
private void btnBackY_Click(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
}
//控制跳转界面
int times = 3;
int timec = 3;
//控制字体改变
int timew = 6;
//倒计时返回主界面
private void timer1_Tick(object sender, System.EventArgs e)
{
times--;
if(times==0)
{
this.timer1.Stop();
this.tabControl1.SelectedIndex = 0;
}
}
//倒计时返回主界面
private void timer2_Tick(object sender, System.EventArgs e)
{
timec--;
if(timec==0)
{
this.timer2.Stop();
this.tabControl1.SelectedIndex = 1;
}
}
//TIME控件控制字体的变化
private void timer3_Tick(object sender, System.EventArgs e)
{
timew--;
if(timew==5)
{
this.lblYanZheng.Text = "正在验证,请稍候..";
}
else if(timew==4)
{
this.lblYanZheng.Text = "正在验证,请稍候...";
}
else if(timew==3)
{
this.lblYanZheng.Text = "正在验证,请稍候....";
}
else if(timew==2)
{
this.lblYanZheng.Text = "正在验证,请稍候.....";
}
else if(timew==1)
{
this.lblYanZheng.Text = "正在验证,请稍候......";
}
else if(timew==0)
{
this.timer3.Stop();
this.tabControl1.SelectedIndex = 6;
}
}
//返回主界面
private void button2_Click_1(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
}
//返回主界面
private void button3_Click_1(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
}
//返回主界面
private void button4_Click_1(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
}
//返回主界面
private void btnBackCun_Click(object sender, System.EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
}
private void btnPrint_Click(object sender, System.EventArgs e)
{
message="------------------------------------\n"+"汇丰银行\n"+"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -