Пример #1
0
        private void btnChange_Click(object sender, RoutedEventArgs e)
        {
            DialogAddTask d = new DialogAddTask(t);

            if (d.ShowDialog() == true)
            {
                DatabaseTask.UpdateTask(t);
                //repaint taskwindow
                EventRepaint(EventArgs.Empty);
            }
        }
Пример #2
0
        private void butAddTask_Click(object sender, RoutedEventArgs e)
        {
            Task          t = new Task();
            DialogAddTask d = new DialogAddTask(t);

            if (d.ShowDialog() == true)
            {
                //repaint all
                DatabaseTask.CreateNewTask(t.text, t.prio, Status.TODO, t.startdate, t.deadline, TaskFolder);
                Repaint();
            }
            else
            {
            }
        }
Пример #3
0
        private void panelLeft_Drop(object sender, DragEventArgs e)
        {
            base.OnDrop(e);

            // If the DataObject contains string data, extract it.
            if (e.Data.GetDataPresent("Task"))
            {
                Task task = (Task)e.Data.GetData("Task");
                task.status = Status.TODO;

                DialogAddTask an = new DialogAddTask(task);
                if (an.ShowDialog() == true)
                {
                    //repaint all
                    e.Handled = true;
                    Repaint();
                    DatabaseTask.UpdateTask(task);
                }
                else
                {
                }
            }
        }