コード例 #1
0
 /// <summary>
 /// The timer call this at every tick.
 /// </summary>
 /// <param name="sender">Provides data for the Timer.Elapsed event</param>
 /// <param name="e">The caller object. This class: ReversiGameModel.</param>
 private void Timer_Elapsed(object sender, TimerElapsedEventArgs e)
 {
     if (_isPlayer1TurnOn)
     {
         ++(_data.Player1Time);
         OnUpdatePlayerTime(new ReversiUpdatePlayerTimeEventArgs(_isPlayer1TurnOn, _data.Player1Time));
     }
     else
     {
         ++(_data.Player2Time);
         OnUpdatePlayerTime(new ReversiUpdatePlayerTimeEventArgs(_isPlayer1TurnOn, _data.Player2Time));
     }
 }
コード例 #2
0
 /// <summary>
 /// The timer call this at every tick.
 /// </summary>
 /// <param name="sender">Provides data for the Timer.Elapsed event</param>
 /// <param name="e">The caller object. This class: ReversiGameModel.</param>
 private void Timer_Elapsed(object sender, TimerElapsedEventArgs e)
 {
     if (_isPlayer1TurnOn)
     {
         ++(_data.Player1Time);
         OnUpdatePlayerTime(new ReversiUpdatePlayerTimeEventArgs(_isPlayer1TurnOn, _data.Player1Time));
     }
     else
     {
         ++(_data.Player2Time);
         OnUpdatePlayerTime(new ReversiUpdatePlayerTimeEventArgs(_isPlayer1TurnOn, _data.Player2Time));
     }
 }