School Commit Init
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
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<PhotoInfo> photosInfo = new List<PhotoInfo>();
|
||||
private SnapshotsService snapshotsService;
|
||||
private CasualProfileService casualProfileService;
|
||||
|
||||
public SeeHighlightPosts(Guid highlightId)
|
||||
{
|
||||
casualProfileService = new CasualProfileService();
|
||||
snapshotsService = casualProfileService.GetSnapshotsService();
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Highlight h = snapshotsService.GetHighlight(highlightId);
|
||||
List<MockPhotoPost> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user