异步一

Winform

1 this.Invoke(new Action(() =>
2                         {
3 
4                         }));

Wpf

   this.Dispatcher.Invoke(DispatcherPriority.Normal,
                new Action(() =>
                {
                    //调用主线程UI的的代码  
                    ButtonOkClick(this.msg);
                }));

 

posted @ 2017-06-01 14:39  dyfisgod  阅读(113)  评论(0编辑  收藏  举报