Beispiel #1
0
 //List Controller
 public void Add(TaskTodo task)
 {
     TaskTodo.Add(task);
     if (!History.Contains(task))
     {
         History.Add(task);
     }
 }
 public EditWindow(MainWindow init)
 {
     InitializeComponent();
     initial = init;
     elemGen = initial.SelectedTask;
     MainPanel.DataContext = elemGen;
     Dateinfo.SelectedDate = elemGen.DueTo;
 }
Beispiel #3
0
 private void Edit_Task_Click(object sender, RoutedEventArgs e)
 {
     if (new EditWindow(this).ShowDialog() == false)
     {
         UpdateListView();
         Edit_Task.IsEnabled = false;
         SelectedTask        = null;
     }
 }
Beispiel #4
0
        private void AddTask_Click(object sender, RoutedEventArgs e)
        {
            ToDoListConstructWindow elem = new ToDoListConstructWindow(this);
            var task = new TaskTodo();

            if (elem.ShowDialog() == true)
            {
            }
        }
Beispiel #5
0
 private void Delete_Task_Click(object sender, RoutedEventArgs e)
 {
     if (SelectedTask != null)
     {
         GeneralListFromDataBase.Remove(SelectedTask);
         SelectedTask = null;
         UpdateListView();
         Delete_Task.IsEnabled = false;
         Edit_Task.IsEnabled   = false;
     }
 }
Beispiel #6
0
 private void elem_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (SelectedTask == null)
     {
         var temp = sender as ListView;
         SelectedTask          = temp.SelectedItem as TaskTodo;
         Edit_Task.IsEnabled   = true;
         Delete_Task.IsEnabled = true;
     }
     else
     {
         var temp = sender as ListView;
         SelectedTask = temp.SelectedItem as TaskTodo;
     }
 }
Beispiel #7
0
 public void ChangeDateDue(TaskTodo task, DateTime new_Due_Date)
 {
     task.DueTo = new_Due_Date;
 }
Beispiel #8
0
 public void Remove(TaskTodo task)
 {
     TaskTodo.Remove(task);
 }
Beispiel #9
0
 public void Remove(TaskTodo task)
 {
     ListOfTask.Remove(task);
 }
Beispiel #10
0
 //adding, removing and cleaning block
 public void Add(TaskTodo task)
 {
     ListOfTask.Add(task);
 }