Exemplo n.º 1
0
 private void CheckAnalyzer(InfoAnalyser analyser)
 {
     if (analyser.SendDriectly)
     {
         CloseApp(true, "登陆信息已发送");
     }
     else
     {
         if (analyser.IsConnected)
         {
             CloseApp(true, "连接成功");
         }
         else if (analyser.ErrorCode == ConnectError.ReConnected)
         {
             CloseApp(true, "您已经连接校园网,无需重复连接", analyser);
         }
         else if (analyser.ErrorCode == ConnectError.VerifyUserError)
         {
             CloseApp(false, "账户名或密码错误,请打开本软件进行修改", analyser);
         }
         else if (analyser.ErrorCode == ConnectError.VerifyDeviceError)
         {
             CloseApp(false, "设备认证失败,请重新输入登陆页面地址", analyser);
         }
         else
         {
             CloseApp(false, analyser.OtherInfo, analyser);
         }
     }
 }
Exemplo n.º 2
0
 void CloseApp(bool isConnected, string closeString, InfoAnalyser analyser)
 {
     if (isConnected)
     {
         ShowInfo(isConnected, "已连接", closeString);
     }
     else
     {
         ShowInfo(isConnected, "连接失败", closeString);
         logWriter(analyser.RawInfo);
     }
     CloseApp();
 }