Source/AdvTree/Display/CellDisplay.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Rendering;
namespace DevComponents.AdvTree.Display
{
/// <summary>
/// Represents cell display class.
/// </summary>
internal class CellDisplay
{
public CellDisplay()
{
}
private static Office2007CheckBoxItemPainter _CheckBoxPainter;
public static Office2007CheckBoxItemPainter CheckBoxPainter
{
get { return _CheckBoxPainter; }
set { _CheckBoxPainter = value; }
}
public static Office2007CheckBoxColorTable ColorTable = null;
public static void PaintCell(NodeCellRendererEventArgs ci)
{
if(ci.Cell.CheckBoxVisible)
CellDisplay.PaintCellCheckBox(ci);
if(!ci.Cell.Images.LargestImageSize.IsEmpty)
CellDisplay.PaintCellImage(ci);
CellDisplay.PaintText(ci);
}
public static void PaintCellCheckBox(NodeCellRendererEventArgs ci)
{
if(!ci.Cell.CheckBoxVisible)
return;
Cell cell = ci.Cell;
Rectangle r = cell.CheckBoxBoundsRelative;
r.Offset(ci.CellOffset);
if (ci.CheckBoxImageChecked != null)
{
Image img = ci.CheckBoxImageChecked;
if (cell.CheckState == System.Windows.Forms.CheckState.Unchecked)
img = ci.CheckBoxImageUnChecked;
else if (cell.CheckState == System.Windows.Forms.CheckState.Indeterminate)
img = ci.CheckBoxImageIndeterminate;
if (img != null)
ci.Graphics.DrawImage(img, r);
}
else if (_CheckBoxPainter != null)
{
Office2007CheckBoxStateColorTable ct = GetCheckBoxStateColorTable(ci);
if (cell.CheckBoxStyle == eCheckBoxStyle.CheckBox)
{
_CheckBoxPainter.PaintCheckBox(ci.Graphics, r, ct, cell.CheckState);
}
后面还有 234 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。