private void InitRewardGrid() { RewardVO rewardVO = null; if (!string.IsNullOrEmpty(this.missionVO.Rewards)) { rewardVO = Service.StaticDataController.Get <RewardVO>(this.missionVO.Rewards); } this.rewardTable = base.GetElement <UXTable>("RewardTable"); if (rewardVO != null && rewardVO.CurrencyRewards != null) { this.rewardTable.Visible = true; this.rewardTable.SetTemplateItem("RewardTemplate"); UXUtils.HideChildrenRecursively(base.GetElement <UXElement>("RewardIconType").Root, true); for (int i = 0; i < rewardVO.CurrencyRewards.Length; i++) { string[] array = rewardVO.CurrencyRewards[i].Split(new char[] { ':' }); string key = array[0]; if (this.rewardIconMap.ContainsKey(key)) { string text = "RewardIcon" + this.rewardIconMap[key]; string text2 = this.lang.ThousandsSeparated(Convert.ToInt32(array[1])); string itemUid = text + i; UXElement item = this.rewardTable.CloneTemplateItem(itemUid); this.rewardTable.GetSubElement <UXSprite>(itemUid, text).Visible = true; this.rewardTable.GetSubElement <UXLabel>(itemUid, "RewardValueLabel").Text = text2; this.rewardTable.AddItem(item, i); } } this.rewardTable.RepositionItems(); } else { this.rewardTable.Visible = false; } }