/// <summary> /// //设置程序运行中产生的消息并计入日志 /// </summary> /// <param name="msg">消息</param> protected void SetMSG(string msg) { ShowMSgDelegate showmsgDelegate = new ShowMSgDelegate(SetmsgDelegateTargetFun); if (txtBoxMSG.InvokeRequired) { txtBoxMSG.BeginInvoke(showmsgDelegate, msg); } else { if (txtBoxMSG.Text.Length > 1024 * 512) { txtBoxMSG.Text = string.Empty; } txtBoxMSG.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + ":" + msg + "\r\n"); } mu.WaitOne(); //SiXi.Logs.Log.WriteDebugLog(msg); mu.ReleaseMutex(); }
/// <summary> /// //设置程序运行中产生的消息并计入日志 /// </summary> /// <param name="msg">消息</param> protected void SetMSG(string msg) { ShowMSgDelegate showmsgDelegate = new ShowMSgDelegate(SetmsgDelegateTargetFun); if (txtBoxMSG.InvokeRequired) { txtBoxMSG.BeginInvoke(showmsgDelegate, msg); } else { if (txtBoxMSG.Text.Length > 1024 * 512) { txtBoxMSG.Text = string.Empty; } txtBoxMSG.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + ":" + msg + "\r\n"); } mu.WaitOne(); SiXi.Logs.Log.WriteDebugLog(msg); mu.ReleaseMutex(); }