Source/Ribbon/BaseItemAutoSizeBag.cs

(开头部分) 3KB

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

using System;
using System.Text;
using System.Drawing;

namespace DevComponents.DotNetBar
{
    #region BaseItemAutoSizeBag
    internal class BaseItemAutoSizeBag
    {
        public BaseItem Item = null;
        private bool m_SettingsRecorded;

        protected bool SettingsRecorded
        {
            get
            {
                return m_SettingsRecorded;
            }
            set
            {
                m_SettingsRecorded = value;
            }
        }

        public virtual void RecordSetting(BaseItem item)
        {
            this.Item = item;
            m_SettingsRecorded = true;
        }

        public virtual void RestoreSettings()
        {
            m_SettingsRecorded = false;
        }
    }
    #endregion

    #region ItemContainerAutoSizeBag
    internal class ItemContainerAutoSizeBag : BaseItemAutoSizeBag
    {
        private bool m_MultiLine = false;
        private eOrientation m_LayoutOrientation = eOrientation.Horizontal;

        public override void RecordSetting(BaseItem item)
        {
            if (this.SettingsRecorded)
                return;
            
            ItemContainer cont = item as ItemContainer;
            m_MultiLine = cont.MultiLine;
            m_LayoutOrientation = cont.LayoutOrientation;

            base.RecordSetting(item);
        }

        public override void RestoreSettings()
        {
            if (!this.SettingsRecorded) return;

            ItemContainer cont = this.Item as ItemContainer;
后面还有 69 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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