1
0
mirror of https://e.coding.net/circlecloud/CTZLauncher.git synced 2024-11-14 00:48:48 +00:00

添加注册流程...

This commit is contained in:
j502647092 2015-08-05 20:46:44 +08:00
parent 5796c2c3a1
commit af5d9e3ec7

View File

@ -89,6 +89,9 @@ namespace CTZLauncher
{
if (!auth.Login())
{
if (!auth.isRegistered())
MessageBox.Show("该用户名未注册 请先注册!");
else
MessageBox.Show("登录失败 账号不存在 或 密码错误 !");
}
else
@ -169,7 +172,20 @@ namespace CTZLauncher
MessageBox.Show("请输入账号密码!");
return;
}
CTZAuthenticator auth = new CTZAuthenticator(username.Text, password.Text, "127.0.0.1", 2000);
if (auth.isRegistered())
{
MessageBox.Show("该用户名已注册 请更换用户名!");
return;
}
if (auth.Register())
{
MessageBox.Show("注册成功!");
auth.Login();
ServerWindow.Visibility = System.Windows.Visibility.Visible;
}
else
MessageBox.Show("注册失败!");
}
}
}