//Получить все задачи одним списком public TaskSection GetAllItems() { TaskSection allSection = new TaskSection(); foreach (TaskSection section in this.sections) { foreach (TaskItem item in section.items) { if (!item.status) { allSection.items.Add(item); } } } return(allSection); }
//Добавить раздел public void AddSection(TaskSection newSection) { this.sections.Add(newSection); }