Пример #1
0
 /// <summary>
 /// Method to click a LMPlayerVM
 /// </summary>
 /// <param name="player">Player.</param>
 /// <param name="modifier">Modifier.</param>
 public void PlayerClick(LMPlayerVM player, ButtonModifier modifier)
 {
     App.Current.EventsBroker.Publish(new TagPlayerEvent {
         Player   = player,
         Team     = GetTeam(player),
         Modifier = modifier,
         Sender   = player
     });
 }
Пример #2
0
 LMTeamVM GetTeam(LMPlayerVM player)
 {
     if (HomeTeam != null)
     {
         if (HomeTeam.ViewModels.Contains(player))
         {
             return(HomeTeam);
         }
     }
     if (AwayTeam != null)
     {
         if (AwayTeam.ViewModels.Contains(player))
         {
             return(AwayTeam);
         }
     }
     return(null);
 }