Source/TabsCollection.cs

(开头部分) 3KB

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

using System;

namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Summary description for TabsCollection.
	/// </summary>
	public class TabsCollection:System.Collections.CollectionBase
	{
		#region Private Variables
		private TabStrip m_Owner;
		#endregion

		#region Internal Implementation
        private bool m_IgnoreEvents = false;
		public TabsCollection(TabStrip owner)
		{
			m_Owner=owner;
		}
		public int Add(TabItem item)
		{
			m_Owner.NeedRecalcSize=true;
			return List.Add(item);
		}
		public TabItem this[int index]
		{
			get {return (TabItem)(List[index]);}
			set {List[index] = value;}
		}

        /// <summary>
        /// Get the TabItem with given name. Name comparison is case insensitive.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public TabItem this[string name]
        {
            get
            {
                if (name == null) return null;

                int i = GetIndexOf(name);
                if (i >= 0)
                    return this[i];

                return null;
            }
            set
            {
                int i = GetIndexOf(name);
                if (i >= 0)
                    List[i] = value;
            }
        }

        private int GetIndexOf(string name)
        {
            name = name.ToLower();
            for (int i = 0; i < this.Count; i++)
            {
后面还有 97 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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