Exemplo n.º 1
0
 private void btnAddTodo_Click(object sender, EventArgs e)
 {
     AddToDoForm form = new AddToDoForm();
     form.Owner = this;
     var result =form.ShowDialog();
     if (result == DialogResult.OK) {
         RefreshToDoList();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        ///  双击【待办】打开详情
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void todoList_MouseDoubleClick(object sender, MouseEventArgs e)
        {

            var selectIndex = todoList.SelectedIndex;
            if (selectIndex >= 0)
            {
                var deadline = DateTime.Parse(toDoDataList[selectIndex].Split(new char[] { '₪' })[1].TrimStart('(').TrimEnd(')'));
                var model = TodoDao.Get(deadline);
                AddToDoForm form = new AddToDoForm(model);
                form.ShowDialog();
            }
        }