/// <summary> /// Invoke the 'UpdatePlayerTime' event handler if it is set. /// </summary> /// <param name="arg">The event hadler argumentum.</param> private void OnUpdatePlayerTime(ReversiUpdatePlayerTimeEventArgs arg) { if (UpdatePlayerTime != null) { UpdatePlayerTime(this, arg); } }
/// <summary> /// Model invoked this. One of the player time has advanced. /// </summary> /// <param name="sender">The model. We do not use this.</param> /// <param name="e">The data, which help us update the view.</param> private void Model_UpdatePlayerTime(object sender, ReversiUpdatePlayerTimeEventArgs e) { if (e.IsPlayer1TimeNeedUpdate) { _player1Time = e.NewTime; OnPropertyChanged("Player1Time"); } else { _player2Time = e.NewTime; OnPropertyChanged("Player2Time"); } }
private void model_UpdatePlayerTime(Object sender, ReversiUpdatePlayerTimeEventArgs e) { _eventUpdatePlayerTimeInvoked = true; }