Beispiel #1
0
        public void ShowRemoveNoteDialogButton_Click(object sender, RoutedEventArgs e)
        {
            string noteId = (string)((Button)sender).Tag;

            RemoveItemModal modalWindow = new RemoveItemModal();

            modalWindow.HorizontalAlignment = HorizontalAlignment.Center;
            modalWindow.VerticalAlignment   = VerticalAlignment.Center;
            modalWindow.Owner = MainWindow.GetWindow(this);
            modalWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            modalWindow.ShowDialog();

            if (modalWindow.Confirmed)
            {
                RemoveNote(noteId);
            }
        }
Beispiel #2
0
        private void ShowRemoveCurrentDayAcctivityDialogButton_Click(object sender, RoutedEventArgs e)
        {
            RemoveItemModal modalWindow = new RemoveItemModal();

            modalWindow.HorizontalAlignment = HorizontalAlignment.Center;
            modalWindow.VerticalAlignment   = VerticalAlignment.Center;
            modalWindow.Owner = MainWindow.GetWindow(this);
            modalWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            modalWindow.ShowDialog();

            if (modalWindow.Confirmed)
            {
                string activityId = (string)((Button)sender).Tag;
                string dayId      = ((DayPlan)DaysList.SelectedItem).Id;
                dayPlansDao.RemoveDayPlanActivity(dayId, activityId);
            }
        }