private async void LoadCharacters() { Characters = await WesterosManager.GetCharactersAsync(); Characters = Characters.FindAll(c => c.Name != ""); // Replace all empty Culture Characters .Where(x => x.Culture == "") .ToList() .ForEach(x => { x.Culture = "Unidentified"; }); // Replace all empty Born Characters .Where(x => x.Born == "") .ToList() .ForEach(x => { x.Born = "Unmarked"; }); // Sort list Characters = Characters.OrderBy(x => x.Name).ToList(); lvwCharacters.ItemsSource = Characters; CharacterDetail.ListCharacters = Characters; ShowContent(); }
private async Task GetHouses() { if (ListHouses != null) { ListHouses = await WesterosManager.GetHousesAsync(); } }
private async void GetHouses() { GetCharacters(); Houses = await WesterosManager.GetHousesAsync(); lvwHouses.ItemsSource = Houses; }
private void SrchBar_SearchTextChanged(object sender, EventArgs e) { if (srchBar.Text != string.Empty) { lvwCharacters.ItemsSource = WesterosManager.FilterListCharactersName(Characters, srchBar.Text); } else { lvwCharacters.ItemsSource = Characters; } }
private async void TestGet() { Characters = await WesterosManager.GetCharactersAsync(); }
private async void LoadBooks() { Books = await WesterosManager.GetBooksAsync(); lvwBooks.ItemsSource = Books; }