private async void DeleteConfirmation_Click(object sender, RoutedEventArgs e) { if (!MasterViewList.SelectedItems.Any()) { return; } Analytics.TrackEvent("Document delete(s) confirmed."); var items = new List <object>(MasterViewList.SelectedItems); foreach (var item in items) { _store.Documents.Remove((DrxDocumentViewModel)item); } DeleteFlyout.Hide(); await Task.Run(async() => { foreach (var item in items) { await((DrxDocumentViewModel)item).Model.DeleteAsync(); } await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { ClearSelectedItems(); UpdateDocuments(); }); }).ConfigureAwait(false); }
private void ConfirmButton_Click(object sender, RoutedEventArgs e) { DeleteFlyout.Hide(); int eventIndex = EventListView.SelectedIndex; EventsManager.RemoveEventByIndex(foldIndex, eventIndex); }
private void ConfirmButton_Click(object sender, RoutedEventArgs e) { DeleteFlyout.Hide(); int index = EventListView.SelectedIndex; EventsManager.loveEvents.RemoveAt(index); EventsManager.WriteLoveEventsData(); }
private void ConfirmButton_Click(object sender, RoutedEventArgs e) { DeleteFlyout.Hide(); int index = CoverEventsManagerListView.SelectedIndex; CoverEventsManager.CoverEventsCollection.RemoveAt(index); CoverEventsManager.ResetCoverEventsHeader(index); CoverEventsManager.WriteCoverEventsCollectionData(); if (Tile.tileStatus) { Tile.UpdateTile(); } }
/// <summary> /// Confirm delete flyout /// </summary> private async void ConfirmDelete_Click(object sender, RoutedEventArgs e) { try { await Client.DeleteTaskList(_activeGuid); } catch (Exception ex) { if (ex.GetType() != typeof(FactoryOrchestratorConnectionException)) { ContentDialog failedDeleteDialog = new ContentDialog { Title = resourceLoader.GetString("FOXMLSaveFailed"), Content = $"{ex.Message}", CloseButtonText = resourceLoader.GetString("Ok") }; _ = await failedDeleteDialog.ShowAsync(); } } DeleteFlyout.Hide(); }
/// <summary> /// Confirm delete flyout /// </summary> private async void ConfirmDelete_Click(object sender, RoutedEventArgs e) { try { if (activeTaskIsNowBg) { BackgroundTasksCollection.Remove(activeTask); activeTaskIsNowBg = false; } else { TasksCollection.Remove(activeTask); } listEdited = true; if (TasksCollection.Count == 0) { TasksHeader.Visibility = Visibility.Collapsed; } } catch (Exception ex) { if (ex.GetType() != typeof(FactoryOrchestratorConnectionException)) { ContentDialog failedDeleteDialog = new ContentDialog { Title = resourceLoader.GetString("FOXMLSaveFailed"), Content = $"{ex.Message}", CloseButtonText = resourceLoader.GetString("Ok") }; _ = await failedDeleteDialog.ShowAsync(); } } DeleteFlyout.Hide(); }
private void DeleteConfirmation_Click(object sender, RoutedEventArgs e) { RemoveIngrientItem(); DeleteFlyout.Hide(); }
// cancel delete flyout action private void CancelDelete_Click(object sender, RoutedEventArgs e) { DeleteFlyout.Hide(); }
private void DeleteConfirmation_Click(object sender, RoutedEventArgs e) { DeleteCategory(); DeleteFlyout.Hide(); }
private void Delete_Click(object sender, RoutedEventArgs e) { ViewModel.DeleteCategory(); DeleteFlyout.Hide(); }
private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { ViewModel.DeleteItem(); DeleteFlyout.Hide(); }