Beispiel #1
0
        private void 读取_Click(object sender, EventArgs e)
        {
            try
            {
                InitialBackGroundWorker();
                Control.CheckForIllegalCrossThreadCalls = false;
                bgWorker.DoWork += new DoWorkEventHandler(Getmytask);

                bgWorker.RunWorkerAsync();
                // 启动消息显示画面
                frmMessageShow = new frmMessageShow(clsShowMessage.MSG_001,
                                                    clsShowMessage.MSG_007,
                                                    clsConstant.Dialog_Status_Disable);
                frmMessageShow.ShowDialog();
                // 数据读取成功后在画面显示
                if (blnBackGroundWorkIsOK)
                {
                    // this.dataGridView.DataSource = null;
                    //this.dataGridView.AutoGenerateColumns = false;
                    //sortableCaseListResult = new SortableBindingList<clsAP_fuwuinfo>(CaseListResult);
                    //this.dataGridView.DataSource = sortableCaseListResult;
                    if (FilelistResult != null && FilelistResult.Count > 0)
                    {
                        listBox1.Items.Clear();

                        foreach (clsFileNanme_info item in FilelistResult)
                        {
                            this.listBox1.Items.Add(item.FilName);
                        }
                        this.tabControl1.SelectedIndex = 1;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            try
            {
                InitialBackGroundWorker();
                Control.CheckForIllegalCrossThreadCalls = false;
                bgWorker.DoWork += new DoWorkEventHandler(changePIC);

                bgWorker.RunWorkerAsync();
                // 启动消息显示画面
                frmMessageShow = new frmMessageShow(clsShowMessage.MSG_001,
                                                    clsShowMessage.MSG_007,
                                                    clsConstant.Dialog_Status_Disable);
                frmMessageShow.ShowDialog();
                // 数据读取成功后在画面显示
                if (blnBackGroundWorkIsOK)
                {
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }