public void RefreshInfoPanel(ElfInfoItem infoData) { if (!string.IsNullOrEmpty(infoData.strTitle)) { this.infoTitle.text = infoData.strTitle; this.infoTitle.gameObject.SetActive(true); } else { this.infoTitle.gameObject.SetActive(false); } this.infoContent.text = infoData.strContent; this.infoTable.repositionNow = true; }
private ElfInfoItem ParseElfContentData(string result) { ElfInfoItem result2 = null; try { result = this.ParseStrData(result); string strTitle = null; int num = result.IndexOf('\n'); string text; if (num < 0) { text = result; } else { strTitle = result.Substring(0, num); text = result.Remove(0, num + 1); } result2 = new ElfInfoItem { strTitle = strTitle, strContent = text.Insert(0, "[feeebd]") }; } catch (Exception ex) { global::Debug.LogError(new object[] { string.Format("Parse ElfContent Error, {0}", ex.Message) }); } return result2; }