private void _exchangeRateRetriever_ExchangeRateChanged(ExchangeRateItem eri) { if (InvokeRequired) { BeginInvoke((Action <ExchangeRateItem>)_exchangeRateRetriever_ExchangeRateChanged, eri); return; } Text = $"{WindowTitle}-{_exchangeRateRetriever.CurrencyFrom}{_exchangeRateRetriever.CurrencyTo}-{eri.New:N4}"; tbOutput.Text = eri.ToString(); tbOutput.BackColor = eri.New == eri.YestdayClose ? BackColor : eri.New > eri.YestdayClose ? Color.Red : Color.LightGreen; }
private bool Equals(ExchangeRateItem other) { return(UpdateTime.Equals(other.UpdateTime) && CurrencyFrom == other.CurrencyFrom && CurrencyTo == other.CurrencyTo && New == other.New && YestdayClose == other.YestdayClose && Open == other.Open && High == other.High && Low == other.Low && Desc == other.Desc); }