private void CLB_TODO_MouseUp(object sender, MouseEventArgs e) { foreach (object i in CLB_TODO.Items) { todolist[CLB_TODO.Items.IndexOf(i)].is_done = CLB_TODO.GetItemChecked(CLB_TODO.Items.IndexOf(i)); } WriteTodo(todolist); }
private void flushTODOList() { CLB_TODO.Items.Clear(); foreach (TodoData todo in todolist) { CLB_TODO.Items.Add(todo.name); if (todo.is_done) { CLB_TODO.SetItemChecked(CLB_TODO.Items.Count - 1, true); } } WriteTodo(todolist); }