Exemplo n.º 1
0
        private void btnImportRawData_Click(object sender, EventArgs e)
        {
            if (backgroundWorker1.IsBusy != true)
            {
                // create a new instance of the alert form
                progressDlg = new frmProgress();
                progressDlg.StartPosition = FormStartPosition.CenterParent;

                // event handler for the Cancel button in AlertForm
                progressDlg.Canceled += new EventHandler <EventArgs>(buttonCancel_Click);
                progressDlg.Show(this);
                // Start the asynchronous operation.
                backgroundWorker1.RunWorkerAsync();
            }
        }
Exemplo n.º 2
0
        private void DumpTableToCsv(SQLiteConnection conn, string tblName)
        {
            if (backgroundWorker2.IsBusy != true)
            {
                // create a new instance of the alert form
                progressDlg = new frmProgress();
                progressDlg.StartPosition = FormStartPosition.CenterParent;

                // event handler for the Cancel button in AlertForm
                progressDlg.Canceled += new EventHandler <EventArgs>(buttonCancel_Click);
                progressDlg.Show(this);
                // Start the asynchronous operation.
                backgroundWorker2.RunWorkerAsync();
            }
        }