Ejemplo n.º 1
0
        private void BAbackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BAarg arg = e.Argument as BAarg;

            Thread.Sleep(1000);
            arg.DoneTS = (DateTime)queriesTableAdapter.BA_DRON();
            e.Result   = arg;
        }
Ejemplo n.º 2
0
        private void BAbackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            BAarg arg = e.Result as BAarg;

            BAlistBoxControl.Items.Insert(0, arg.DoneTS.ToString());
            if (BAlistBoxControl.Items.Count > 100)
            {
                BAlistBoxControl.Items.RemoveAt(100);
            }
        }