void HandlePlayersSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { team.List.Swap(p1, p2); teamtagger.Substitute(p1, p2, team); Edited = true; }
public SubstitutionEvent SubsitutePlayer(LMTeam team, LMPlayer playerIn, LMPlayer playerOut, SubstitutionReason reason, Time subsTime) { LineupEvent lineup; SubstitutionEvent se; lineup = Timeline.OfType <LineupEvent> ().FirstOrDefault(); if (lineup == null) { throw new SubstitutionException(Catalog.GetString("No lineup events found")); } if (subsTime < lineup.EventTime) { throw new SubstitutionException(Catalog.GetString("A substitution can't happen before the lineup event")); } se = new SubstitutionEvent(); se.EventType = SubstitutionsEventType; se.In = playerIn; se.Out = playerOut; se.Reason = reason; se.EventTime = subsTime; se.Teams.Add(team); Timeline.Add(se); return(se); }
public SubstitutionEvent SubsitutePlayer(Team template, Player playerIn, Player playerOut, SubstitutionReason reason, Time subsTime) { TeamType team; LineupEvent lineup; SubstitutionEvent se; if (template == LocalTeamTemplate) { team = TeamType.LOCAL; } else { team = TeamType.VISITOR; } lineup = Timeline.OfType <LineupEvent> ().FirstOrDefault(); if (lineup == null) { throw new SubstitutionException(Catalog.GetString("No lineup events found")); } if (subsTime < lineup.EventTime) { throw new SubstitutionException(Catalog.GetString("A substitution can't happen before the lineup event")); } se = new SubstitutionEvent(); se.EventType = SubstitutionsEventType; se.In = playerIn; se.Out = playerOut; se.Reason = reason; se.EventTime = subsTime; se.Team = team; Timeline.Add(se); return(se); }
public void EmitSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { if (PlayerSubstitutionEvent != null) { PlayerSubstitutionEvent(team, p1, p2, reason, time); } }
void HandlePlayersSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { widget.ReDraw(); if (PlayersSubstitutionEvent != null) { PlayersSubstitutionEvent(team, p1, p2, reason, time); } }
void HandlePlayersSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { tagger.Substitute(p1, p2, team); if (team.ID == homeTeam.ID) { homeTeam.List.Swap(p1, p2); } else { awayTeam.List.Swap(p1, p2); } }
void HandlePlayerSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { if (openedProject != null) { TimelineEvent evt; try { evt = openedProject.SubsitutePlayer(team, p1, p2, reason, time); analysisWindow.AddPlay(evt); filter.Update(); } catch (SubstitutionException ex) { guiToolkit.ErrorMessage(ex.Message); } } }
public void EmitSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { if (PlayerSubstitutionEvent != null) { PlayerSubstitutionEvent (team, p1, p2, reason, time); } }
void HandlePlayersSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { team.List.Swap (p1, p2); teamtagger.Substitute (p1, p2, team); }
void HandlePlayersSubstitutionEvent(SportsTeam team, PlayerLongoMatch p1, PlayerLongoMatch p2, SubstitutionReason reason, Time time) { tagger.Substitute (p1, p2, team); if (team.ID == homeTeam.ID) { homeTeam.List.Swap (p1, p2); } else { awayTeam.List.Swap (p1, p2); } }
public SubstitutionEvent SubsitutePlayer(SportsTeam team, PlayerLongoMatch playerIn, PlayerLongoMatch playerOut, SubstitutionReason reason, Time subsTime) { LineupEvent lineup; SubstitutionEvent se; lineup = Timeline.OfType<LineupEvent> ().FirstOrDefault (); if (lineup == null) { throw new SubstitutionException (Catalog.GetString ("No lineup events found")); } if (subsTime < lineup.EventTime) { throw new SubstitutionException (Catalog.GetString ("A substitution can't happen before the lineup event")); } se = new SubstitutionEvent (); se.EventType = SubstitutionsEventType; se.In = playerIn; se.Out = playerOut; se.Reason = reason; se.EventTime = subsTime; se.Teams.Add (team); Timeline.Add (se); return se; }
void HandlePlayersSubstitutionEvent(SportsTeam team, PlayerLongoMatch p1, PlayerLongoMatch p2, SubstitutionReason reason, Time time) { team.List.Swap (p1, p2); teamtagger.Substitute (p1, p2, team); Edited = true; }
void HandlePlayersSubstitutionEvent(SportsTeam team, PlayerLongoMatch p1, PlayerLongoMatch p2, SubstitutionReason reason, Time time) { App.Current.EventsBroker.Publish<PlayerSubstitutionEvent> ( new PlayerSubstitutionEvent { Team = team, Player1 = p1, Player2 = p2, SubstitutionReason = reason, Time = time } ); }
void HandlePlayersSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { Config.EventsBroker.EmitSubstitutionEvent(team, p1, p2, reason, time); }
void HandlePlayerSubstitutionEvent(Team team, Player p1, Player p2, SubstitutionReason reason, Time time) { if (openedProject != null) { TimelineEvent evt; try { evt = openedProject.SubsitutePlayer (team, p1, p2, reason, time); analysisWindow.AddPlay (evt); filter.Update (); } catch (SubstitutionException ex) { guiToolkit.ErrorMessage (ex.Message); } } }
void HandlePlayersSubstitutionEvent(SportsTeam team, PlayerLongoMatch p1, PlayerLongoMatch p2, SubstitutionReason reason, Time time) { widget?.ReDraw (); if (PlayersSubstitutionEvent != null) { PlayersSubstitutionEvent (team, p1, p2, reason, time); } }