/// <summary> /// Function triggered when the user clicked on the 'Done' button inside a task panel /// </summary> /// <param name="sender">The sender <see cref="object"/></param> /// <param name="e">The sender <see cref="RoutedEventArgs"/> events</param> private void TaskCompletedEventFromMainWindowHandler(object sender, RoutedEventArgs e) { TaskInfoArgs args = e as TaskInfoArgs; AccessDBManager.UpdateTaskInDB(args.TaskInfo); //Update from the DB _taskPanelViewer.SetTasks(AccessDBManager.FindTasksFromDB()); }
/// <summary> /// Function triggered when the 'Confirm' button is clicked on the <see cref="EditTaskControl"/> /// </summary> /// <param name="sender">The sender <see cref="object"/></param> /// <param name="e">The sender <see cref="RoutedEventArgs"/> events</param> private void EditTaskConfirmEventHandler(object sender, RoutedEventArgs e) { TaskInfoArgs args = e as TaskInfoArgs; AccessDBManager.UpdateTaskInDB(args.TaskInfo); //Update from the DB _taskPanelViewer.SetTasks(AccessDBManager.FindTasksFromDB()); AddTaskButton.Visibility = Visibility.Visible; MainContentArea.Content = _taskPanelViewer; }