예제 #1
0
 void OnPlayerWonPot_Console(object sender, PotWonEventArgs e)
 {
     if (InvokeRequired)
     {
         // We're not in the UI thread, so we need to call BeginInvoke
         BeginInvoke(new EventHandler<PotWonEventArgs>(OnPlayerWonPot_Console), new[] { sender, e });
         return;
     }
     WriteLine(e.Player.Name + " won pot ($" + e.AmountWon + ") with " + e.Hand + " [" + string.Join(",", e.Cards) + "]");
 }
예제 #2
0
 void OnPlayerWonPot(object sender, PotWonEventArgs e)
 {
     if (InvokeRequired)
     {
         // We're not in the UI thread, so we need to call BeginInvoke
         BeginInvoke(new EventHandler<PotWonEventArgs>(OnPlayerWonPot), new[] { sender,e });
         return;
     }
     SuspendLayout();
     var p = e.Player;
     var php = m_Huds[p.NoSeat];
     php.SetMoney(p.MoneySafeAmnt);
     php.SetWinning();
     ResumeLayout();
 }