示例#1
0
        private void buttonStartSP_Click(object sender, EventArgs e)
        {
            if (backgroundWorkerPrepareTableSP.IsBusy != true)
            {
                TableUtil.RowCountForPrepareSP = TableUtil.GetRowCountForPrepareSP();
                TableUtil.RowCountPreparedSP   = 0;

                this.textBoxRowCount.Text         = TableUtil.RowCountForPrepareSP.ToString();
                this.textBoxPreparedRowCount.Text = TableUtil.RowCountPreparedSP.ToString();
                TableUtil.StartTime        = System.DateTime.Now;
                this.textBoxStartTime.Text = TableUtil.StartTime.ToString();
                this.textBoxStopTime.Text  = TableUtil.ExpectedStopTimeSP.ToString();

                backgroundWorkerPrepareTableSP.RunWorkerAsync();

                this.buttonStartSP.Enabled = false;
                this.buttonStopSP.Enabled  = true;

                this.buttonStart.Enabled = false;
                this.buttonStop.Enabled  = false;
            }
        }