获取当前线程
System.Threading.Thread.CurrentThread.ManagedThreadId
//判断是否创建句柄
if (this.IsHandleCreated)
{
MethodInvoker inf = new MethodInvoker(ShowDesktopInfo);
BeginInvoke(inf);
}
//更新UI
private void ShowDesktopInfo()
{
if (ServerData.UserInfo != null)
{
this.lb_Name.Text = ServerData.UserInfo.TrueName;
}
}