private void add_task_Click(object sender, RoutedEventArgs e) { AddTask add = new AddTask(generateIdForNewTask()); add.ShowDialog(); if (add.genTask != null) { current_sprint.task_list.Add(add.genTask); TreeRefresh(); sbar_main_message.Text = "Task " + add.genTask.id + "-" + add.genTask.task_name + " added succesfully"; } }
private void task_edit_Click(object sender, RoutedEventArgs e) { AddTask edit = new AddTask(0, SelectedTask); edit.ShowDialog(); if (edit.DialogResult == true) { var idx = current_sprint.task_list.IndexOf(SelectedTask); current_sprint.task_list[idx] = edit.genTask; TreeRefresh(); } }
private void subAdd_Click(object sender, RoutedEventArgs e) { AddTask addsub = new AddTask(generateIdForNewTask(), SelectedTask); addsub.ShowDialog(); if (addsub.DialogResult == true) { Task TempTask = taskFinder(SelectedTask.id); TempTask.subtasks.Add(addsub.genTask.id); current_sprint.task_list.Add(addsub.genTask); //sbar_main_message.Text = "Subtask " + addsub.genTask.id + "-" + addsub.genTask.task_name + " for task " + TempTask.id + "-" + TempTask.task_name + " added successfully."; TreeRefresh(); } }