using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using District_3_App.Enitities; using District_3_App.Enitities.Mocks; using District_3_App.Repository; using District_3_App.Service; namespace District_3_App.HighlightsFE { public partial class SeeHighlightPosts : UserControl { private List photosInfo = new List(); private SnapshotsService snapshotsService; private CasualProfileService casualProfileService; public SeeHighlightPosts(Guid highlightId) { casualProfileService = new CasualProfileService(); snapshotsService = casualProfileService.GetSnapshotsService(); InitializeComponent(); Highlight h = snapshotsService.GetHighlight(highlightId); List postsToShow = snapshotsService.GetPostsOfHighlight(highlightId); foreach (MockPhotoPost post in postsToShow) { var photoInfo = new PhotoInfo(post.GetPhoto(), post.GetPostId()); photoInfo.Description = post.GetDescription(); photosInfo.Add(photoInfo); } DataContext = photosInfo; } } }