コード例 #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());
            }
        }