Ejemplo n.º 1
0
        private async Task <bool> PerformLoginAsync(UserAccount account, bool isChecked)
        {
            var enable = false;

            if (isChecked)
            {
                var accountLogin = await ProxyUserAccount.LoginAsync(account);
                await BindCashAsync(accountLogin);

                enable = accountLogin != null;
            }

            Enable(enable);

            return(true);
        }
Ejemplo n.º 2
0
        public async Task <double> UpdateCashAsync(string userName)
        {
            if (!string.IsNullOrEmpty(userName))
            {
                var target = GetAccount(userName);
                if (target != null)
                {
                    var proxy = new ProxyUserAccount();
                    var cash  = await proxy.GetCashAsync(target);

                    target.Cash = cash;

                    return(cash);
                }
            }

            return(0);
        }