private async void UpdateFragments(object sender, RoutedEventArgs e) { try { await FragmentsPriceProcessor.LoadData(); UserControl_Loaded(sender, e); } catch (System.Net.Http.HttpRequestException) { Status.Text = "Could not resolve hostname.\nCheck your internet connection, or poe.ninja servers may be down."; } }
private async void UserControl_Loaded(object sender, RoutedEventArgs e) { try { await FragmentsPriceProcessor.InitLoadAsync(); List <BreachStonePriceDiff> stones = FragmentsPriceProcessor.BreachstoneProfitCalc(); PriceList.ItemsSource = stones; Status.Text = $"Breachstone prices successfully loaded for {ApiHelper.currentLeague} league"; } catch (System.Net.Http.HttpRequestException) { Status.Text = "Could not resolve hostname.\nCheck your internet connection, or poe.ninja servers may be down."; } }