protected void genFishTable(Table table, InfoFishPark info) { GMUser user = (GMUser)Session["user"]; TableRow tr = new TableRow(); table.Rows.Add(tr); int i = 0; for (; i < s_head.Length; i++) { TableCell td = new TableCell(); tr.Cells.Add(td); td.Text = s_head[i]; } if (info.m_fish == null) { return; } for (i = 0; i < info.m_fish.Count; i++) { DbFish item = info.m_fish[i]; m_content[0] = item.fishid.ToString(); FishCFGData data = FishParkCFG.getInstance().getValue(item.fishid); if (data != null) { m_content[1] = data.m_fishName; } m_content[2] = item.hitcount.ToString(); m_content[3] = item.deadcount.ToString(); m_content[4] = item.totalincome.ToString(); m_content[5] = item.totaloutlay.ToString(); tr = new TableRow(); table.Rows.Add(tr); for (int j = 0; j < s_head.Length; j++) { TableCell td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } }
private void genInfoPanel(GameDetailInfo ginfo) { if (ginfo == null) { return; } MoneyItem item = ginfo.m_item; InfoFishPark info = (InfoFishPark)ginfo.m_detailInfo; divHead.InnerText = item.m_genTime; // 玩家ID tdPlayerCrocodile.InnerText = "玩家ID:" + item.m_playerId.ToString(); tdAbandonedbullets.InnerText = "废弹:" + info.m_abandonedbullets.ToString(); genFishTable(tableFish, info); }
// 解析鳄鱼公园json串信息 public static InfoFishPark parseInfoFishPark(string exInfo) { InfoFishPark info = null; try { Dictionary <string, object> dic = BaseJsonSerializer.deserialize <Dictionary <string, object> >(exInfo); info = new InfoFishPark(); if (dic.ContainsKey("Abandonedbullets")) { info.m_abandonedbullets = Convert.ToInt32(dic["Abandonedbullets"]); } if (dic.ContainsKey("fishinfos")) { info.m_fish = BaseJsonSerializer.deserialize <List <DbFish> >(dic["fishinfos"].ToString()); } info.sort(); } catch (System.Exception ex) { } return(info); }