// 解析黑红梅方json串信息 public static InfoShcd parseInfoShcd(string exInfo) { InfoShcd info = null; try { info = BaseJsonSerializer.deserialize <InfoShcd>(exInfo); } catch (System.Exception ex) { } return(info); }
private void genCardInfo(System.Web.UI.HtmlControls.HtmlGenericControl div, InfoShcd info) { Image img = new Image(); if (info.card_type == 4) { img.ImageUrl = "/data/image/poker/" + DefCC.s_pokerShcd[info.card_type] + ".png"; img.Width = 73; img.Height = 94; } else { img.ImageUrl = "/data/image/poker/" + DefCC.s_pokerShcd[info.card_type] + "_" + info.card_value + ".png"; } div.Controls.Add(img); }
private void genInfoPanel(GameDetailInfo ginfo) { if (ginfo == null) { return; } MoneyItem item = ginfo.m_item; InfoShcd info = (InfoShcd)ginfo.m_detailInfo; divHead.InnerText = item.m_genTime; // 玩家ID tdPlayer.InnerText = "玩家ID:" + item.m_playerId.ToString(); genCardInfo(divNormalResult, info); genBetTable(tableBet, info); }
// 下注表 protected void genBetTable(Table table, InfoShcd 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]; } long totalBet = 0, totalWin = 0; for (i = 0; i < StrName.s_shcdArea.Length; i++) { BetInfoCrocodile bet = info.getAreaBet(i); if (bet == null) { continue; } int c = 0; m_content[c++] = StrName.s_shcdArea[i]; m_content[c++] = ((double)bet.rate / 100).ToString(); m_content[c++] = ItemHelp.showMoneyValue(bet.bet_count).ToString(); m_content[c++] = ItemHelp.showMoneyValue(bet.award_count).ToString(); totalBet += bet.bet_count; totalWin += bet.award_count; 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]; } } addStatFoot(table, totalBet, totalWin); }