乔克斯 发表于 2018-4-11 01:59
多线程中操作主线程UI。要委托主线程操作UI。
/// <summary>
/// 重新绘制控件
/// </summary>
private void KeywordRankingControlUpdate() {
//验证是否再UI线程上
if (KeywordRankingDataGridView.InvokeRequired) {
KeywordRankingControlUpdateDelegate controlUpdate = new KeywordRankingControlUpdateDelegate(KeywordRankingControlUpdate);
Invoke(controlUpdate);
} else {
KeywordRankingDataGridView.Refresh();
}
}
欢迎光临 CSkin博客 (http://bbs.cskin.net/) | Powered by Discuz! X3.2 |