private void bt_dmLoaicong_ItemClick(object sender, ItemClickEventArgs e) { frmLoaicong frm = new frmLoaicong(); foreach (System.Windows.Forms.Form _mdi_child in this.MdiChildren) { if (frm.Name == _mdi_child.Name) { _mdi_child.Close(); } } frm.MdiParent = this; frm.Show(); }
private void navBarItem_Loaicong_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { frmLoaicong loaicong = new frmLoaicong(); foreach (System.Windows.Forms.Form _mdi_child in this.MdiChildren) { if (loaicong.Name == _mdi_child.Name) { _mdi_child.Close(); } } loaicong.MdiParent = this; loaicong.Show(); }