Esempio n. 1
0
        public void LoginAsync()
        {
            if ((string.IsNullOrEmpty(_loginNickName)) || (string.IsNullOrEmpty(_loginPassword)))
                OnLoginCompleted(new List<string> { Constants.ERROR_INVALID_CREDENTIALS }, null);

            Console.WriteLine("LoginService: Attempting to login async...");
            var url = string.Format(_usersUrl, _loginNickName, _loginPassword, Constants.WEB_SERVER_URL);

            var client = new WebClientProxy();
            client.OnHttpGetCompleted += _HttpGetCompleted;
            client.HttpGetAsync(url);
        }
Esempio n. 2
0
        public void GetCardsAsync()
        {
            if (!AppManager.Current.ConfirmNetworkIsAvailable())
                return;

            AppManager.Current.OnNetworkUsageStarted("Tarjetas");

            Console.WriteLine("CardsService: Attempting to get cards async...");
            var url = string.Format(_cardsUrl, _loginNickName, _loginPassword, Constants.WEB_SERVER_URL);

            var client = new WebClientProxy();
            client.OnHttpGetCompleted += _HttpGetCompleted;
            client.HttpGetAsync(url);
        }
Esempio n. 3
0
        public void GetCommunityStatsAsync()
        {
            if (!AppManager.Current.ConfirmNetworkIsAvailable())
                return;

            AppManager.Current.OnNetworkUsageStarted("Estadísticas Comunidad");

            Console.WriteLine("CommunityService: Attempting to get community data async...");
            var url = string.Format(_communityUrl, _loginNickName, _loginPassword, Constants.WEB_SERVER_URL);

            var client = new WebClientProxy();
            client.OnHttpGetCompleted += _HttpGetCompleted;
            client.HttpGetAsync(url);
        }