?? basemenuitemcollection.cs
字號:
using System;
using System.ComponentModel;
using System.Collections;
namespace ComponentArt.Web.UI
{
/// <summary>
/// Collection of BaseMenuItem objects.
/// </summary>
[ToolboxItem(false)]
public abstract class BaseMenuItemCollection : NavigationNodeCollection, IList
{
public BaseMenuItemCollection(BaseMenu oControl, BaseMenuItem oParent) : base(oControl, oParent)
{
}
internal new BaseMenuItem this[int index]
{
get
{
return (BaseMenuItem)base[index];
}
}
object IList.this[int index]
{
get
{
return (BaseMenuItem)base[index];
}
set
{
nodeList[index] = (BaseMenuItem)value;
}
}
/// <summary>
/// Add method.
/// </summary>
/// <param name="item">The BaseMenuItem to be added</param>
/// <returns>Index of added node in the collection</returns>
internal int Add(BaseMenuItem item)
{
int iRetValue = base.Add(item);
if(item.ParentItem != null && item.ParentBaseMenu != null)
{
if(item.ParentItem.m_bLooksApplied)
{
item.ApplyLooks();
}
}
return iRetValue;
}
/// <summary>
/// Contains method.
/// </summary>
/// <param name="item">A BaseMenuItem</param>
/// <returns>Whether this collection contains the given item</returns>
internal bool Contains(BaseMenuItem item)
{
return base.Contains(item);
}
/// <summary>
/// IndexOf method.
/// </summary>
/// <param name="item">A BaseMenuItem</param>
/// <returns>Index of the given node in this collection, or a negative value.</returns>
internal int IndexOf(BaseMenuItem item)
{
return base.IndexOf(item);
}
/// <summary>
/// Insert method.
/// </summary>
/// <param name="index">The index at which to insert the given BaseMenuItem.</param>
/// <param name="item">A BaseMenuItem to be inserted into this collection.</param>
internal void Insert(int index, BaseMenuItem item)
{
base.Insert(index, item);
if(item.ParentItem != null && item.ParentBaseMenu != null)
{
if(item.ParentItem.m_bLooksApplied)
{
item.ApplyLooks();
}
}
}
/// <summary>
/// Remove method.
/// </summary>
/// <param name="item">The BaseMenuItem to be removed from this collection.</param>
internal void Remove(BaseMenuItem item)
{
base.Remove(item);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -