Little Registry Cleaner/Common Tools/TreeViewAdv/Tree/FixedRowHeightLayout.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace Common_Tools.TreeViewAdv.Tree
{
internal class FixedRowHeightLayout : IRowLayout
{
private TreeViewAdv _treeView;
public FixedRowHeightLayout(TreeViewAdv treeView, int rowHeight)
{
_treeView = treeView;
PreferredRowHeight = rowHeight;
}
private int _rowHeight;
public int PreferredRowHeight
{
get { return _rowHeight; }
set { _rowHeight = value; }
}
public Rectangle GetRowBounds(int rowNo)
{
return new Rectangle(0, rowNo * _rowHeight, 0, _rowHeight);
}
public int PageRowCount
{
get
{
return Math.Max((_treeView.DisplayRectangle.Height - _treeView.ColumnHeaderHeight) / _rowHeight, 0);
}
}
public int CurrentPageSize
{
get
{
return PageRowCount;
}
}
public int GetRowAt(Point point)
{
point = new Point(point.X, point.Y + (_treeView.FirstVisibleRow * _rowHeight) - _treeView.ColumnHeaderHeight);
return point.Y / _rowHeight;
}
public int GetFirstRow(int lastPageRow)
{
return Math.Max(0, lastPageRow - PageRowCount + 1);
}
public void ClearCache()
{
}
}
后面还有 1 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。