📄 login.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace telListener
{
public partial class login : Form
{
public login()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
if (checkFrm())
{
login.loginName = textBox1.Text;
login.password = textBox2.Text;
this.Tag = "?userName=" + textBox1.Text + "&password=" + textBox2.Text;
this.Close();
}
}
private bool checkFrm()
{
if (this.textBox1.Text == null || this.textBox1.Text.Length < 1)
{
MessageBox.Show("请输入用户名!");
return false;
}
if (this.textBox2.Text == null || this.textBox2.Text.Length < 1)
{
MessageBox.Show("请输入密码!");
return false;
}
return true;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -