Exemple #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;
 }
Exemple #3
0
 private void Edit_Task_Click(object sender, RoutedEventArgs e)
 {
     if (new EditWindow(this).ShowDialog() == false)
     {
         UpdateListView();
         Edit_Task.IsEnabled = false;
         SelectedTask        = null;
     }
 }
Exemple #4
0
        private void AddTask_Click(object sender, RoutedEventArgs e)
        {
            ToDoListConstructWindow elem = new ToDoListConstructWindow(this);
            var task = new TaskTodo();

            if (elem.ShowDialog() == true)
            {
            }
        }
Exemple #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;
     }
 }
Exemple #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;
     }
 }
Exemple #7
0
 public void ChangeDateDue(TaskTodo task, DateTime new_Due_Date)
 {
     task.DueTo = new_Due_Date;
 }
Exemple #8
0
 public void Remove(TaskTodo task)
 {
     TaskTodo.Remove(task);
 }
 public void Remove(TaskTodo task)
 {
     ListOfTask.Remove(task);
 }
 //adding, removing and cleaning block
 public void Add(TaskTodo task)
 {
     ListOfTask.Add(task);
 }