private void WorkerPayroll_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (casb == null) { casb = new CheckAllSalaryBonus((List<Payroll>)e.Result); casb.MdiParent = this; casb.FormClosed += casb_FormClosed; casb.Show(); toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Payroll Information Load Done"; } else { toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "All Payroll Information Load Done"; casb.Activate(); } }
void casb_FormClosed(object sender, FormClosedEventArgs e) { casb = null; }