public void AddPeerEmoji(Image image)//显示对方发送表情 { Bitmap Portrait = Tag.GetPortrait(); SendBox NewSend = new SendBox(image, 0, Portrait, this.Name); ChatPanel.Controls.Add(NewSend); ChatPanel.ScrollControlIntoView(NewSend); Tag.SetTime(NewSend.GetTime()); Tag.SetWords(NewSend.GetWords()); string temp = "[" + NewSend.GetTime() + "]" + Name + ":[表情]"; this.WordList.Add(temp); }
public void AddPeerText(string word, bool IsFile = false)//显示对方发送信息 { Bitmap Portrait = Tag.GetPortrait(); SendBox NewSend = new SendBox(word, 0, Portrait, this.Name); if (IsFile) { NewSend.IsFile = true; } ChatPanel.Controls.Add(NewSend); ChatPanel.ScrollControlIntoView(NewSend); Tag.SetTime(NewSend.GetTime()); Tag.SetWords(NewSend.GetWords()); string temp = "[" + NewSend.GetTime() + "]" + this.Name + ":" + word; this.WordList.Add(temp); }