예제 #1
0
 public async Task ManualRefresh(CurrencyEnum selectedCurrency)
 {
     currencyInfos = CoinMarketDownloader.GetTop10(selectedCurrency).Result;
     NewFeed.Invoke(ProduceDataForListViewItems());
     if (CurrencyInfoFeed != null)
     {
         CurrencyInfoFeed.Invoke();
     }
     await fileSaver.SavaData(currencyInfos);
 }
예제 #2
0
        public void ChangeSelectedCurrency(CurrencyEnum selectedCurrency)
        {
            this.selectedCurrency = selectedCurrency;
            if ((DateTime.Now - ((CurrencyInfo)currencyInfos.FirstOrDefault()).LastTimeUpdated) >
                new TimeSpan(0, 0, 30))
            {
                if (CurrencyInfoFeed != null)
                {
                    CurrencyInfoFeed.Invoke();
                }

                NewFeed.Invoke(ProduceDataForListViewItems());
            }
        }