public void Init(int goodsid, int count, PresentRootLogic.TAB_INDEX tab, int index = GlobeVar.INVALID_ID) { m_GoodsID = goodsid; m_GoodsCount = count; m_Type = tab; m_GoodsIndex = index; Tab_YuanBaoShop tabGood = TableManager.GetYuanBaoShopByID(goodsid, 0); if (tabGood != null && tabGood.ItemType == (int)YuanBaoShopItemLogic.ITEM_TYPE.TYPE_ITEM) { int itemid = tabGood.ItemID; Tab_CommonItem tabItem = TableManager.GetCommonItemByID(itemid, 0); if (tabItem != null) { m_ItemSlot.InitInfo_Item(tabItem.Id, GoodsOnClick, tabGood.Num.ToString(), true); m_CountLabel.text = count.ToString(); m_DeleteButton.SetActive(true); m_NameLabel.text = tabItem.Name; } } if (tab == PresentRootLogic.TAB_INDEX.TAB_SHOPPINGCART) { m_DeleteButton.SetActive(true); } else { m_DeleteButton.SetActive(false); } }
public void InitOnCartTab(UInt64 friendguid, string friendname) { if (friendguid == GlobeVar.INVALID_GUID) { return; } m_FriendGuid = friendguid; m_FriendName = friendname; m_Type = PresentRootLogic.TAB_INDEX.TAB_SHOPPINGCART; m_CartFriendNameLabel.text = friendname; m_CartFriendNameLabel.gameObject.SetActive(true); m_PresentFriendNameLabel.gameObject.SetActive(false); m_PresentTimeLabel.gameObject.SetActive(false); }
public void InitOnPresentWaitPayTab(ShoppingList shoppinglist, PresentRootLogic.TAB_INDEX tab) { if (false == shoppinglist.IsValid()) { return; } m_ShoppingListGuid = shoppinglist.Guid; m_FriendGuid = GlobeVar.INVALID_GUID; m_FriendName = shoppinglist.SenderName; m_Type = tab; m_PresentFriendNameLabel.text = StrDictionary.GetClientDictionaryString("#{4794}", shoppinglist.SenderName); m_PresentTimeLabel.text = StrDictionary.GetClientDictionaryString("#{4795}", shoppinglist.GetRemainDay()); m_CartFriendNameLabel.gameObject.SetActive(false); m_PresentFriendNameLabel.gameObject.SetActive(true); m_PresentTimeLabel.gameObject.SetActive(true); }