예제 #1
0
 private void CallCompletedAction()
 {
     if (this.completedAction != null)
     {
         ComputerMoveData result = new ComputerMoveData
         {
             Move      = this.PlayLocation,
             Time      = this.MoveTime,
             IsGameWon = this.IsGameWon,
             PlayerX   = this.MoveIsPlayerX()
         };
         Action callWrapper = () => this.completedAction(result);
         Application.Current.Dispatcher.BeginInvoke(callWrapper);
     }
 }
예제 #2
0
 private void CallCompletedAction()
 {
     if (this.completedAction != null)
     {
         ComputerMoveData result = new ComputerMoveData
             {
                 Move = this.PlayLocation,
                 Time = this.MoveTime,
                 IsGameWon = this.IsGameWon,
                 PlayerX = this.MoveIsPlayerX()
             };
         Action callWrapper = () => this.completedAction(result);
         Application.Current.Dispatcher.BeginInvoke(callWrapper);
     }
 }