private void InitAsync() { Task.Factory.StartNew(() => { this.TokenExpired = !InitHelper.InitWidthLogin(); isInit = true; this.Invoke(new Action(() => { chatListBox1.Items.Clear(); })); if (!this.TokenExpired) { Task.Factory.StartNew(() => { InitHelper.GetContactList(); this.BeginInvoke(new Action(() => { label1.Text = InitHelper.WebWeixinInit.User.NickName; label3.Text = InitHelper.WebWeixinInit.User.Signature; })); this.SetImageAsync(pictureBox1, InitHelper.WebWeixinInit.User.HeadImgUrl); this.ShowSessionList(); this.ShowContactList(); Loaded(); }); } }); }