Example #1
0
 protected void Button_Click(object sender, EventArgs e)
 {
     try
     {
         if (sender.Equals(replyButton))
         {
             if (parent.GetType() == typeof(DiscussionPopup))
             {
                 DiscussionPopup castedParent = (DiscussionPopup)parent;
                 castedParent.CommentBoxDefault.Text = "Replying to " + username + "'s comment: \"" + comment + "\". Type a message...";
                 castedParent.SetReplyFlag(1);
                 castedParent.SetCommentToReplyTo(this);
                 castedParent.CommentBox.Focus();
             }
             else if (parent.GetType() == typeof(PhotoPopup))
             {
                 PhotoPopup castedParent = (PhotoPopup)parent;
                 castedParent.commentBoxDefault.Text = "Replying to " + username + "'s comment: \"" + comment + "\". Type a comment...";
                 castedParent.SetReplyFlag(1);
                 castedParent.SetCommentToReplyTo(this);
                 castedParent.commentBox.Focus();
             }
         }
     }
     catch (NullReferenceException exception)
     {
         //This is due to the par
     }
 }
Example #2
0
        /**private void AddDiscussionPostsTest()
         * {
         *  Discussion clickableDiscussion = new Discussion(discussionIdCtr, "User1", "Let's see your best nightlife photos!", "description", 3);
         *  clickableDiscussion.MouseLeftButtonDown += new MouseButtonEventHandler(this.DiscussionClickTest);
         *  clickableDiscussion.Name = "discussion1";
         *
         *  discussionFeed.Children.Add(clickableDiscussion);
         *
         *  discussionFeed.Children.Add(new Discussion(discussionIdCtr, "User2", "Looking to shoot film, what do I need to know?", "description", 24));
         *  discussionFeed.Children.Add(new Discussion(discussionIdCtr, "User3", "You all take beautiful photographs. Can I do the same with just an iPhone?", "description", 23));
         *  discussionFeed.Children.Add(new Discussion(discussionIdCtr, "User4", "Do you understand your histograms?", "description", 9));
         *  discussionFeed.Children.Add(new Discussion(discussionIdCtr, "User5", "Anyone excited for the new capture clip v3?", "description", 0));
         *  discussionFeed.Children.Add(new Discussion(discussionIdCtr, "User6", "Who else is excited for snow photography???", "description", 29));
         *  discussionFeed.Children.Add(new Discussion(discussionIdCtr, "User7", "Advice needed on having one of my pictures enlarged to 9ft tall.", "description", 42));
         * }**/

        /**private void DiscussionClick(object sender, MouseButtonEventArgs e)
         * {
         *  if (sender.GetType().Equals(typeof(Discussion)))
         *  {
         *      Discussion senderCast = (Discussion) sender;
         *      if (senderCast.Name == "discussion1")
         *      {
         *          DiscussionPage popUp = new DiscussionPage();
         *          popUp.popUpPageFill.Fill = new SolidColorBrush(Colors.Black);
         *          popUp.popUpPageFill.Visibility = Visibility.Visible;
         *          discussionContentControl.Content = popUp;
         *          popUp.discussionPopUpWindow.IsOpen = true;
         *      }
         *  }
         * }**/

        private void DiscussionClickTest(object sender, MouseButtonEventArgs e)
        {
            Discussion      tmp             = (Discussion)sender;
            DiscussionPopup discussionPopup = new DiscussionPopup(parent, this, tmp);

            discussionPopup.SetValue(Grid.RowProperty, 2);
            discussionPopup.SetValue(Grid.ColumnSpanProperty, 3);
            parent.mainGrid.Children.Add(discussionPopup);
        }
Example #3
0
 public Comment(string username, string comment, DiscussionPopup parent)
 {
     InitializeComponent();
     this.username     = username;
     this.comment      = comment;
     usernameText.Text = username;
     commentBox.Text   = comment;
     this.parent       = parent;
     CurrentUser       = false;
 }
Example #4
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);
     }
 }
Example #5
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);
     }
 }
        public HelpPromptPopup(DiscussionPopup parent)
        {
            InitializeComponent();

            this.parent = parent;
        }
        public MessageDevelopmentPrompt(DiscussionPopup parent)
        {
            InitializeComponent();

            this.parent = parent;
        }