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