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); }
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); }