Esempio n. 1
0
        /// <summary>
        /// Handles a clicked photo.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void PhotoClick(object sender, MouseButtonEventArgs e)
        {
            Photo      tmp        = (Photo)sender;
            PhotoPopup photoPopup = new PhotoPopup(parent, this, photoDict[tmp.photoId]);

            photoPopup.SetValue(Grid.RowProperty, 2);
            photoPopup.SetValue(Grid.ColumnSpanProperty, 3);
            parent.mainGrid.Children.Add(photoPopup);
        }
Esempio n. 2
0
 private void ClickPost(object sender, MouseEventArgs e)
 {
     if (sender.Equals(discussion))
     {
         DiscussionPopup discussionPopup = new DiscussionPopup(parent, discussion);
         discussionPopup.SetValue(Grid.RowProperty, 2);
         discussionPopup.SetValue(Grid.ColumnSpanProperty, 3);
         parent.mainGrid.Children.Add(discussionPopup);
     }
     else
     {
         PhotoPopup photoPopup = new PhotoPopup(parent, photo);
         photoPopup.SetValue(Grid.RowProperty, 2);
         photoPopup.SetValue(Grid.ColumnSpanProperty, 3);
         parent.mainGrid.Children.Add(photoPopup);
     }
 }
Esempio n. 3
0
 private void ClickPost(object sender, MouseEventArgs e)
 {
     if (sender.GetType() == typeof(Discussion))
     {
         Discussion      temp            = (Discussion)sender;
         DiscussionPopup discussionPopup = new DiscussionPopup(parent, temp);
         discussionPopup.SetValue(Grid.RowProperty, 2);
         discussionPopup.SetValue(Grid.ColumnSpanProperty, 3);
         parent.mainGrid.Children.Add(discussionPopup);
     }
     else if (sender.GetType() == typeof(Photo))
     {
         Photo      temp       = (Photo)sender;
         PhotoPopup photoPopup = new PhotoPopup(parent, temp);
         photoPopup.SetValue(Grid.RowProperty, 2);
         photoPopup.SetValue(Grid.ColumnSpanProperty, 3);
         parent.mainGrid.Children.Add(photoPopup);
     }
 }
Esempio n. 4
0
        public void NotificationClick(object sender, RoutedEventArgs e)
        {
            Button       tmp  = (Button)sender;
            Notification temp = (Notification)tmp.Parent;

            if (temp.notificationContent.Text.ToString().Contains("Lawrence"))
            {
                temp.Read();
            }
            notificationsButtonDropdown.IsOpen = false;
            Photo randomPhoto = new Photo(357, "/Images/trackfield.jpg");

            randomPhoto.title    = "On your marks...";
            randomPhoto.caption  = "I tried a bit of black and white.";
            randomPhoto.username = "******";
            randomPhoto.score    = 2;
            randomPhoto.displaySideInfo();
            PhotoPopup popup = new PhotoPopup(this, randomPhoto);

            popup.SetValue(Grid.RowProperty, 2);
            popup.SetValue(Grid.ColumnSpanProperty, 3);
            mainGrid.Children.Add(popup);
        }