Ejemplo n.º 1
0
        private void pictureBox2_Click(object sender, EventArgs e)  //注册
        {
            if (txtUserId.Text.Trim().Equals(string.Empty) || txtPwd1.Text.Trim().Equals(string.Empty) || txtPwd2.Text.Trim().Equals(string.Empty))
            {
                MessageBox.Show("请输入完整的信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (!txtPwd1.Text.Trim().Equals(txtPwd2.Text.Trim()))
            {
                MessageBox.Show("两次密码不一致!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                try
                {
                    //*********************************************************************************************************************************
                    //          用户名控件名:txtUserId                    密码控件名:txtPwd
                    //*********************************************************************************************************************************

                    if (txtPwd1.Text.Trim().Equals(txtPwd2.Text.Trim()))
                    {
                        ws.info info = new GameSystem.ws.info();
                        info.zh  = Int32.Parse(txtUserId.Text);
                        info.pwd = txtPwd1.Text;
                        bool su = con.register(info);
                        if (su)//注册成功执行
                        {
                            MessageBox.Show("注册成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("两次密码不一致!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 2
0
 public System.Threading.Tasks.Task <bool> updateinfoAsync(GameSystem.ws.info i)
 {
     return(base.Channel.updateinfoAsync(i));
 }
Ejemplo n.º 3
0
 public System.Threading.Tasks.Task <bool> registerAsync(GameSystem.ws.info i)
 {
     return(base.Channel.registerAsync(i));
 }
Ejemplo n.º 4
0
 public bool updateinfo(GameSystem.ws.info i)
 {
     return(base.Channel.updateinfo(i));
 }
Ejemplo n.º 5
0
 public bool register(GameSystem.ws.info i)
 {
     return(base.Channel.register(i));
 }