static public void AddTemp() { taskList.Add(TempTask); InsertionSort(); AccessXML xml = new AccessXML(); xml.Save(taskList); }
public static void Init() { taskList = new List<Task>(); SelectedDay = DateTime.Today; SelectedMonth = DateTime.Today; AccessXML xml = new AccessXML(); taskList = xml.Load(); DummyValues(); }
public static void Remove(Task task) { try { for (int x = 0; x < taskList.Count; x++) if (taskList[x].ID == task.ID) { taskList.RemoveAt(x); AccessXML xml = new AccessXML(); xml.Save(taskList); break; } } catch { } }
static public void EditTemp() { if (SelectedPos != -1) taskList[SelectedPos] = TempTask; else return; SelectedPos = -1; TempTask = new Task(); InsertionSort(); AccessXML xml = new AccessXML(); xml.Save(taskList); }