Пример #1
0
 void OnPlayerActionTaken_Console(object sender, PlayerActionEventArgs e)
 {
     if (InvokeRequired)
     {
         // We're not in the UI thread, so we need to call BeginInvoke
         BeginInvoke(new EventHandler<PlayerActionEventArgs>(OnPlayerActionTaken_Console), new[] { sender, e });
         return;
     }
     WriteLine(e.Player.Name + " did [" + e.Action.ToString() + "]");
 }
Пример #2
0
 void OnPlayerActionTaken(object sender, PlayerActionEventArgs e)
 {
     if (InvokeRequired)
     {
         // We're not in the UI thread, so we need to call BeginInvoke
         BeginInvoke(new EventHandler<PlayerActionEventArgs>(OnPlayerActionTaken), new[] { sender, e });
         return;
     }
     SuspendLayout();
     var p = e.Player;
     var php = m_Huds[p.NoSeat];
     var bet = m_Bets[p.NoSeat];
     var table = m_Game.Table;
     php.SetMoney(p.MoneySafeAmnt);
     php.SetSleeping();
     php.DoAction(e.Action, e.AmountPlayed);
     lblTotalPot.Text = Resources.PlayerHud_SetMoney_Dollar + table.TotalPotAmnt;
     if (e.Action == GameActionEnum.Fold)
         php.SetCards(GameCard.NoCard, GameCard.NoCard);
     if (p.MoneyBetAmnt > 0)
         bet.Text = Resources.PlayerHud_SetMoney_Dollar + p.MoneyBetAmnt;
     ResumeLayout();
 }