优化加入jit操作中的卡顿问题

This commit is contained in:
wule committed 2025-11-20 09:42:23 +08:00
1 parent d0ee274e2f
commit b23eb0e497
10 files changed
+1789 -784

No files matched your search

+27 -2
View File
@@ -47,6 +47,28 @@ namespace TemuKJD.UserComponent
}
}
private bool autoRowNumber = true;
/// <summary>
/// 边框颜色
/// </summary>
[Description("自动行号"), Category("UserProperty")]
public bool AutoRowNumber
{
get
{
return autoRowNumber;
}
set
{
if (autoRowNumber != value)
{
autoRowNumber = value;
this.Invalidate();
}
}
}
/// <summary>
/// 自动生成行号
/// </summary>
@@ -54,8 +76,11 @@ namespace TemuKJD.UserComponent
/// <param name="e"></param>
private void DataGridViewEx_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, RowHeadersWidth - 4, e.RowBounds.Height);
TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), RowHeadersDefaultCellStyle.Font, rectangle, Color.DarkGray, TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
if (AutoRowNumber)
{
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, RowHeadersWidth - 4, e.RowBounds.Height);
TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), RowHeadersDefaultCellStyle.Font, rectangle, Color.DarkGray, TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}
}
/// <summary>