void ITXIMLoginUIEventExt.OnServerPwd2(ITXData pData, out string pbsEnterCode, out int pbCancel)
 {
     pbsEnterCode = string.Empty;
     pbCancel     = 1;
     DebugLog.Assert(false, "Server要求输入二级密码");
     TXLog.TXLog2("Login", "Server要求输入二级密码");
 }
 private void Enter_Click(object sender, RoutedEventArgs e)
 {
     this.LoginResult = false;
     if (e.Source == this.Enter)
     {
         if (this._IsLogging)
         {
             TXLog.TXLog3("Login", " Enter_Click 重复");
         }
         else
         {
             if (this.passwordHash == null)
             {
                 string str      = (this.accounts.SelectedIndex >= 0x0) ? (this.accounts.SelectedItem.ToString()) : this.accounts.Text;
                 string password = this.passwordBox.Password.Trim();
                 if ((str.Length == 0x0) || (password.Length == 0x0))
                 {
                     string messageBoxText = "帐号或者密码不能为空";
                     string caption        = "提示";
                     MessageBox.Show(messageBoxText, caption);
                     return;
                 }
                 this.passwordHash = CoreMessenger.CalculatePasswordHash(password);
                 this.passwordType = IMPwdType.IMPWD_HASHONE;
             }
             if (CoreMessenger.Instance.TM.IsValidAccount(this.accounts.Text))
             {
                 if (App.Messenger.Login(this.accounts.Text, this.passwordHash, this.passwordType, this.LoginStatus))
                 {
                     this._IsLogging = true;
                     this.ShowInputFrame(false);
                     e.Handled = true;
                 }
                 else
                 {
                     //Util_MessageBox.InvalidUinMsg(this, this.accounts.Text);
                 }
             }
             else
             {
                 string str5 = "请输入正确的QQ号码。";
                 string str6 = "提示";
                 MessageBox.Show(str5, str6);
                 this.accounts.Text = "";
                 this.passwordBox.Clear();
                 this.accounts.Focus();
             }
         }
     }
     else if (e.Source == this.btnCancel)
     {
         this._IsLogging = false;
         this.ShowInputFrame(true);
         App.Messenger.CancelLogin();
     }
 }
 public static void RefreshConversationPic(uint communityID, Guid picguid, bool IsPicReceiveSuccess, string info)
 {
     for (int i = 0; i < CommunitySessionWindows.Count; i++)
     {
         if (CommunitySessionWindows[i].FindIMSession(communityID) != null)
         {
             CommunitySessionWindows[i].OutputBox.OnImageTransferStatusChanged(picguid, IsPicReceiveSuccess, info);
         }
         else
         {
             TXLog.TXLogImage(string.Format("收到群图片 {0} {1} {2},但找不到对应的群 ", picguid, IsPicReceiveSuccess, info));
         }
     }
 }
 private void OnLogin(object sender, LoginEventArgs e)
 {
     if (e.Succeeded)
     {
         TXLog.TXLog3("Login", string.Format("登录成功回调 _IsLogging={0}", this._IsLogging));
         base.Opacity = 0.0;
         this.btnCancel.Visibility = Visibility.Hidden;
         if (Util_Buddy.GetCurrentBuddy() != null)
         {
             this.accountManager.SetAccountInfo(Util_Buddy.GetCurrentBuddy().Uin, this.LoginStatus);
         }
         this.InitPlugincenter();
         if (base.IsLoaded)
         {
             CoreMessenger.Instance.TM.EventProcessing(AsyncHandle_Type.AsyncHandle_AutoUpdateMgr, 0x1, null);
             this.LoginResult = true;
             base.Close();
         }
     }
     else
     {
         this.ShowInputFrame(true);
         LoginFailedEventArgs loginFailedEventArgs = e as LoginFailedEventArgs;
         if (loginFailedEventArgs != null)
         {
             if (loginFailedEventArgs.Code == LoginCallbackCode.IM_LOGINFAIL_CANCEL)
             {
                 TXLog.TXLog3("Login", "取消登录回调");
             }
             else
             {
                 string messageBoxText = this.MakeLoginMessage(loginFailedEventArgs);
                 string caption        = "登录失败";
                 MessageBox.Show(messageBoxText, caption);
                 if (((loginFailedEventArgs.Code == LoginCallbackCode.IM_LOGINFAIL_SERVER_REFUSE) || (loginFailedEventArgs.Code == LoginCallbackCode.IM_LOGINFAIL_PWD_EXPIRE1)) || (loginFailedEventArgs.Code == LoginCallbackCode.IM_LOGINFAIL_PWD_EXPIRE2))
                 {
                     this.passwordBox.Clear();
                     this.passwordBox.Focus();
                 }
                 else if (loginFailedEventArgs.Code == LoginCallbackCode.IM_LOGINFAIL_EXISTSAMEAPP)
                 {
                     this.accounts.Focus();
                 }
             }
         }
     }
     this._IsLogging = false;
 }
        public static void OnImageTransferStatusChanged(ImageTransferStatusChangedrEventArgs args)
        {
            IList <InstanceAnswerPro.Core.ImageStatus> statusList = args.StatusList;
            int count = statusList.Count;

            TXLog.TXLogImage("图片下载 返回,个数 = " + count);
            for (int i = 0; i < ContactSessionWindows.Count; i++)
            {
                if (ContactSessionWindows[i].FindIMSession(args.TargetUin) != null)
                {
                    for (int j = 0; j < count; j++)
                    {
                        //ContactSessionWindows[i].OutputBox.OnImageTransferStatusChanged(statusList[j]);
                    }
                    return;
                }
            }
        }
 void ITXIMLoginUIEventExt.OnMBVerifiedExInfo(ITXData pExData)
 {
     DebugLog.Assert(false, "密保返回附带信息");
     TXLog.TXLog2("Login", "密保返回附带信息");
 }
 void ITXIMLoginUIEventExt.OnGetEMBKPicFailed(out byte pbOptType)
 {
     pbOptType = 0;
     DebugLog.Assert(false, "密保图片图片拉取失败");
     TXLog.TXLog2("Login", "密保图片图片拉取失败");
 }
 void ITXIMLoginUIEventExt.OnEMBKPic(ITXBuffer pPicBuf)
 {
     DebugLog.Assert(false, "收到密保图片");
     TXLog.TXLog2("Login", "收到密保图片");
 }
 void ITXIMLoginUIEventExt.OnServerVerifyFailed(ITXData pData, out int pbRetry)
 {
     pbRetry = 0;
     DebugLog.Assert(false, "server验证失败");
     TXLog.TXLog2("Login", "server验证失败");
 }
 void ITXIMLoginUIEventExt.OnServerPwdGuard(ITXData pAskData, ITXData pReplyData, out byte pbOptType)
 {
     pbOptType = 0;
     DebugLog.Assert(false, "Server要求输入密保因子");
     TXLog.TXLog2("Login", "Server要求输入密保因子");
 }