void cat_FormClosed(object sender, FormClosedEventArgs e) { cat = null; }
private void WorkerTraining_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (cat == null) { cat = new CheckAllTraining((List<Training>)e.Result); cat.MdiParent = this; cat.FormClosed += cat_FormClosed; cat.Show(); toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Training Information Load Done"; } else { toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Training Information Load Done"; cat.Activate(); } }