private void button2_Click(object sender, EventArgs e) { Frm4 frm4 = new Frm4(); this.Hide(); frm4.Show(); }
private void button1_Click(object sender, EventArgs e) { string[] zh = File.ReadAllLines(@"账号.txt"); string[] mm = File.ReadAllLines(@"密码.txt"); bool b = false; if (textBox账号.TextLength == 0 || textBox2.TextLength == 0) { MessageBox.Show("请输入账号或密码"); if (textBox账号.TextLength == 0) { label5.Text = "请输入账号"; } if (textBox2.TextLength == 0) { label6.Text = "请输入密码"; } return; } for (int a = 0; a < zh.Length; a++) { if (textBox账号.Text == zh[a] && textBox2.Text == mm[a]) { b = true; break; } } if (b) { name = textBox账号.Text; Frm4 frm4 = new Frm4(); frm4.Show(); this.Hide(); } else { if (textBox2.Text.Length != 0) { label6.Text = "密码忘了吗"; } MessageBox.Show("账号或密码错误"); } }