public void LoadFromHighliteTarget(HighliteTarget target, int id) { switch (target) { case HighliteTarget.Trip: _album = _albumService.GetTripAlbum(id); break; case HighliteTarget.Location: _album = _albumService.GetLocationAlbum(id); break; case HighliteTarget.Place: _album = _albumService.GetPlaceAlbum(id); break; default: throw new NotImplementedException(); } Sections = new ObservableCollection <AlbumSectionViewModel>(); _album.Sections.ForEach(s => Sections.Add(CreateAlbumSections(s))); }
private IHighliteItem DoCreateHighliteItem(int targetId, Photo photo, int count, HighliteTarget target, string title) { Debug.Assert(photo.Location != null); var item = new HighliteItem() { TargetId = targetId, DisplayName = title, Target = target, PhotoUrl = photo.PhotoUrl, Thumbnail = photo.PhotoUrl, Description = target.GetDescription() }; return(item); }
//order by & and other stuff public HighliteSelectOptions(HighliteTarget target) { Target = target; }