Пример #1
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;
        }
Пример #2
0
 private void OnPlayersInfoChanged(PlayersInfoChangedEventArgs e)
 {
     EventHandler<PlayersInfoChangedEventArgs> handler = PlayersInfoChanged;
     if (handler != null)
     {
         handler(this, e);
     }
 }
Пример #3
0
 private void gameLogic_PlayersInfoChanged(object sender, PlayersInfoChangedEventArgs e)
 {
     m_BoardForm.NamesView.UpdateInfo(e);
 }