Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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);
 }