/// <summary> /// 将信息追加到服务端信息栏中 /// </summary> /// <param name="msgContent"></param> /// <param name="userName"></param> /// <param name="isRtf"></param> /// <param name="color"></param> public static void AppendMsgToServerChatList(CCWin.SkinControl.RtfRichTextBox serverChatRecords, MessageInfo messageInfo) { lock (obj) { //serverChatRecords.AppendTextAsRtf(string.Format("{0} {1}", messageInfo.fromId, DateTime.Now), new Font(fontFamliy, fontSize), color); serverChatRecords.AppendTextAsRtf(string.Format("{0}", messageInfo.dateTime), new Font(fontFamliy, fontSize), color); serverChatRecords.AppendTextAsRtf(Environment.NewLine); serverChatRecords.AppendText("[ " + messageInfo.msgType + " ]"); if (isRtf) { try { serverChatRecords.AppendRtf(messageInfo.content); } catch (Exception ex) { serverChatRecords.AppendText(messageInfo.content); } } else { serverChatRecords.AppendText(messageInfo.content); } serverChatRecords.AppendTextAsRtf(Environment.NewLine); serverChatRecords.AppendTextAsRtf(Environment.NewLine); serverChatRecords.ScrollToCaret(); } }
public FrmCapture(RtfRichTextBox rcTxt) { this.InitializeComponent(); this.RcTxt = rcTxt; base.FormBorderStyle = FormBorderStyle.None; base.Location = new System.Drawing.Point(0, 0); base.Size = new System.Drawing.Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); base.TopMost = true; base.ShowInTaskbar = false; this.m_MHook = new MouseHook(); base.FormClosing += delegate (object s, FormClosingEventArgs e) { this.m_MHook.UnLoadHook(); this.DelResource(); }; this.imgpb.MouseLeave += delegate (object s, EventArgs e) { this.Cursor = Cursors.Default; }; this.m_layer = new List<Bitmap>(); }