internal void LoadFromFile(string fileName) { if (!File.Exists(fileName)) { return; } XmlDocument doc = new XmlDocument(); doc.Load(fileName); XmlElement xmlTasks = doc.DocumentElement["Tasks"]; tasks.Clear(); foreach (XmlElement xmlTask in xmlTasks.ChildNodes) { try { TaskTodo task = new TaskTodo(xmlTask); tasks.Add(task); } catch { } } }
public void Delete(TaskTodo task) { tasks.Remove(task); }
public void Add(TaskTodo task) { tasks.Add(task); }