Пример #1
0
 /*
  * Opens the add subtask form
  */
 private void btnAddSubtask_Click(object sender, EventArgs e)
 {
     if (taskTreeView.SelectedNode == null)
     {
         MessageBox.Show("Please select a task from the Task List.");
     }
     else if (subtaskForm == null)
     {
         //MessageBox.Show(this.getSelectedNodeTaskID().ToString());
         Models.Task tag = (Models.Task)taskTreeView.SelectedNode.Tag;
         //MessageBox.Show(tag.taskID.ToString());
         subtaskForm = new AddUpdateChildTaskForm(user, false, this, null);
         //childTask.MdiParent = this;
         subtaskForm.StartPosition = FormStartPosition.CenterScreen;
         subtaskForm.FormClosed   += SubtaskForm_FormClosed;
         subtaskForm.ShowDialog();
     }
     else
     {
         subtaskForm.Activate();
     }
 }
Пример #2
0
        private void btnAddNewSubTask_Click(object sender, EventArgs e)
        {
            AddUpdateChildTaskForm addUpdateChildTaskForm = new AddUpdateChildTaskForm(user, false, null, this);

            addUpdateChildTaskForm.ShowDialog();
        }