private void barButtonItem_DiaDiem_ItemClick(object sender, ItemClickEventArgs e) { if (formDSachDiaDiem == null) { formDSachDiaDiem = new F_Main_DSachDiaDiem(); formDSachDiaDiem.MdiParent = this; formDSachDiaDiem.FormClosed += new FormClosedEventHandler(formDSachDiaDiem_FormClosed); formDSachDiaDiem.Show(); } else { formDSachDiaDiem.Activate(); } }
void formDSachDiaDiem_FormClosed(object sender, FormClosedEventArgs e) { formDSachDiaDiem = null; }