private async void refreshBalances() { var status = await TaskExecutor.AccountBalances(); foreach (var balance in status.Accounts) { if (balance.Currency == "USD") { lblUsd.Text = String.Format("USD: {0:N2}", balance.Balance); } else if (balance.Currency == "BTC") { lblBtc.Text = String.Format("BTC: {0:N8}", balance.Balance); } else if (balance.Currency == "ETH") { lblEth.Text = String.Format("ETH: {0:N8}", balance.Balance); } else if (balance.Currency == "LTC") { lblLtc.Text = String.Format("LTC: {0:N8}", balance.Balance); } else if (balance.Currency == "BCH") { lblBch.Text = String.Format("BCH: {0:N8}", balance.Balance); } } if (FirstRefresh) { this.Hide(); this.WindowState = FormWindowState.Minimized; notifyIcon1.Visible = true; FirstRefresh = false; } }
private async void refreshBalances() { var status = await TaskExecutor.AccountBalances(); foreach (var balance in status.Accounts) { if (balance.Currency == "USD") { lblUsd.Text = String.Format("USD: {0:N2}", balance.Balance); } else if (balance.Currency == "BTC") { lblBtc.Text = String.Format("BTC: {0:N8}", balance.Balance); } else if (balance.Currency == "ETH") { lblEth.Text = String.Format("ETH: {0:N8}", balance.Balance); } else if (balance.Currency == "LTC") { lblLtc.Text = String.Format("LTC: {0:N8}", balance.Balance); } } }