private void barButtonItem_TinhTrang_ItemClick(object sender, ItemClickEventArgs e) { if (formTinhtrangPL == null) { formTinhtrangPL = new F_Main_TinhTrangPL(); formTinhtrangPL.MdiParent = this; formTinhtrangPL.FormClosed += new FormClosedEventHandler(formTinhtrangPL_FormClosed); formTinhtrangPL.Show(); } else { formTinhtrangPL.Activate(); } }
void formTinhtrangPL_FormClosed(object sender, FormClosedEventArgs e) { formTinhtrangPL = null; }