Source/DisplayMoreItem.cs

(开头部分) 22KB

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

using System;
using System.Drawing;
using System.ComponentModel;

namespace DevComponents.DotNetBar
{
    /// <summary>
    /// System item that displays the items that could not fit inside the container on popup menu or toolbar.
    /// </summary>
    [System.ComponentModel.ToolboxItem(false),System.ComponentModel.DesignTimeVisible(false)]
    public class DisplayMoreItem:PopupItem
    {
		private bool m_MouseOver;
		private const int FIXED_SIZE=14;
		private bool m_PopupSubItemsOnMenu;
		private eOrientation m_OldOrientation=eOrientation.Horizontal;
		private bool m_Localized=false;

		/// <summary>
		/// Create new instance of DisplayMoreItem object.
		/// </summary>
        public DisplayMoreItem()
        {
			this.GlobalItem=false;
			m_MouseOver=false;
			m_PopupSubItemsOnMenu=false;
			m_Tooltip="More Buttons";
			m_SystemItem=true;
			this.CanCustomize=false;
			m_ShouldSerialize=false;

			// Localization loading will repeat in OnContainerChanged becouse at this time
			// DotNetBarManager owner is not known and LocalizeString event cannot be invoked
			using(LocalizationManager lm=new LocalizationManager(null))
			{
				m_Tooltip=lm.GetLocalizedString(LocalizationKeys.OverlfowDisplayMoreTooltip);
			}
        }

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

		/// <summary>
		/// Called when item container has changed. If you override this method you must call the base implementation to allow default processing to occur.
		/// </summary>
		/// <param name="objOldContainer">Previous container of the item.</param>
		protected internal override void OnContainerChanged(object objOldContainer)
		{
			base.OnContainerChanged(objOldContainer);
			if(!m_Localized)
			{
				m_Localized=true;
				using(LocalizationManager lm=new LocalizationManager(this.GetOwner() as IOwnerLocalize))
后面还有 579 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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