private void btnMatch_Click(object sender, EventArgs e) { if (validate()) { return; } Input objInput = new Input(); objInput.MentorPath = txtMentorPath.Text.Trim(); objInput.MenteePath = txtMenteePath.Text.Trim(); objInput.MentorNameCol = txtMentorName.Text.Trim(); objInput.MentorDeptCol = txtMentorDept.Text.Trim(); objInput.MentorContactCol = txtMentorContact.Text.Trim(); objInput.MentorEmailCol = txtMentorEmailID.Text.Trim(); objInput.MenteeNameCol = txtMenteeName.Text.Trim(); objInput.MenteeDeptCol = txtMenteeDept.Text.Trim(); objInput.MenteeContactCol = txtMenteeContact.Text.Trim(); objInput.MenteeEmailCol = txtMenteeEmail.Text.Trim(); Matching objMatching = new Matching(objInput); if (_objMatch == null) { _objMatch = new frmMatchResults(objMatching.FinalList); _objMatch.FormClosing += _objMatch_FormClosing; _objMatch.Show(this); } else { _objMatch.BringToFront(); } }
private void _objMatch_FormClosing(object sender, FormClosingEventArgs e) { _objMatch = null; }