//功能 : 更新client端的UI public void updateUI(string text, string type) { if (this.InvokeRequired) { updateUICallback updateUICallback = new updateUICallback(updateUI); this.Invoke(updateUICallback, text, type); } else { if (type.Equals("Monitor")) { Monitor.AppendText(text + "\n"); } if (type.Equals("List")) { List.Items.Clear(); foreach (Talkuser talkuser in userlist) { List.Items.Add(talkuser.Username); } } } }