private delegate void CallbackInvokeDisplay(string msg);
public void DebugDisplayStr(string strData)
{
if (txtAll.InvokeRequired)
{
CallbackInvokeDisplay mydel = new CallbackInvokeDisplay(DebugDisplayStr);
txtAll.Invoke(mydel, new object[] { strData });
}
else
{
if (txtAll.TextLength > 100000)
{
txtAll.Text = "";
}
txtAll.AppendText(strData);
txtAll.AppendText("\r\n");
}
}