コード例 #1
0
        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);
        }
コード例 #2
0
        private void ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            DeleteFlyout.Hide();
            int eventIndex = EventListView.SelectedIndex;

            EventsManager.RemoveEventByIndex(foldIndex, eventIndex);
        }
コード例 #3
0
ファイル: love.xaml.cs プロジェクト: jhhxll/LightDays
        private void ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            DeleteFlyout.Hide();
            int index = EventListView.SelectedIndex;

            EventsManager.loveEvents.RemoveAt(index);
            EventsManager.WriteLoveEventsData();
        }
コード例 #4
0
        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();
            }
        }
コード例 #5
0
        /// <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();
        }
コード例 #6
0
        /// <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();
        }
コード例 #7
0
        private void DeleteConfirmation_Click(object sender, RoutedEventArgs e)
        {
            RemoveIngrientItem();

            DeleteFlyout.Hide();
        }
コード例 #8
0
 // cancel delete flyout action
 private void CancelDelete_Click(object sender, RoutedEventArgs e)
 {
     DeleteFlyout.Hide();
 }
コード例 #9
0
        private void DeleteConfirmation_Click(object sender, RoutedEventArgs e)
        {
            DeleteCategory();

            DeleteFlyout.Hide();
        }
コード例 #10
0
 private void Delete_Click(object sender, RoutedEventArgs e)
 {
     ViewModel.DeleteCategory();
     DeleteFlyout.Hide();
 }
コード例 #11
0
 private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
 {
     ViewModel.DeleteItem();
     DeleteFlyout.Hide();
 }