protected void CheckItemData()
        {
            var data = Data as RecordDetialItemData;

            if (data == null)
            {
                return;
            }
            _curData = data;
            ShowItem(Id, App.UserId);
        }
示例#2
0
        protected bool CheckItemData()
        {
            var data = Data as RecordDetialItemData;

            if (data != null)
            {
                _curData = data;
                ShowItem(Id, App.UserId);
                return(true);
            }
            return(false);
        }
示例#3
0
        /// <summary>
        /// 设置时间,局数相关信息
        /// </summary>
        /// <param name="data"></param>
        private void SetItemInfo(RecordDetialItemData data)
        {
            YxTools.TrySetComponentValue(Time, data.Time);
            YxTools.TrySetComponentValue(RoundNum, string.Format(RoundFormat, data.ShowRoundNum));
            YxTools.TrySetComponentValue(ReplayBtnParent, PlayBack);
            var heads = data.HeadDatas;
            int index = 0;

            foreach (var item in heads)
            {
                var view = YxTools.GetChildView(index++, HeadItemPrefab, HeadGrid.transform);
                view.UpdateView(item.Value);
            }
            HeadGrid.repositionNow = true;
        }
示例#4
0
        /// <summary>
        /// 设置时间,局数相关信息
        /// </summary>
        /// <param name="data"></param>
        private void SetItemInfo(RecordDetialItemData data)
        {
            Time.TrySetComponentValue(data.Time);
            var roundNumString = data.ShowRoundNum;

            RoundNum.TrySetComponentValue(string.Format(RoundFormat, roundNumString));
            ReplayBtnParent.TrySetComponentValue(PlayBack);
            ReplayBtnParent.TrySetComponentValue(PlayBack);
            var heads = data.HeadDatas;
            var index = 0;

            foreach (var item in heads)
            {
                var view = HeadGrid.transform.GetChildView(index++, HeadItemPrefab);
                view.UpdateView(item.Value);
            }
            HeadGrid.repositionNow = true;
            //交错背景的显示
            SetInterlacedBg(roundNumString);
            //判断输赢
            if (SelfSpecialColorl)
            {
                if (data.HeadDatas.ContainsKey(App.UserId))
                {
                    Dictionary <string, object> _data = new Dictionary <string, object>();
                    _data = data.HeadDatas[App.UserId] as Dictionary <string, object>;
                    if (_data != null)
                    {
                        if (int.Parse(_data["gold"].ToString()) > 0)
                        {
                            Time.text += "贏";
                            Time.color = new Color32(180, 16, 16, 255);
                        }
                        else if (int.Parse(_data["gold"].ToString()) == 0)
                        {
                            Time.text += "平";
                        }
                        else if (int.Parse(_data["gold"].ToString()) < 0)
                        {
                            Time.text += "输";
                        }
                    }
                }
            }
        }
        /// <summary>
        /// 设置时间,局数相关信息
        /// </summary>
        /// <param name="data"></param>
        private void SetItemInfo(RecordDetialItemData data)
        {
            Time.TrySetComponentValue(data.Time);
            var roundNumString = data.ShowRoundNum;

            RoundNum.TrySetComponentValue(string.Format(RoundFormat, roundNumString));
            ReplayBtnParent.TrySetComponentValue(PlayBack);
            ReplayBtnParent.TrySetComponentValue(PlayBack);
            var heads = data.HeadDatas;
            int index = 0;

            foreach (var item in heads)
            {
                var view = DetialGrid.transform.GetChildView(index++, DetialItem);
                view.UpdateView(item.Value);
            }
            DetialGrid.repositionNow = true;
            //交错背景的显示
            SetInterlacedBg(roundNumString);
        }