Source/AdvTree/Display/NodeDisplay.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Drawing;
using DevComponents.AdvTree.Layout;
using System.Collections;
using DevComponents.DotNetBar;

namespace DevComponents.AdvTree.Display
{
	/// <summary>
	/// Summary description for NodeDisplay.
	/// </summary>
	public class NodeDisplay
	{
		#region Private Variables
		private Point m_Offset=Point.Empty;
		private Point m_LockedOffset=Point.Empty;
		private AdvTree m_Tree=null;
        internal ArrayList _PaintedNodes = new ArrayList(100);
#if !TRIAL
		internal static bool keyInvalid=false;
#endif
		#endregion
		/// <summary>Creates new instance of the class</summary>
		/// <param name="tree">Object to initialize class with.</param>
		public NodeDisplay(AdvTree tree)
		{
			m_Tree=tree;
		}

		/// <summary>
		/// Paints the layout on canvas.
		/// </summary>
		public virtual void Paint(Graphics g, Rectangle clipRectangle)
		{
		}

		/// <summary>
		/// Gets or sets the offset of the tree content relative to the size of the container control.
		/// </summary>
		public virtual Point Offset
		{
			get
			{
				if(!m_LockedOffset.IsEmpty)
					return m_LockedOffset;
				
				Node displayNode=m_Tree.GetDisplayRootNode();
				if(displayNode==null)
					return Point.Empty;;
				
				Size nodesSize = m_Tree.GetScreenSize(new Size(m_Tree.NodeLayout.Width, m_Tree.NodeLayout.Height));
				return m_Tree.GetLayoutPosition(m_Offset);
			}
			set {m_Offset=value;}
		}

		/// <summary>Gets or sets whether offset is locked, i.e. cannot be changed.</summary>
		public bool LockOffset
		{
			get {return (!m_LockedOffset.IsEmpty);}
后面还有 283 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。