private async void deleteBlock_Tap(object sender, System.Windows.Input.GestureEventArgs e) { try { await FileHandler.DeleteROMAsync(this.entry); this.NavigationService.GoBack(); } catch (System.IO.FileNotFoundException) { } }
private async Task DeleteListEntry(object sender, ListBox list) { ListBoxItem contextMenuListItem = list.ItemContainerGenerator.ContainerFromItem((sender as MenuItem).DataContext) as ListBoxItem; ROMDBEntry re = contextMenuListItem.DataContext as ROMDBEntry; try { await FileHandler.DeleteROMAsync(re); this.RefreshROMList(); } catch (System.IO.FileNotFoundException ex) { } }