private async void DetailItem(ItemSearchListVO item) { if (item != null) { await PopupNavigation.Instance.PushAsync(new CityGraphicsDetail(AtualState, item)); } }
private void LoadData(ItemSearchListVO item) { lblCountryName.Text = item.Name; lblConfirmedToday.Text = item.ConfirmedToday; lblDeathsToday.Text = item.DeathsToday; LoadDataCountry(item); }
private async void LoadDataCity(States state, ItemSearchListVO item) { aciLoading.IsRunning = true; aciLoading.IsVisible = true; stlGeral.IsVisible = false; try { var service = new CasesBrasilService(); var cases = await service.GetCasesTimeLineFromCity(state, item.IBGE); if (cases != null) { var timeline = (from line in cases.results where line.date >= DateTime.Now.AddDays(-16) && line.date < DateTime.Now.Date orderby line.date ascending select line).ToList(); LoadChartCasesAccumulated(timeline); LoadChartDeathsAccumulated(timeline); LoadChartNewCases(timeline); LoadChartNewDeaths(timeline); } } catch (Exception ex) { UserDialogs.Instance.Toast(ex.Message, TimeSpan.FromSeconds(5)); } finally { aciLoading.IsRunning = false; aciLoading.IsVisible = false; stlGeral.IsVisible = true; } }
private async void DetailItem(ItemSearchListVO item) { if (item != null) { var states = StatesOfBrazil.getStatesOfBrazil(); var stade = states.Where(F => F.Name == item.Name).FirstOrDefault(); if (stade != null) { var pairs = new NavigationParameters(); pairs.Add("UF", stade.UF); pairs.Add("State", stade.Name); await NavigationService.NavigateAsync("CityCasesList", pairs, animated : true); } else { Dialog.Toast("Nenhum estado selecioando!", TimeSpan.FromSeconds(5)); } } }
private async void LoadDataCountry(ItemSearchListVO item) { aciLoading.IsRunning = true; aciLoading.IsVisible = true; stlGeral.IsVisible = false; try { var service = new CasesWorldService(); var cases = await service.GetCasesFromCountry(item.Code); if (cases.data.timeline != null && cases.data.timeline.Count > 0) { var timeline = (from line in cases.data.timeline where line.date >= DateTime.Now.AddDays(-15) //&& line.date < DateTime.Now.Date orderby line.date ascending select line).ToList(); if (timeline != null && timeline.Count > 0) { LoadChartCasesAccumulated(timeline); LoadChartDeathsAccumulated(timeline); LoadChartNewCases(timeline); LoadChartNewDeaths(timeline); } } } catch (Exception ex) { UserDialogs.Instance.Toast(ex.Message, TimeSpan.FromSeconds(5)); } finally { aciLoading.IsRunning = false; aciLoading.IsVisible = false; stlGeral.IsVisible = true; } }
private void LoadData(States state, ItemSearchListVO item) { lblCityName.Text = item.Name; LoadDataCity(state, item); }
public CityGraphicsDetail(States state, ItemSearchListVO item) { InitializeComponent(); LoadData(state, item); }
public CountryGraphicsDetail(ItemSearchListVO item) { InitializeComponent(); LoadData(item); }