Beispiel #1
0
        public void HardcodedInitialDiscussion()
        {
            Discussion discussion       = new Discussion(100, "Lawrence", "Is there even a point to stand alone cameras?", "Google keeps mentioning how amazing the Pixel 2 camera is with its machine learning stuffs, and in general phone cameras are super convenient. Is there even a point to them anymore?", 3);
            Comment    commentWithReply = new Comment("Angela", "I'll be honest, all I need at this point is my Google Pixel.");

            commentWithReply.repliesFeed.Children.Add(new Comment("Lawrence", "This is exactly what I mean, why should I pay $2000 for a stand alone camer?"));
            discussion.GetComments().Add(commentWithReply);
            discussion.GetComments().Add(new Comment("Anonymoose", "Point and shoots barely have a purpose now, but DSLRs and professional gear are still relevant. For any regular user, a phone is fine. But think about the professionals who need the features of a DSLR. Manual focus and switching lenses is a big deal, let alone the massive boost in quality. They let you be more creative, as opposed to shooting a picture the same way every time."));
            discussion.main       = this.parent;
            discussion.numReplies = 3;
            discussionDict.Add(100, discussion);

            discussion = new Discussion(101, "Lean", "Pixel 2 Portrait Mode", "Isn't it crazy that these images are created through machine learning?", 2);
            discussion.GetComments().Add(new Comment("Lawrence", "It's insane that our phone camera technology can do that nowadays!"));
            discussion.GetComments().Add(new Comment("Emilio", "My moto g does the job just fine."));
            discussion.main = this.parent;
            discussionDict.Add(101, discussion);

            discussion       = new Discussion(102, "Jessi", "Good places to take mountain pictures in Alberta?", "I'm visiting Alberta this summer, and was wondering what the best places to take mountain pictures are. Ideally they would be near the Banff area.", 2);
            discussion.score = 1;
            discussion.GetComments().Add(new Comment("Lawrence", "Lake Louise looks spectacular during the summer! Just go early to avoid the crowds."));
            discussion.GetComments().Add(new Comment("Anonymoose", "Basically anywhere near the rockies. Alberta is pretty amazing like that."));
            discussion.numReplies = 2;
            discussion.main       = this.parent;
            discussionDict.Add(102, discussion);

            /*
             * discussionDict.Add(100, new Discussion(100, "User2", "Looking to shoot film, what do I need to know?", "description", 24));
             * discussionDict.Add(101, new Discussion(101, "User3", "You all take beautiful photographs. Can I do the same with just an iPhone?", "description", 23));
             * discussionDict.Add(102, new Discussion(102, "User4", "Do you understand your histograms?", "description", 9));
             * discussionDict.Add(103, new Discussion(103, "User5", "Anyone excited for the new capture clip v3?", "description", 0));
             * discussionDict.Add(104, new Discussion(104, "User6", "Who else is excited for snow photography???", "description", 29));
             * discussionDict.Add(105, new Discussion(105, "User7", "Advice needed on having one of my pictures enlarged to 9ft tall.", "description", 42));*/
        }
 private void DisplayComments()
 {
     commentsFeed.Children.Clear();
     foreach (Comment c in discussion.GetComments())
     {
         Comment copy = new Comment(c);
         copy.parent = this;
         commentsFeed.Children.Add(copy);
     }
 }
        public ProfilePageOtherUser(MainWindow main)
        {
            InitializeComponent();

            this.main = main;

            userName.Content = "Lawrence";

            // Determine whether this user is being followed.
            if (main.followingSomeone)
            {
                followButton.Content = "Unfollow";
            }
            else
            {
                followButton.Content = "Follow";
            }

            // Create a photo and discussion.
            photo              = new Photo(103, "Images/miami.jpg");
            photo.username     = "******";
            photo.title        = "From my trip in miami";
            photo.score        = 5;
            photo.commentCount = 1;
            photo.comments.Add(new Comment("Emilio", "I see that hotel in so many miami nightlife pictures. Has some cool lighting"));
            photo.displaySideInfo();
            photo.sidePhotoInfo.Visibility = Visibility.Collapsed;
            photo.main = this.main;
            photo.MouseLeftButtonDown += ClickPost;

            discussion       = new Discussion(100, "Lawrence", "Is there even a point to stand alone cameras?", "Google keeps mentioning how amazing the Pixel 2 camera is with its machine learning stuffs, and in general phone cameras are super convenient. Is there even a point to them anymore?", 3);
            discussion.score = -1;
            Comment commentWithReply = new Comment("Angela", "I'll be honest, all I need at this point is my Google Pixel.");

            commentWithReply.repliesFeed.Children.Add(new Comment("Lawrence", "This is exactly what I mean, why should I pay $2000 for a stand alone camer?"));
            discussion.GetComments().Add(commentWithReply);
            discussion.GetComments().Add(new Comment("Anonymoose", "Point and shoots barely have a purpose now, but DSLRs and professional gear are still relevant. For any regular user, a phone is fine. But think about the professionals who need the features of a DSLR. Manual focus and switching lenses is a big deal, let alone the massive boost in quality. They let you be more creative, as opposed to shooting a picture the same way every time."));
            discussion.main                 = this.main;
            discussion.numReplies           = 3;
            discussion.MouseLeftButtonDown += ClickPost;

            // Photo = 5 Score, 1 Comment, Discussion = -1 score, 3 comments
            userProfileFeed.Children.Add(photo);
            userProfileFeed.Children.Add(discussion);

            currentFilterOption.Content = filterAll.Content;
        }
Beispiel #4
0
        /// <summary>
        /// Creates a new following page that is either empty or has some posts of the people the user is following.
        /// Hard-coded.
        /// </summary>
        /// <param name="main"> The MainWindow the following page is created in. </param>
        /// <param name="followingFlag"> If set to false, no posts appear. If true, will show 2 hardcoded posts. </param>
        public FollowingPage(MainWindow main, bool followingFlag)
        {
            InitializeComponent();

            parent = main;

            if (followingFlag == true)
            {
                // Create a photo and discussion.
                photo              = new Photo(103, "Images/miami.jpg");
                photo.username     = "******";
                photo.title        = "From my trip in miami";
                photo.score        = 5;
                photo.commentCount = 1;
                photo.comments.Add(new Comment("Emilio", "I see that hotel in so many miami nightlife pictures. Has some cool lighting"));
                photo.displaySideInfo();
                photo.main                 = this.parent;
                photo.IsPrivate            = false;
                photo.MouseLeftButtonDown += ClickPost;

                discussion       = new Discussion(100, "Lawrence", "Is there even a point to stand alone cameras?", "Google keeps mentioning how amazing the Pixel 2 camera is with its machine learning stuffs, and in general phone cameras are super convenient. Is there even a point to them anymore?", 3);
                discussion.score = -1;
                Comment commentWithReply = new Comment("Angela", "I'll be honest, all I need at this point is my Google Pixel.");
                commentWithReply.repliesFeed.Children.Add(new Comment("Lawrence", "This is exactly what I mean, why should I pay $2000 for a stand alone camer?"));
                discussion.GetComments().Add(commentWithReply);
                discussion.GetComments().Add(new Comment("Anonymoose", "Point and shoots barely have a purpose now, but DSLRs and professional gear are still relevant. For any regular user, a phone is fine. But think about the professionals who need the features of a DSLR. Manual focus and switching lenses is a big deal, let alone the massive boost in quality. They let you be more creative, as opposed to shooting a picture the same way every time."));
                discussion.main                 = this.parent;
                discussion.numReplies           = 3;
                discussion.MouseLeftButtonDown += ClickPost;

                // Add to the children of feed.
                followingFeed.Children.Add(photo);
                followingFeed.Children.Add(discussion);
            }
            else
            {
                // Clear children of the feed.
                followingFeed.Children.Clear();

                AddEmptyMessage();
            }
        }
        private void InitializePosts()
        {
            photo          = new Photo(102, "Images/Mountains.jpg");
            photo.username = "******";
            photo.title    = "Rate my mountains photo";
            photo.score    = 5;
            photo.displaySideInfo();
            photo.commentCount = 1;
            photo.comments.Add(new Comment("Emilio", "Cool photo. Where was this?"));
            photo.main      = this.parent;
            photo.IsPrivate = false;
            photo.displaySideInfo();

            discussion       = new Discussion(102, "Jessi", "Good places to take mountain pictures in Alberta?", "I'm visiting Alberta this summer, and was wondering what the best places to take mountain pictures are. Ideally they would be near the Banff area.", 2);
            discussion.score = 1;
            discussion.GetComments().Add(new Comment("Lawrence", "Lake Louise looks spectacular during the summer! Just go early to avoid the crowds."));
            discussion.GetComments().Add(new Comment("Anonymoose", "Basically anywhere near the rockies. Alberta is pretty amazing like that."));
            discussion.numReplies = 2;
            discussion.main       = this.parent;

            photo.MouseLeftButtonDown      += ClickPost;
            discussion.MouseLeftButtonDown += ClickPost;
        }