/// <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); } }
/// <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); } }
/// <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); }
/// <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); }
/// <summary> /// 初始化构造 /// </summary> /// <param name="baseCreature"></param> public RemovedSubItemCallEventArgs(T removeSubItem, BaseItemContainer <T> itemContainerT) : base(itemContainerT) { m_RemoveSubItem = removeSubItem; }
/// <summary> /// 初始化构造 /// </summary> /// <param name="baseCreature"></param> public AddedSubItemCallEventArgs(T addSubItem, BaseItemContainer <T> itemContainerT) : base(itemContainerT) { m_AddSubItem = addSubItem; }
/// <summary> /// 初始化构造 /// </summary> /// <param name="baseCreature"></param> public ItemContainerEventArgs(BaseItemContainer <T> itemContainerT) { m_ItemContainer = itemContainerT; }