//登录失败 private static void FailLogin(object source, LoginArgs e) { switch (e.FailureCode) { case 0: LoginErrorException noUserNameOrPwd = new LoginErrorException("未输入用户名和密码!"); throw noUserNameOrPwd; case 1: LoginErrorException wrongPwd = new LoginErrorException("密码错误!"); throw wrongPwd; case 2: LoginErrorException wrongUsername = new LoginErrorException("找不到用户!"); throw wrongUsername; default: return; } }
//登录成功 private static void SuccessLogin(object source, LoginArgs e) { }