private void MemberMaintenanceButton_Click(object sender, EventArgs e) { if (memberMaintain == null) { memberMaintain = new MemberMaintenanceForm(); memberMaintain.MdiParent = this; memberMaintain.Dock = DockStyle.Fill; memberMaintain.Show(); memberMaintain.FormClosed += MemberMaintain_FormClosed; } else { memberMaintain.Activate(); } }
private void MemberMaintain_FormClosed(object sender, FormClosedEventArgs e) { memberMaintain = null; }