Ejemplo n.º 1
0
        private bool saveInfo(SnsSyncRequest request, SnsSyncResponse response)
        {
            if ((request == null) || (response == null))
            {
                Log.e("NetSceneSnsSync", "invalid snsSyncReq or snsSyncResp");
                this.mSyncStatus = 2;
                return(false);
            }
            NetSceneNewSync.mBytesSyncKeyBuf = NetSceneNewInit.mergeKeyBuf(request.KeyBuf.Buffer.ToByteArray(), response.KeyBuf.Buffer.ToByteArray());
            SyncInfo info = new SyncInfo(NetSceneNewSync.mBytesSyncKeyBuf);

            AccountMgr.saveSyncInfoAsync(info, false);
            return(true);
        }
Ejemplo n.º 2
0
 public static void loginStartup()
 {
     if (hasValidAccount())
     {
         //CrashLogMgr.onLogin(curAccount.strUsrName);
         //StorageMgr.onLogin(curAccount.strUsrName);
         isLogin = true;
         //hasHeadImg = HeadImageMgr.exists(curAccount.strUsrName, true);
         SessionPackMgr.getAccount().setAuthInfo(curAccount.strUsrName, curAccount.strPwd, curAccount.strPwd2);
         if (isSessionkeyValid(curAccount.bytesSessionkey))
         {
             SessionPackMgr.setSessionKey(curAccount.bytesSessionkey);
             checkSessionKeyTimeout();
         }
         SessionPackMgr.getAccount().setUin((int)curAccount.nUin);
         mConstAccountInfo = string.Concat(new object[] { "User = "******", UIN =", curAccount.nUin, " ,Nick=", curAccount.strNickName });
         //FlowControl.initialize();
         NetSceneNewInit.onLoginHandler();
         NetSceneNewSync.onLoginHandler();
         //Deployment.get_Current().get_Dispatcher().BeginInvoke(() =>
         EventCenter.postEvent(EventConst.ON_ACCOUNT_LOGIN, curAccount.strUsrName, null);
         Log.d("AccountMgr", "#### loginStartup " + curAccount.strUsrName);
     }
 }