Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
     }
 }