Esempio n. 1
0
        private void Polled(List <ExchangeBalance> balances)
        {
            _historyManager.AddEntry(balances);

            _historyManager.Save();

            var balance = balances.Sum(b => b.Value);

            if (balance > AppSettings.Instance.BalanceHigh)
            {
                AppSettings.Instance.BalanceHigh = balance;

                AppSettings.Instance.Save();
            }
            else if (balance < AppSettings.Instance.BalanceLow)
            {
                AppSettings.Instance.BalanceLow = balance;

                AppSettings.Instance.Save();
            }

            _trayManager.BalanceChanged(balance);

            _trayManager.ConstructContextMenu(balances.Select(b => b.Currency).ToList());

            _formManager.NewData();

            UpdateExcel(balance);
        }