1.登陆界面效果图
2. 登录界面实现的功能描述
该界面是设计是应用给工作人员登录商超系统,这个系统能给与不同人群不同的工作权限。例如后台管理人员和实际应用的收银员在选择了不同的登录方式后所得到的权限是完全不一样的。界面有许多的功能,如选择登录方式,忘记密码,等一系列实用且精美的设计。
3. 登录界面各控件的参数设置
label1
label2
label3
Linklabel1
comboBox1
属性 |
值 |
DropDownStyle |
DropDownList |
SelectedIndexChanged |
comboBox1_SelectedIndexChanged |
textBox1
属性 |
值 |
MaxLength |
9 |
Click |
textBox1_Click |
KeyPress |
textBox1_KeyPress |
TextChanged |
textBox1_TextChanged |
textBox2
属性 |
值 |
MaxLength |
9 |
Click |
textBox1_Click |
KeyPress |
textBox2_KeyPress |
Enter |
text Box1_Enter |
MaxLength |
6 |
Passwordchar |
|
button1
属性 |
值 |
Text |
登陆 |
UseVisualStyleBackColor |
False |
Click |
button1_Click |
button2
属性 |
值 |
Text |
退出 |
UseVisualStyleBackColor |
False |
Click |
button2_Clik |
4. 重要方法描述
private void button1_Click(object sender, EventArgs e)
{
if (this.comboBox1.SelectedItem.ToString() == "收银员")
{
if (this.textBox1.Text == "123456789" && this.textBox2.Text == "123456")
{
MessageBox.Show("收银员登录成功");
}
else
{
MessageBox.Show("用户名或密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private void label3_Click(object sender, EventArgs e)
{
private void Form1_Load(object sender, EventArgs e)
{
this.comboBox1.SelectedIndex = 0;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.comboBox1.SelectedIndex = 0;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter)
{
SendKeys.Send("{tab}");
}
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void textBox1_Enter(object sender, EventArgs e)
{
((TextBox)sender).SelectAll();
}
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter)
{
SendKeys.Send("{tab}");
}
}
private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter)
{
SendKeys.Send("{tab}");
}
}
}
5.尚需完善的功能
暂时没想到