private void WorkerEpayment_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (caep == null) { caep = new CheckAllEmployeesPayment((List<object>)e.Result); caep.MdiParent = this; caep.FormClosed += caep_FormClosed; caep.Show(); toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Employees payment Information Load Done"; } else { toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Employees payment Information Load Done"; caep.Activate(); } }
void caep_FormClosed(object sender, FormClosedEventArgs e) { caep = null; }