Example #1
0
        private void Initialize()
        {
            string baseCurrencyTicker = Properties.Settings.Default.BaseCurrency;

            baseCurrencyTicker = baseCurrencyTicker.IsNullOrWhiteSpace() ? _defaultBaseTicker : baseCurrencyTicker;

            BaseCurrency = _currencyManager.GetCurrencyByTicker(baseCurrencyTicker);

            var selectedCurrencies = Properties.Settings.Default.Currencies;

            selectedCurrencies = selectedCurrencies.IsNullOrWhiteSpace() ?
                                 _defaultSelectedCurrencies : selectedCurrencies;

            var currenciesTickers = selectedCurrencies.Split(',');

            _selectedCurrencies = new List <Currency>();
            foreach (var ticker in currenciesTickers)
            {
                _selectedCurrencies.Add(_currencyManager.GetCurrencyByTicker(ticker));
            }
        }