示例#1
0
        public void CalculateAll()
        {
            _views.MainForm.adapterDocumentsBilling.Fill(_views.MainForm.datasetBilling.Documents);

            workerAll         = new BackgroundWorker();
            workerAll.DoWork += workerAll_DoWork;
            workerAll.WorkerReportsProgress = true;
            workerAll.ProgressChanged      += workerAll_ProgressChanged;
            workerAll.RunWorkerCompleted   += workerAll_RunWorkerCompleted;

            workerAll.RunWorkerAsync();

            progress = new FormGenerateSVMProgress();
            progress.ShowDialog();
        }
示例#2
0
        private void btnCalculate_Click(object sender, EventArgs e)
        {
            //Calculate for this filter and show progress bar
            if (listFilters.SelectedItems.Count > 0)
            {
                _views.MainForm.adapterDocumentsBilling.Fill(_views.MainForm.datasetBilling.Documents);

                worker = new BackgroundWorker();
                worker.WorkerReportsProgress = true;
                worker.DoWork             += worker_DoWork;
                worker.ProgressChanged    += worker_ProgressChanged;
                worker.RunWorkerCompleted += worker_RunWorkerCompleted;

                worker.RunWorkerAsync();

                progress = new FormGenerateSVMProgress();
                progress.ShowDialog();
            }
        }