Source/Ribbon/QatOverflowItem.cs

(开头部分) 2KB

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

using System;
using System.Text;

namespace DevComponents.DotNetBar
{
    /// <summary>
    /// Defines the Ribbon Quick Access Overflow system item. Used internally by Ribbon control.
    /// </summary>
    public class QatOverflowItem : DisplayMoreItem
    {
        #region Internal Implementation
        public QatOverflowItem()
            : base()
        {
            this.KeyTips = "00";
        }

        /// <summary>
        /// Returns copy of DisplayMoreItem item
        /// </summary>
        public override BaseItem Copy()
        {
            QatOverflowItem objCopy = new QatOverflowItem();
            this.CopyToItem(objCopy);
            return objCopy;
        }

        /// <summary>
		/// Overriden. Draws the item.
		/// </summary>
		/// <param name="g">Target Graphics object.</param>
        public override void Paint(ItemPaintArgs p)
        {
            Rendering.BaseRenderer renderer = p.Renderer;
            if (renderer != null)
            {
                renderer.DrawQatOverflowItem(new QatOverflowItemRendererEventArgs(this, p.Graphics));
                return;
            }
            else
            {
                Rendering.QatOverflowPainter painter = PainterFactory.CreateQatOverflowItemPainter(this);
                if (painter != null)
                {
                    painter.Paint(new QatOverflowItemRendererEventArgs(this, p.Graphics));
                    return;
                }
            }

            base.Paint(p);
        }

        /// <summary>
        /// Returns the insertion index for the items removed from overflow popup. Assumes that right-most items are removed first by the layout manager.
        /// </summary>
        /// <returns></returns>
        protected override int GetReInsertIndex()
        {
            int insertPos = m_Parent.SubItems.Count;
            for (int i = insertPos - 1; i >= 0; i--)
后面还有 14 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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