Source/AdvTree/ColumnHeaderControl.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using DevComponents.DotNetBar;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
namespace DevComponents.AdvTree
{
internal class ColumnHeaderControl : Control
{
#region Constructor
/// <summary>
/// Initializes a new instance of the ColumnHeaderControl class.
/// </summary>
public ColumnHeaderControl()
{
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.Opaque, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.Selectable, false);
this.SetStyle(ControlStyles.StandardDoubleClick | ControlStyles.StandardClick, true);
}
#endregion
#region Internal Implementation
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
DisplayHelp.FillRectangle(g, this.ClientRectangle, this.BackColor);
if (_Columns == null)
{
return;
}
AdvTree tree = GetTree();
if (tree != null)
{
SmoothingMode sm = g.SmoothingMode;
TextRenderingHint th = g.TextRenderingHint;
if (tree.AntiAlias)
{
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
g.TextRenderingHint = DisplayHelp.AntiAliasTextRenderingHint;
}
//Creates the drawing matrix with the right zoom;
if (tree.Zoom != 1)
{
System.Drawing.Drawing2D.Matrix mx = GetTranslationMatrix(tree.Zoom);
//use it for drawing
g.Transform = mx;
}
tree.NodeDisplay.PaintColumnHeaders(_Columns, g, true);
后面还有 183 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。