private async void BtnListAll_Click(object sender, RoutedEventArgs e) { try { if (LvAll.DataContext != null) { return; } LvAll.DataContext = await AdminInterface.GetEntitiesAsync(); } catch (Exception ex) { popup = ConfigurePopup.Configure(popup, ex.Message, BtnListAll, PlacementMode.Bottom); popup.IsOpen = true; } }
public async Task <List <PictureInfo> > GetAllPictures(IAdminInterface <Picture> aip) { var pics = await aip.GetEntitiesAsync(); return(await Task.Run(() => { List <PictureInfo> pictures = new List <PictureInfo>(); foreach (var pic in pics) { var img = GetBitmap(pic.Picture1); if (img != null) { var reference = pic.Picture1; pictures.Add(new PictureInfo() { PictureSource = img, PictureReference = reference, Id = pic.Id }); } } return pictures; })); }
private async void RefreshList() { var pictures = await AdminInterface.GetEntitiesAsync(); LvAll = ListViewHelper.RefreshList(LvAll, pictures); }
private async void LoadCountries() { CB.DataContext = await AdminInterfaceCountry.GetEntitiesAsync(); }