void BtnDetail_OnClickEventHandler(UIButton sender) { if (m_ItemInfo == null || m_parent == null) { return; } if (m_ItemInfo.m_isuser == 1) { if (m_ItemInfo.m_func == "Item_AddSoldierExp") { AddExpWnd wnd = WndManager.GetDialog <AddExpWnd>(); wnd.SetData(m_ItemInfo, m_parent); } else { ItemDC.Send_ItemUseRequest(m_ItemInfo.ID, 1, UserDC.GetUserID()); } } else { EquipInfoWnd wnd = WndManager.GetDialog <EquipInfoWnd>(); wnd.SetData(m_ItemInfo); } }
/// <summary> /// 发送物品使用申请,使用结果在BeiBaoWnd中监听处理. /// </summary> /// <param name="ItemId">Item identifier.</param> /// <param name="ItemNum">Item number.</param> /// <param name="SoldierId">Soldier identifier.</param> public void SendUseItem(int ItemId, int ItemNum, int SoldierId) { ItemDC.Send_ItemUseRequest(ItemId, ItemNum, SoldierId); }