using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; using System.Collections; using System.Collections.Generic; using System; using GCGame.Table; public class RedPacketLogItem : UIItemSelect { public Text _TimeLabel; public GameObject _SendLabel; public GameObject _GetLabel; public UICurrencyItem _PacketValue; private PickRedPacketMsg _LogInfo; public PickRedPacketMsg LogInfo { get { return _LogInfo; } } public override void Show(Hashtable hash) { base.Show(); _LogInfo = (PickRedPacketMsg)hash["InitObj"]; UpdatePacket(_LogInfo); } public void UpdatePacket(PickRedPacketMsg pcaketInfo) { var dateTime = GCGame.Utils.GetServerDateTime(pcaketInfo.Tm); _TimeLabel.text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", dateTime); if (pcaketInfo.Type == (int)PickRedPacketMsg.EHandlePacketType.PacketOut) { _SendLabel.SetActive(true); _GetLabel.SetActive(false); } else { _SendLabel.SetActive(false); _GetLabel.SetActive(true); } _PacketValue.ShowCurrency(MONEYTYPE.MONEYTYPE_COIN, pcaketInfo.Num); } }