示例#1
0
 private void GameOver(ChessClientPlayer player, ChessWinner r)
 {
     this.InvokeIfRequired(() =>
         {
             if (r != (ChessWinner)0) MessageBox.Show((r == ChessWinner.StaleMate ? "Stalemate" : r.ToString() + " wins") + "!", "Game Over");
             else MessageBox.Show("A player quit.");
             this.Close();
         });
 }
示例#2
0
 private void GameChanged(ChessClientPlayer player, bool inGame)
 {
     if (inGame)
     {
         this.InvokeIfRequired(() =>
             {
                 this.Board = this.CreateGame();
                 this.Board.Player = this.Player;
                 this.Toggle(false);
                 this.Board.Show();
                 this.Board.Activate();
             });
     }
     else
     {
         this.InvokeIfRequired(() =>
         {
             this.Toggle(true);
             this.Activate();
         });
     }
 }