public void Refresh(OpenServerRewardInfoItemData _info) { if (_info == null) { return; } info = _info; if (rewardName != null) { rewardName.text = _info.giftName; } if (item != null) { item.FillInfo(_info.item_type); } if (orig_price != null) { orig_price.text = ConfigMng.Instance.GetUItext(76) + _info.orig_price.ToString(); } if (cur_price != null) { cur_price.text = ConfigMng.Instance.GetUItext(77) + _info.cur_price.ToString(); } if (countNum != null) { countNum.text = _info.max_buy_amount.ToString(); } if (buyBtn != null) { UIEventListener.Get(buyBtn).onClick = BuyItem; } }
private int SortCompare(OpenServerRewardInfoItemData AF1, OpenServerRewardInfoItemData AF2) { int res = 0; if (AF1.id > AF2.id) { res = 1; } else if (AF1.id < AF2.id) { res = -1; } return(res); }