Source/CrumbBar/CrumbBarItemViewPainter.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using DevComponents.DotNetBar.Rendering;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace DevComponents.DotNetBar
{
internal class CrumbBarItemViewPainter: IOffice2007Painter
{
#region IOffice2007Painter
private Office2007ColorTable _ColorTable = null;
/// <summary>
/// Gets or sets color table used by renderer.
/// </summary>
public Office2007ColorTable ColorTable
{
get { return _ColorTable; }
set { _ColorTable = value; }
}
#endregion
#region Internal Implementation
public void Paint(ButtonItem item, ItemPaintArgs pa)
{
Paint(item, pa, _ColorTable.CrumbBarItemView);
}
public void Paint(ButtonItem item, ItemPaintArgs pa, CrumbBarItemViewColorTable itemColorTable)
{
Graphics g =pa.Graphics;
CrumbBarItemViewStateColorTable stateTable = itemColorTable.Default;
CrumbBarItemViewStateColorTable stateTable2 = null;
bool isPressed = false;
if (item.IsMouseDown || item.Expanded)
{
stateTable = itemColorTable.Pressed;
isPressed = true;
}
else if (item.IsMouseOverExpand)
{
stateTable = itemColorTable.MouseOverInactive;
stateTable2 = itemColorTable.MouseOver;
}
else if (item.IsMouseOver)
stateTable = itemColorTable.MouseOver;
Rectangle rect = item.DisplayRectangle;
rect.Width--;
rect.Height--;
Rectangle expandRect = item.GetTotalSubItemsRect();
if (!expandRect.IsEmpty)
{
expandRect.Offset(rect.Location);
expandRect.Width--;
expandRect.Height--;
}
后面还有 193 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。