36 lines
845 B
C#
36 lines
845 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using WeifenLuo.WinFormsUI.Docking;
|
|
|
|
namespace Check.Main.UI
|
|
{
|
|
public partial class FrmLog : DockContent
|
|
{
|
|
public FrmLog()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
public void AddLog(string message)
|
|
{
|
|
if (txtLog.InvokeRequired)
|
|
{
|
|
txtLog.BeginInvoke(new Action(() => AddLog(message)));
|
|
return;
|
|
}
|
|
if (txtLog.Lines.Length > 500)
|
|
{
|
|
txtLog.Clear();
|
|
}
|
|
txtLog.AppendText(message + Environment.NewLine);
|
|
txtLog.ScrollToCaret();
|
|
}
|
|
}
|
|
}
|