private void btnAddMeeting_Click(object sender, EventArgs e) { if (meetingForm == null) { meetingForm = new AddMeetingToTasksForm(user, false, this); //childTask.MdiParent = this; meetingForm.StartPosition = FormStartPosition.CenterScreen; meetingForm.FormClosed += MeetingForm_FormClosed; meetingForm.ShowDialog(); } else { meetingForm.Activate(); } }
private void MeetingForm_FormClosed(object sender, FormClosedEventArgs e) { meetingForm.Dispose(); meetingForm = null; }