/// <summary> /// 添加子菜单项 /// </summary> /// <param name="item">菜单项</param> public void addItem(FCMenuItem item) { item.ParentItem = this; item.ParentMenu = ParentMenu; item.onAddingItem(-1); m_items.add(item); }
/// <summary> /// 插入项 /// </summary> /// <param name="index">索引</param> /// <param name="item">菜单项</param> public void insertItem(int index, FCMenuItem item) { item.ParentItem = this; item.ParentMenu = ParentMenu; item.onAddingItem(index); m_items.Insert(index, item); }