Source/PanelExTitle.cs

(开头部分) 7KB

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

using System;
using System.Text;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace DevComponents.DotNetBar
{
    [ToolboxItem(false)]
    internal class PanelExTitle:PanelEx
    {
        #region Private Variables, Events & Constructor
        private ItemContainer m_ItemContainer = null;
        private ButtonItem m_ExpandChangeButton = null;
        private int m_ButtonMargin = 3;
        private eTitleButtonAlignment m_ButtonAlignment = eTitleButtonAlignment.Right;
        private bool m_DrawText = true;
        /// <summary>
        /// Occurs when Expanded/Collapse button is clicked.
        /// </summary>
        public event EventHandler ExpandedClick;

        public PanelExTitle()
        {
            m_ExpandChangeButton = new ButtonItem("close");
            m_ExpandChangeButton.Style = eDotNetBarStyle.Office2003;
            m_ExpandChangeButton.Image = BarFunctions.LoadBitmap("SystemImages.CollapseTitle.png");
            m_ExpandChangeButton.Displayed = true;
            m_ExpandChangeButton.Click += new EventHandler(m_ExpandChangeButton_Click);

            m_ItemContainer = new ItemContainer();
            m_ItemContainer.ContainerControl = this;
            m_ItemContainer.Style = eDotNetBarStyle.Office2003;
            m_ItemContainer.SubItems.Add(m_ExpandChangeButton);
            base.MarkupUsesStyleAlignment = true;
        }
        #endregion

        #region ButtonItem integration
        protected override void OnMouseEnter(EventArgs e)
        {
            base.OnMouseEnter(e);
            m_ItemContainer.InternalMouseEnter();
        }

        protected override void OnMouseLeave(EventArgs e)
        {
            base.OnMouseLeave(e);
            m_ItemContainer.InternalMouseLeave();
        }

        protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            m_ItemContainer.InternalMouseDown(e);
        }

        protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseUp(e);
后面还有 154 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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