/// <summary> /// Load APi Info covid19 /// </summary> /// <returns></returns> private async Task LoadApiCovid19() { Progress <ProgressReport> progress = new Progress <ProgressReport>(); progress.ProgressChanged += ReportProgress; var response = await _apiService.GetDataCovid19("https://api.covid19api.com", "/summary", progress); _rootCovid = (RootCovid)response.Result; }
public MainWindow() { InitializeComponent(); _networkService = new NetworkService(); _apiService = new ApiService(); _dataService = new DataService(); _dialogService = new DialogService(); _rootCovid = new RootCovid(); Countries = new List <Country>(); Rates = new List <Rate>(); _mediaPlayer = new MediaPlayer(); Timer(1); }
/// <summary> /// Load Local Info covid19 /// </summary> /// <returns></returns> private async Task LoadLocalInfoCovid19() { _rootCovid = await _dataService.GetDataInfoCovid19Async(); }