Exemplo n.º 1
0
        /// <summary>
        /// Function triggered when the 'Trash' icon on the panel is clicked
        /// </summary>
        /// <param name="sender">The sender <see cref="object"/></param>
        /// <param name="e">The sender <see cref="RoutedEventArgs"/> events</param>
        private void TaskDeleteEventFromMainWindowHandler(object sender, RoutedEventArgs e)
        {
            TaskInfoArgs args = e as TaskInfoArgs;

            _deletionTaskControl     = new DeletionTaskControl(args.TaskInfo);
            AddTaskButton.Visibility = Visibility.Hidden;
            MainContentArea.Content  = _deletionTaskControl;
        }
Exemplo n.º 2
0
        /// <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());
        }
Exemplo n.º 3
0
        /// <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;
        }
Exemplo n.º 4
0
        /// <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 TaskCompletedEventFromPanelHandler(object sender, RoutedEventArgs e)
        {
            TaskInfoArgs args = e as TaskInfoArgs;

            RaiseEvent(new TaskInfoArgs(TaskPanelViewer.TaskCompletedEventFromPanelViewer, args.TaskInfo));
        }