Ejemplo n.º 1
0
 public void FillHud()
 {
     StatOperator sOperator = new ConditionalStatOperator(true);
     var hudTable = new HudTable(sOperator, _keyPath);
     hudInfoTxtBx.Text = hudTable.GetHudInfo();
     DrawHeroCards(hudTable);
     DrawMuckCards(hudTable);
     DrawGraphic(hudTable);
     hudGrdVw.DataSource = hudTable.GetPlayerStatsList().ToDataTable();
     MinimizeGridWidth();
 }
Ejemplo n.º 2
0
 private void DrawGraphic(HudTable hudTable)
 {
     profitChart.Series["Series1"].Points.Clear();
     profitChart.Series["Series1"].IsVisibleInLegend = false;
     var profits = hudTable.GetHeroProfits().ToList();
     var totalProfit = 0d;
     for (var i = 0; i < profits.Count(); i++)
     {
         totalProfit += profits[i];
         profitChart.Series["Series1"].Points.AddXY(i + 1, totalProfit);
     }
     profitChart.Series["Series1"].LegendText = "Hero";
 }
Ejemplo n.º 3
0
 private void DrawHeroCards(HudTable hudTable)
 {
     var heroCards = hudTable.GetHeroCards();
     if (!string.IsNullOrEmpty(heroCards))
     {
         var heroArray = heroCards.Split(',');
         pictureBoxHero1.Image = CardsImageManager.GetImageCard((Card)heroArray[0].ConvertStringCardToByte());
         pictureBoxHero2.Image = CardsImageManager.GetImageCard((Card)heroArray[1].ConvertStringCardToByte());
     }
     else
     {
         pictureBoxHero1.Image = CardsImageManager.GetShirt();
         pictureBoxHero2.Image = CardsImageManager.GetShirt();
     }
 }
Ejemplo n.º 4
0
 private void DrawMuckCards(HudTable hudTable)
 {
     var muck = hudTable.GetMucking();
     if (muck != null)
     {
         var cardsArray = muck.Cards.Split(',');
         muckLabel.Text = muck.PlayerName;
         pictureBoxMuck1.Image = CardsImageManager.GetImageCard((Card)cardsArray[0].ConvertStringCardToByte());
         pictureBoxMuck2.Image = CardsImageManager.GetImageCard((Card)cardsArray[1].ConvertStringCardToByte());
     }
     else
     {
         muckLabel.Text = "Mucking:";
         pictureBoxMuck1.Image = CardsImageManager.GetShirt();
         pictureBoxMuck2.Image = CardsImageManager.GetShirt();
     }
 }