Ignore:
Timestamp:
Aug 8, 2011, 6:57:56 PM (13 years ago)
Author:
bayral
Message:

Async image thumbail retriving

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PiwigoLib/PiwigoLib/Service/PwgSessionService.cs

    r11911 r11922  
    4444                    {
    4545                        ConvertProxyResponseToDTO(response, ref PwgSession);
    46                         PwgSession.IsConnected = true;
    4746                    }
    4847                } catch (PwgProxyException ex)
     
    6463        {
    6564            PwgSession = null;
     65            Boolean isConnected = false;
    6666            try
    6767            {
    6868                PwgSessionProxyResponse response = PwgSessionProxy.pwg_session_login(UserName, Password);
    6969
    70                 if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok )
     70                if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok)
    7171                {
     72
    7273                    if (response.Erreur != null)
    7374                    {
    74                         throw new PwgServiceException("Login, the server has return the error.", 
    75                             response.Erreur.Code, 
     75                        throw new PwgServiceException("Login, the server has return the error.",
     76                            response.Erreur.Code,
    7677                            response.Erreur.Message);
    7778                    }
     
    8182                    }
    8283                }
     84                else
     85                {
     86                    isConnected = true;
     87                }
    8388            }
    8489            catch (PwgProxyException ex)
     
    8792            }
    8893
    89             return GetPwgSession();
     94            PwgSession sess= GetPwgSession();
     95            sess.IsConnected = isConnected;
     96            return sess;
    9097        }
    9198
     
    93100        {
    94101            PwgSession = null;
     102            Boolean isConnected = false;
    95103            try
    96104            {
     
    116124            }
    117125
    118             return GetPwgSession();
     126            PwgSession sess = GetPwgSession();
     127            sess.IsConnected = isConnected;
     128            return sess;
    119129        }
    120130        /// <summary>
Note: See TracChangeset for help on using the changeset viewer.