
winform 输出日志框信息
发布日期:2021-05-10 10:50:49
浏览次数:13
分类:精选文章
本文共 2503 字,大约阅读时间需要 8 分钟。
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"); } }
���������������������������������`CallbackInvokeDisplay` ��������������������������� cerebration��������������� `DebugDisplayStr` ���������`DebugDisplayStr` ��������������� `txtAll` ��������������������������������� `txtAll` ��������������� `TextBox` ��������������������� GUI ������������������������������������������������:
���������������
CallbackInvokeDisplay
��������������������������� cerebration��������������� string msg
������������������������ private delegate void CallbackInvokeDisplay(string msg); ``
���������������������
DebugDisplayStr
��������������������������������������� string strData
������������������������������������������������ txtAll
��������������������������������������������������� -
������
InvokeRequired
���txtAll.InvokeRequired
��������� boolean ��������������������������������������������������������������������� ������InvokeRequired
���true
��������������������������������������������������������������������� cerebration ��������������������������� -
���������������������
������InvokeRequired
���true
������������������������mydel
���CallbackInvokeDisplay
���������������������DebugDisplayStr
������������������������������������ ���������������txtAll.Invoke()
������������������������������������������������������
������������������������
������InvokeRequired
��� false
��������������������������������������������������� txtAll
������������������������ -
������������������
������txtAll.TextLength
������ 100000������������������������ 100,000 ���������������������txtAll.Text
������������������������ -
���������������������
���strData
appending ���txtAll
������������������������������������������\r\n
������������������������������������������
��������������������������������������������������������� GUI ������������������������������������������������������������ cerebration��������������������������������������������������������������������������������������������������� threading issue���
发表评论
最新留言
表示我来过!
[***.240.166.169]2025年04月23日 17时24分36秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
微盟实习
2021-05-10
HDU——3374 String Problem (最大最小表示法+循环节+kmp)
2021-05-10
文件读写(java)
2021-05-10
Markdown中Latex常见数学符号
2021-05-10
求1-n中x(0-9)的个数
2021-05-10
char与varchar的区别
2021-05-10
Java——Static class
2021-05-10
uni app 小程序中的引用的iconfont图标后预览不出页面的问题
2021-05-10
都说 TCP 是面向连接的,怎样才算是一个连接呢?
2021-05-10
Linux之shell脚本实现ssh登录报警
2021-05-10
《五、企业级SVN运维实战:SVN禁止删除和强制注释》
2021-05-10
《Kubernets下载篇:Centos7上安装指定版本的Kubernetes》
2021-05-10
Java原子引用
2021-05-10
docker实战练习02-tomcat安装
2021-05-10
SQL server 2016安装
2021-05-10
A + B Problem II大数A+B
2021-05-10
Excuses, Excuses! map的应用
2021-05-10
搭建nfs服务器练习
2021-05-10
Recent plan(线上交流课——(二))
2021-05-10