其他分享
首页 > 其他分享> > 线程控件异步赋值

线程控件异步赋值

作者:互联网

//gcInterface为控件名称
if (gcInterface.InvokeRequired)
                    {
                        gcInterface.BeginInvoke((MethodInvoker)delegate
                        {
                            dtConfig.Rows[index]["count"] = count;
                            dtConfig.Rows[index]["time"] = costTime;
                            dtConfig.Rows[index]["flag"] = flag;
                            dtConfig.Rows[index]["last_finish_time"] = finishTime;
                            dtConfig.Rows[index]["exp_msg"] = expMsg;
                        });
                    }
                    else
                    {
                        dtConfig.Rows[index]["count"] = count;
                        dtConfig.Rows[index]["time"] = costTime;
                        dtConfig.Rows[index]["flag"] = flag;
                        dtConfig.Rows[index]["last_finish_time"] = finishTime;
                        dtConfig.Rows[index]["exp_msg"] = expMsg;
                    }

 

标签:count,异步,Rows,程控,index,dtConfig,flag,time,赋值
来源: https://www.cnblogs.com/yuanshuo/p/14940842.html