コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        internal void OnAddedSubItem(T addSubItemT, BaseItemContainer <T> itemContainer)
        {
            EventHandler <AddedSubItemCallEventArgs <T> > tempAfterEventArgs = m_EventAddedSubItem;

            if (tempAfterEventArgs != null)
            {
                AddedSubItemCallEventArgs <T> eventArgs = new AddedSubItemCallEventArgs <T>(addSubItemT, itemContainer);
                tempAfterEventArgs(this, eventArgs);
            }
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        internal void OnRemovedSubItem(T removeSubItem, BaseItemContainer <T> itemContainer)
        {
            EventHandler <RemovedSubItemCallEventArgs <T> > tempAfterEventArgs = m_EventRemovedSubItem;

            if (tempAfterEventArgs != null)
            {
                RemovedSubItemCallEventArgs <T> eventArgs = new RemovedSubItemCallEventArgs <T>(removeSubItem, itemContainer);
                tempAfterEventArgs(this, eventArgs);
            }
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        internal bool OnRemovingSubItem(T removeSubItem, BaseItemContainer <T> itemContainer)
        {
            EventHandler <RemovingSubItemCallEventArgs <T> > tempBeforeEventArgs = m_EventRemovingSubItem;

            if (tempBeforeEventArgs != null)
            {
                RemovingSubItemCallEventArgs <T> eventArgs = new RemovingSubItemCallEventArgs <T>(removeSubItem, itemContainer);
                tempBeforeEventArgs(this, eventArgs);

                return(eventArgs.IsCancel);
            }

            return(false);
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        internal bool OnAddingSubItem(T addSubItemT, BaseItemContainer <T> itemContainer)
        {
            EventHandler <AddingSubItemCallEventArgs <T> > tempBeforeEventArgs = m_EventAddingSubItem;

            if (tempBeforeEventArgs != null)
            {
                AddingSubItemCallEventArgs <T> eventArgs = new AddingSubItemCallEventArgs <T>(addSubItemT, itemContainer);
                tempBeforeEventArgs(this, eventArgs);

                return(eventArgs.IsCancel);
            }

            return(false);
        }
コード例 #5
0
 /// <summary>
 /// 初始化构造
 /// </summary>
 /// <param name="baseCreature"></param>
 public RemovedSubItemCallEventArgs(T removeSubItem, BaseItemContainer <T> itemContainerT) :
     base(itemContainerT)
 {
     m_RemoveSubItem = removeSubItem;
 }
コード例 #6
0
 /// <summary>
 /// 初始化构造
 /// </summary>
 /// <param name="baseCreature"></param>
 public AddedSubItemCallEventArgs(T addSubItem, BaseItemContainer <T> itemContainerT) :
     base(itemContainerT)
 {
     m_AddSubItem = addSubItem;
 }
コード例 #7
0
 /// <summary>
 /// 初始化构造
 /// </summary>
 /// <param name="baseCreature"></param>
 public ItemContainerEventArgs(BaseItemContainer <T> itemContainerT)
 {
     m_ItemContainer = itemContainerT;
 }