Source/AdvTree/Display/NodeSystemRenderer.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Rendering;
namespace DevComponents.AdvTree.Display
{
/// <summary>
/// Represents default system node and cell renderer.
/// </summary>
public class NodeSystemRenderer:TreeRenderer
{
#region Private Variables
private NodeExpandEllipseDisplay m_NodeExpandEllipseDisplay=new NodeExpandEllipseDisplay();
private NodeExpandRectDisplay m_NodeExpandRectDisplay=new NodeExpandRectDisplay();
private NodeExpandTriangleDisplay m_NodeExpandTriangleDisplay = new NodeExpandTriangleDisplay();
private NodeExpandImageDisplay m_NodeExpandImageDisplay=new NodeExpandImageDisplay();
//private NodeCommandDisplay m_NodeCommandDisplay=new NodeCommandDisplay();
private ElementStyleDisplayInfo m_ElementStyleDisplayInfo=new ElementStyleDisplayInfo();
private NodeSelectionDisplay m_SelectionDisplay=new NodeSelectionDisplay();
private LineConnectorDisplay m_LineConnectorDisplay=null;
private DragDropMarkerDisplay m_DragDropMarkerDisplay = new DragDropMarkerDisplay();
private ColumnHeaderDisplay m_ColumnHeaderDisplay = new ColumnHeaderDisplay();
private Office2007CheckBoxItemPainter m_CheckBoxPainter = new Office2007CheckBoxItemPainter();
#endregion
#region Internal Implementation
/// <summary>
/// Returns ElementStyleDisplayInfo class that provides information for ElementStyle rendering.
/// </summary>
/// <param name="style">Reference to style.</param>
/// <param name="g">Reference to graphics object.</param>
/// <param name="bounds">Style bounds</param>
/// <returns>New instance of ElementStyleDisplayInfo</returns>
protected ElementStyleDisplayInfo GetElementStyleDisplayInfo(ElementStyle style, Graphics g, Rectangle bounds)
{
m_ElementStyleDisplayInfo.Style=style;
m_ElementStyleDisplayInfo.Graphics=g;
m_ElementStyleDisplayInfo.Bounds=bounds;
return m_ElementStyleDisplayInfo;
}
private NodeConnectorDisplay GetConnectorDisplay(NodeConnector c)
{
NodeConnectorDisplay d=null;
if(c==null)
return null;
switch(c.ConnectorType)
{
case eNodeConnectorType.Line:
{
if(m_LineConnectorDisplay==null)
m_LineConnectorDisplay=new LineConnectorDisplay();
d=m_LineConnectorDisplay;
break;
}
}
return d;
}
后面还有 199 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。