Exemplo n.º 1
0
        public void SetList(ToDoList list)
        {
            ListenToList(false);

            this.list = list;

            ListenToList(true);

            Fill();
        }
Exemplo n.º 2
0
        void ok_Click(object sender, EventArgs e)
        {
            if (title.Text.Trim().Length == 0)
            {
                MessageBox.Show("Please enter a title for the list.");
                title.Select();
                return;
            }

            NewList = project.CreateToDoList(title.Text.Trim(), string.Empty, comboBox1.SelectedItem as Milestone);
            Close();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Move an item to a different list.
        /// </summary>
        /// <param name="item">The item to move.</param>
        /// <param name="list">The list that should receive the item.</param>
        public static void MoveItem(ToDoItem item, ToDoList list)
        {
            if (item.List == null)
                throw new ArgumentException("The item is not part of any list.");

            ToDoItem newItem = list.Add(item.Content);
            newItem.PersonID = item.PersonID;

            item.List.Delete(item);
        }