private void RefreshMailContent(int id) { this.mailtitle.gameObject.SetActive(false); this.mailcontent.gameObject.SetActive(false); this.fajianren2.gameObject.SetActive(false); this.time2.gameObject.SetActive(false); this.hint.gameObject.SetActive(false); this.del1.gameObject.SetActive(false); this.get.gameObject.SetActive(false); this.del2.gameObject.SetActive(false); this.tx_infos.gameObject.SetActive(false); for (int i = 0; i < this.itmGrid.transform.childCount; i++) { UnityEngine.Object.Destroy(this.itmGrid.transform.GetChild(i).gameObject); } for (int j = 0; j < this.coinGrid.transform.childCount; j++) { UnityEngine.Object.Destroy(this.coinGrid.transform.GetChild(j).gameObject); } bool flag = ModelBase <A3_MailModel> .getInstance().mail_simple.Count == 0; if (flag) { this.hint.gameObject.SetActive(true); this.hint.text = ContMgr.getCont("mail_hint_1", null); } else { bool flag2 = id == -1 || !ModelBase <A3_MailModel> .getInstance().mail_details.ContainsKey((uint)id); if (flag2) { this.hint.gameObject.SetActive(true); this.hint.text = ContMgr.getCont("mail_hint_2", null); } else { A3_MailDetail a3_MailDetail = ModelBase <A3_MailModel> .getInstance().mail_details[(uint)id]; this.mailtitle.gameObject.SetActive(true); this.mailtitle.text = a3_MailDetail.ms.title; this.fajianren2.gameObject.SetActive(true); this.fajianren2.text = a3_MailDetail.ms.tp; this.time2.gameObject.SetActive(true); string strTime = Globle.getStrTime((int)a3_MailDetail.ms.tm, false, true); this.time2.text = strTime; this.mailcontent.gameObject.SetActive(true); this.mailcontent.text = a3_MailDetail.msg; bool flag3 = !a3_MailDetail.ms.has_itm; if (flag3) { this.del2.gameObject.SetActive(true); } else { bool flag4 = a3_MailDetail.money > 0u; if (flag4) { this.CreateCoinIcon("coin1", a3_MailDetail.money); } bool flag5 = a3_MailDetail.yb > 0u; if (flag5) { this.CreateCoinIcon("coin2", a3_MailDetail.yb); } bool flag6 = a3_MailDetail.bndyb > 0u; if (flag6) { this.CreateCoinIcon("coin3", a3_MailDetail.bndyb); } for (int k = 0; k < a3_MailDetail.itms.Count; k++) { a3_BagItemData data = a3_MailDetail.itms[k]; GameObject gameObject = IconImageMgr.getInstance().createA3ItemIcon(data, true, data.num, 1f, false); gameObject.transform.SetParent(this.itmGrid.transform, false); bool flag7 = data.num <= 1; if (flag7) { gameObject.transform.FindChild("num").gameObject.SetActive(false); } BaseButton baseButton = new BaseButton(gameObject.transform, 1, 1); baseButton.onClick = delegate(GameObject go) { this.onMailItemClick(data); }; } bool got_itm = a3_MailDetail.ms.got_itm; if (got_itm) { this.del2.gameObject.SetActive(true); this.tx_infos.gameObject.SetActive(true); this.tx_infos.text = ContMgr.getCont("mail_hint_0", null); for (int l = 0; l < this.itmGrid.transform.childCount; l++) { UnityEngine.Object.Destroy(this.itmGrid.transform.GetChild(l).gameObject); } for (int m = 0; m < this.coinGrid.transform.childCount; m++) { UnityEngine.Object.Destroy(this.coinGrid.transform.GetChild(m).gameObject); } } else { this.del1.gameObject.SetActive(true); this.get.gameObject.SetActive(true); } } } } }
void showthisOnclick(int id) { nowchooseid = id; panel.SetActive(true); txt.SetActive(false); Dictionary <int, fashionshow_date> dic = A3_FashionShowModel.getInstance().Dic_AllData; if (dic[id].dress_type == 0) { nowchooseid_eqp = id; } else if (dic[id].dress_type == 1) { nowchooseid_body = id; } #region this_icon for (int i = 0; i < contain.transform.childCount; i++) { contain.transform.GetChild(i).transform.FindChild("this").gameObject.SetActive(false); } dic_objs[id].transform.FindChild("this").gameObject.SetActive(true); #endregion #region info c_name.text = dic[id].name; c_shuxing.text = ""; for (int i = 0; i < dic[id].lst_fa.Count; i++) { string nub_str = string.Empty; int nub = dic[id].lst_fa[i].type; if (nub >= 100) { nub_str = dic[id].lst_fa[i].value + "%"; c_shuxing.text += Globle.getAttrNameById(dic[id].lst_fa[i].type - 100) + "+" + nub_str + " "; } else { nub_str = dic[id].lst_fa[i].value.ToString(); c_shuxing.text += Globle.getAttrNameById(dic[id].lst_fa[i].type) + "+" + nub_str + " "; } } c_info.text = dic[id].des; if (A3_FashionShowModel.getInstance().dic_have_fs.ContainsKey(id)) { // long now_time = muNetCleint.instance.CurServerTimeStamp; //long over_time = long.Parse(ConvertStringToDateTime((long)A3_FashionShowModel.getInstance().dic_have_fs[id])); c_time.text = ContMgr.getCont("a3_fashionshow9") + Globle.getStrTime((int)A3_FashionShowModel.getInstance().dic_have_fs[id], true); c_jihuo_obj.SetActive(true); jihuo_info.SetActive(false); c_info.gameObject.SetActive(true); c_time.gameObject.SetActive(true); if (A3_FashionShowModel.getInstance().nowfs[0] == id || A3_FashionShowModel.getInstance().nowfs[1] == id) { btn_buy_obj.SetActive(false); btn_dress_obj.SetActive(false); } else { btn_buy_obj.SetActive(false); btn_dress_obj.SetActive(true); } } else { c_time.text = ContMgr.getCont("a3_fashionshow10"); c_jihuo_obj.SetActive(false); btn_buy_obj.SetActive(true); btn_dress_obj.SetActive(false); jihuo_info.SetActive(true); inti_jihuo_panel(); c_info.gameObject.SetActive(false); c_time.gameObject.SetActive(false); } #endregion #region 模型更改 if (A3_FashionShowModel.getInstance().dress_show) { Show_this_Fashion(); } #endregion }