コード例 #1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            TaskForm taskForm = new TaskForm(new Task("", DateTime.Today,
                                                      Task.STATUS_TYPES.PENDING, 0));

            taskForm.StartPosition = FormStartPosition.CenterParent;
            taskForm.ShowDialog(this);
            if (taskForm.DialogResult == DialogResult.OK)
            {
                AddTask(taskForm.TaskEntered);
            }
        }
コード例 #2
0
 private void objectListView1_DoubleClick(object sender, EventArgs e)
 {
     if (this.objectListView1.SelectedItems.Count == 1)
     {
         Task     nTask    = (Task)this.objectListView1.SelectedObject;
         TaskForm taskForm = new TaskForm(nTask);
         taskForm.StartPosition = FormStartPosition.CenterParent;
         taskForm.ShowDialog(this);
         this.objectListView1.RemoveObject(this.objectListView1.SelectedObject);
         AddTask(nTask);
     }
 }