Source/AdvTree/Display/NodeConnectorDisplay.cs
(开头部分) 23KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace DevComponents.AdvTree
{
namespace Display
{
/// <summary>
/// Base class for drawing node connectors.
/// </summary>
public abstract class NodeConnectorDisplay
{
//private bool m_RootNode=false;
//private bool m_DrawRootAllLevels=false;
//private bool m_EndCap=true;
//private bool m_DrawConnectorUnderNodes=true;
/// <summary>
/// Creates new instance of the object.
/// </summary>
public NodeConnectorDisplay()
{
}
/// <summary>
/// Draws connector line between two nodes.
/// </summary>
/// <param name="info">Connector context information.</param>
public virtual void DrawConnector(ConnectorRendererEventArgs info){}
///// <summary>
///// Returns the connector starting coordinates.
///// </summary>
///// <param name="info">Connector display information.</param>
///// <returns>Point object.</returns>
//protected virtual Point GetStartPoint(ConnectorRendererEventArgs info)
//{
// Point p=Point.Empty;
// if(info.IsRootNode)
// {
// //int toMidPoint=info.ToNode.Bounds.Top+info.ToNode.Bounds.Height/2;
// //if(info.FromNode.Bounds.Top>toMidPoint)
// if(IsAbove(info.FromNode,info.ToNode))
// p=new Point(info.FromNode.BoundsRelative.Left+info.FromNode.BoundsRelative.Width/2,info.FromNode.BoundsRelative.Top);
// //else if(info.FromNode.Bounds.Bottom<toMidPoint)
// else if(IsBelow(info.FromNode,info.ToNode))
// p=new Point(info.FromNode.BoundsRelative.Left+info.FromNode.BoundsRelative.Width/2,info.FromNode.BoundsRelative.Bottom-1);
// }
// if(p.IsEmpty)
// {
// // To element to the Left
// if(this.IsOnLeftSide(info.FromNode,info.ToNode))
// p=new Point(info.FromNode.BoundsRelative.Left,info.FromNode.BoundsRelative.Top+info.FromNode.BoundsRelative.Height/2);
// else
// {
// p=new Point(info.FromNode.BoundsRelative.Right,info.FromNode.BoundsRelative.Top+info.FromNode.BoundsRelative.Height/2);
// if(info.IsRootNode)
后面还有 451 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。