Exemple #1
0
 /// <summary>
 /// Handle a login failure. The login result code and string are set,
 /// the workspace is set dirty and the state machine is notified.
 /// </summary>
 private void HandleLoginFailure(KwsLoginResult res, Exception ex)
 {
     m_ks.LoginResult       = res;
     m_ks.LoginResultString = ex.Message;
     m_kws.OnStateChange(WmStateChange.Permanent);
     m_kws.Sm.HandleLoginFailure(ex);
 }
        /// <summary>
        /// Called on successful login.
        /// </summary>
        private void HandleConnectKwsSuccess(KwsConnectRes r)
        {
            // Update our credentials and login information if needed.
            if (LoginResult != KwsLoginResult.Accepted ||
                m_kws.CoreData.Credentials.UserID != r.UserID ||
                m_kws.CoreData.Credentials.EmailID != r.EmailID ||
                m_kws.CoreData.Credentials.SecureFlag != r.SecureFlag ||
                m_kws.CoreData.Credentials.KwmoAddress != r.KwmoAddress)
            {
                LoginResult = KwsLoginResult.Accepted;
                LoginResultString = "login successful";
                m_kws.CoreData.Credentials.UserID = r.UserID;
                m_kws.CoreData.Credentials.EmailID = r.EmailID;
                m_kws.CoreData.Credentials.SecureFlag = r.SecureFlag;
                m_kws.CoreData.Credentials.KwmoAddress = r.KwmoAddress;
                m_kws.SetDirty();
            }

            // Remember the latest event ID available on the KAS.
            m_kws.KAnpState.LoginLatestEventId = r.LoginLatestEventID;

            // Tell the state machine.
            m_kws.Sm.HandleLoginSuccess();
        }
 /// <summary>
 /// Handle a login failure. The login result code and string are set,
 /// the workspace is set dirty and the state machine is notified.
 /// </summary>
 private void HandleLoginFailure(KwsLoginResult res, String resString)
 {
     LoginResult = res;
     LoginResultString = resString;
     m_kws.SetDirty();
     m_kws.Sm.HandleLoginFailure();
 }
Exemple #4
0
 /// <summary>
 /// Handle a login failure. The login result code and string are set,
 /// the workspace is set dirty and the state machine is notified.
 /// </summary>
 private void HandleLoginFailure(KwsLoginResult res, Exception ex)
 {
     m_ks.LoginResult = res;
     m_ks.LoginResultString = ex.Message;
     m_kws.OnStateChange(WmStateChange.Permanent);
     m_kws.Sm.HandleLoginFailure(ex);
 }