private void BtnAddTask_Click(object sender, EventArgs e) { var formAddTask = new AddTaskForm { passData = new AddTaskForm.PassData(PassData), showMainForm = new AddTaskForm.ShowMainForm(Show) }; formAddTask.Show(); this.Hide(); }
private void EditTask(Task t) { var addTaskForm = new AddTaskForm(t) { passData = new AddTaskForm.PassData(PassData), showMainForm = new AddTaskForm.ShowMainForm(Show), Text = "Edit task" }; addTaskForm.Show(); this.Hide(); }