Ejemplo n.º 1
0
 public bool TryLoad()
 {
     try
     {
         // Find base currency
         var ri = new RegionInfo(CultureInfo.CurrentCulture.Name);
         _baseCurrency = ri.ISOCurrencySymbol;
     }
     catch (ArgumentException)
     {
         _baseCurrency = "USD";
     }
     _currencyRepo = new CurrencyRepository(_baseCurrency);
     return(true);
 }
Ejemplo n.º 2
0
        public bool TryLoad()
        {
            string baseCurrency;

            try
            {
                // Find base currency
                var ri = new RegionInfo(CultureInfo.CurrentCulture.Name);
                baseCurrency = ri.ISOCurrencySymbol;
            }
            catch (ArgumentException)
            {
                baseCurrency = "USD";
            }
            UserSettings.Put(BaseCurrencyId, baseCurrency);

            _currencyRepo = new CurrencyRepository();

            return(true);
        }
Ejemplo n.º 3
0
        public async Task <bool> TryLoad()
        {
            string baseCurrency;

            try
            {
                // Find base currency
                var ri = new RegionInfo(CultureInfo.CurrentCulture.Name);
                baseCurrency = ri.ISOCurrencySymbol;
            }
            catch (ArgumentException)
            {
                baseCurrency = "USD";
            }
            UserSettings.Put(BaseCurrencyId, baseCurrency);

            _currencyRepo = new CurrencyRepository();
            await _currencyRepo.LoadCurrenciesInitial().ConfigureAwait(false);

            IsLoaded = true;
            return(IsLoaded);
        }