王利玲2017270315

2018-10-15  本文已影响0人  955nice

1. 登录界面的效果图

QQ图片20181015182451.png

2. 登录界面实现的功能描述

3. 登录界面各控件的参数设置

Label1

属性
text 用户管理

Label2

属性
text 账号

Label3

属性
text 密码

comboBox1

属性
Dropdownstyle Dropdownlist

textBox1

属性
maxlenth 9

texBox2

属性
maxlenth 9
passwordchar *

Button1

属性
text 登陆

Button2

属性
text 退出

Linklabel1

属性
text 忘记密码?

pictureBox1

属性
backgroundlmage picture

4. 重要方法描述

        {
            comboBox1.Text = "收银员";
        }
private void button1_Click(object sender, EventArgs e)
        {
            if (!textBox1.Text.Equals("123456") || !textBox2.Text.Equals("123456"))
            {
                MessageBox.Show("用户名或密码错误", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);

            }
            else
            {
                MessageBox.Show("登录成功", "提示", MessageBoxButtons.OK);



            }

 }
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Enter)
            {
                SendKeys.Send("{tab}");
            }
private void textBox2_Enter(object sender, EventArgs e)
        {
            ((TextBox)sender).SelectAll();
        }
private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Enter)
            {
                if (!textBox1.Text.Equals("123456") || !textBox2.Text.Equals("123456"))
                {
                    MessageBox.Show("用户名或密码错误", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);

                }
                else
                {
                    MessageBox.Show("登录成功", "提示", MessageBoxButtons.OK);

                }
QQ图片20181015190519.png QQ图片20181015190523.png

5. 想一想,还有哪些尚需完善的功能

上一篇 下一篇

猜你喜欢

热点阅读