public ChooseTaskForm(List <Task> defaultTasks, NewTaskForm parentForm)
 {
     this.defaultTasks = defaultTasks;
     this.parentForm   = parentForm;
     InitializeComponent();
     populateData();
 }
        private void taskToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewTaskForm ntf = new NewTaskForm(selectedUser, this, defaultTasks);

            ntf.mainForm = this;
            ntf.Show();
        }
        private void editTaskForm()
        {
            if (selectedUser != null && selectedTask != null)
            {
                NewTaskForm ntf = new NewTaskForm(selectedUser, ref selectedTask, this);
                ntf.Show();
            }
            else
            {
                MessageBox.Show(this, "You didn't choose any task.");
            }

            selectedTask = null;
        }