CustomControl/TreeViewEx.cs

(开头部分) 3KB

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

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace AppManager.CustomControl {
    /// <summary>
    /// Class TreeViewEx.
    /// Implements the <see cref="TreeView" />
    /// </summary>
    /// <seealso cref="TreeView" />
    public class TreeViewEx : TreeView {

        /// <summary>
        /// Gets or sets the LST tips.
        /// </summary>
        /// <value>The LST tips.</value>
        public Dictionary<string, string> LstTips { get; set; }

        /// <summary>
        /// Gets or sets the tip font.
        /// </summary>
        /// <value>The tip font.</value>
        [Category("自定义属性"), Description("角标文字字体")]
        public Font TipFont { get; set; }

        /// <summary>
        /// Gets or sets the tip image.
        /// </summary>
        /// <value>The tip image.</value>
        [Category("自定义属性"), Description("是否显示角标")]
        public Image TipImage { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is show tip.
        /// </summary>
        /// <value><c>true</c> if this instance is show tip; otherwise, <c>false</c>.</value>
        [Category("自定义属性"), Description("是否显示角标")]
        public bool IsShowTip { get; set; }


        /// <summary>
        /// Initializes a new instance of the <see cref="TreeViewEx" /> class.
        /// </summary>
        public TreeViewEx() {
            LstTips = new Dictionary<string, string>();
            TipFont = new Font("宋体", 9f);
            ItemHeight = 32;
            DrawMode = TreeViewDrawMode.OwnerDrawAll;
            DrawNode += TreeView_DrawNode;
            MouseUp += TreeViewEx_MouseUp;
            LostFocus += TreeViewEx_LostFocus;
            BackColor = Color.White;
            BorderStyle = BorderStyle.None;
            DoubleBuffered = true;
        }

        protected sealed override bool DoubleBuffered { get; set; }

后面还有 41 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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