private void btnLogon_Press(object sender, EventArgs e)
{
try
{
string userID = this.txtUserName.Text.Trim();
string password = this.txtPassword.Text.Trim();
if (string.IsNullOrEmpty(userID))
throw new Exception("请输入用户名");
if (string.IsNullOrEmpty(password))
throw new Exception("请输入密码");
if (cbxRemeberPassword.Checked == true)
{
//记住密码
//LoadClientData("pwd", password);
//读取密码
//ReadClientData("pwd", (object s, ClientDataResultHandlerArgs args) =>
// {
// if (string.IsNullOrEmpty(args.error))
// {
// Toast("密码为" + args.Value);
// }
// });
}
}
catch (Exception ex)
{
Toast(ex.Message);
}
}
代码是这样的,注释取消编译就会提示那个错误,注释那几行编译就是正常的 |