Exemple #1
0
        private void OnPlayersInfoChanged(PlayersInfoChangedEventArgs e)
        {
            EventHandler <PlayersInfoChangedEventArgs> handler = PlayersInfoChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemple #2
0
        public void UpdateInfo(PlayersInfoChangedEventArgs e)
        {
            if (!m_CurrentName.Equals(e.CurrentPlayerName))
            {
                GameViewSettings.SwapCurrentPlayerColor();
            }

            m_FirstName               = e.FirstPlayerName;
            m_SecondName              = e.SecondPlayerName;
            m_CurrentName             = e.CurrentPlayerName;
            r_FirstPlayer.Text        = createPlayerText(e.FirstPlayerName, e.FirstPlayerScore);
            r_SecondPlayer.Text       = createPlayerText(e.SecondPlayerName, e.SecondPlayerScore);
            r_CurrentPlayer.Text      = createCurrentPlayerText(m_CurrentName);
            r_CurrentPlayer.BackColor = GameViewSettings.CurrentPlayerColor;
        }
Exemple #3
0
 private void gameLogic_PlayersInfoChanged(object sender, PlayersInfoChangedEventArgs e)
 {
     m_BoardForm.NamesView.UpdateInfo(e);
 }