void cap_FormClosed(object sender, FormClosedEventArgs e) { cap = null; }
private void WorkerPerformance_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (cap == null) { cap = new CheckAllPerformance((List<Performance>)e.Result); cap.MdiParent = this; cap.FormClosed += cap_FormClosed; cap.Show(); toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Performance Information Load Done"; } else { toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Performance Information Load Done"; cap.Activate(); } }