예제 #1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (var addForm = new AddTaskGUI(this))
     {
         addForm.ShowDialog();
     }
 }
예제 #2
0
        void listBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var listBox = (ListBox)sender;
            var index   = listBox.IndexFromPoint(e.X, e.Y);
            var task    = (Task)listBox.Items[index];

            if (index != -1)
            {
                using (var addForm = new AddTaskGUI(this))
                {
                    addForm.ShowDetailTask(task);
                    addForm.ShowDialog();
                    addForm.Dispose();
                }
            }
        }