public PositionTagger(IWidget widget, Project project, List <TimelineEvent> plays, Image background, FieldPositionType position) : base(widget) { Project = project; Background = background; Plays = plays; FieldPosition = position; BackgroundColor = Config.Style.PaletteBackground; }
public PositionTagger(IWidget widget, ProjectLongoMatch project, List<TimelineEventLongoMatch> plays, Image background, FieldPositionType position) : base(widget) { Project = project; Background = background; Plays = plays; FieldPosition = position; BackgroundColor = App.Current.Style.PaletteBackground; }
public List<Coordinates> GetFieldCoordinates(FieldPositionType pos) { switch (pos) { case FieldPositionType.Field: return events.Where (e => e.FieldPosition != null).Select (e => e.FieldPosition).ToList (); case FieldPositionType.HalfField: return events.Where (e => e.HalfFieldPosition != null).Select (e => e.HalfFieldPosition).ToList (); default: return events.Where (e => e.GoalPosition != null).Select (e => e.GoalPosition).ToList (); } }
public List<Coordinates> GetFieldCoordinates (FieldPositionType pos) { switch (pos) { case FieldPositionType.Field: return events.Where (e => e.FieldPosition != null).Select (e => e.FieldPosition).ToList (); case FieldPositionType.HalfField: return events.Where (e => e.HalfFieldPosition != null).Select (e => e.HalfFieldPosition).ToList (); default: return events.Where (e => e.GoalPosition != null).Select (e => e.GoalPosition).ToList (); } }
public List<Coordinates> GetFieldCoordinates(TeamType team, FieldPositionType pos) { List<TimelineEvent> evts = EventsForTeam (team); switch (pos) { case FieldPositionType.Field: return evts.Where (e => e.FieldPosition != null).Select (e => e.FieldPosition).ToList (); case FieldPositionType.HalfField: return evts.Where (e => e.HalfFieldPosition != null).Select (e => e.HalfFieldPosition).ToList (); default: return evts.Where (e => e.GoalPosition != null).Select (e => e.GoalPosition).ToList (); } }
// FIXME: Make more flexible (& improve the names) public Coordinates CoordinatesInFieldPosition(FieldPositionType pos) { switch (pos) { case FieldPositionType.Field: return(FieldPosition); case FieldPositionType.HalfField: return(HalfFieldPosition); case FieldPositionType.Goal: return(GoalPosition); } return(null); }
public Image GetBackground(FieldPositionType pos) { switch (pos) { case FieldPositionType.Field: return(Dashboard.FieldBackground); case FieldPositionType.HalfField: return(Dashboard.HalfFieldBackground); case FieldPositionType.Goal: return(Dashboard.GoalBackground); } return(null); }
public List <Coordinates> GetFieldCoordinates(TeamType team, FieldPositionType pos) { List <TimelineEvent> evts = EventsForTeam(team); switch (pos) { case FieldPositionType.Field: return(evts.Where(e => e.FieldPosition != null).Select(e => e.FieldPosition).ToList()); case FieldPositionType.HalfField: return(evts.Where(e => e.HalfFieldPosition != null).Select(e => e.HalfFieldPosition).ToList()); default: return(evts.Where(e => e.GoalPosition != null).Select(e => e.GoalPosition).ToList()); } }
void ReplaceField(FieldPositionType fieldPosition, Image background = null) { switch (fieldPosition) { case FieldPositionType.Field: ViewModel.FieldBackground = background ?? App.Current.FieldBackground; break; case FieldPositionType.HalfField: ViewModel.HalfFieldBackground = background ?? App.Current.HalfFieldBackground; break; case FieldPositionType.Goal: ViewModel.GoalBackground = background ?? App.Current.GoalBackground; break; } }
public void UpdateCoordinates(FieldPositionType pos, RangeObservableCollection <Point> points) { Coordinates co = new Coordinates(); co.Points = points; switch (pos) { case FieldPositionType.Field: FieldPosition = co; break; case FieldPositionType.HalfField: HalfFieldPosition = co; break; case FieldPositionType.Goal: GoalPosition = co; break; } }
public FieldPosition(FieldPositionType type, Vector2 position, int id = -1) { _type = type; _position = position; _id = id; }
public void UpdateCoordinates(FieldPositionType pos, List<Point> points) { Coordinates co = new Coordinates (); co.Points = points; switch (pos) { case FieldPositionType.Field: FieldPosition = co; break; case FieldPositionType.HalfField: HalfFieldPosition = co; break; case FieldPositionType.Goal: GoalPosition = co; break; } }
public Coordinates CoordinatesInFieldPosition(FieldPositionType pos) { switch (pos) { case FieldPositionType.Field: return FieldPosition; case FieldPositionType.HalfField: return HalfFieldPosition; case FieldPositionType.Goal: return GoalPosition; } return null; }