protected void AddComment(LinkedInGroupPost post, string comment)
        {
            post.Comment(comment);

            // After posting the comment, add it to the post's comment collection, select it, and display the comment in the info box.
            tbComment.Text = "(posted)";
            TreeNode childNode = selectedPostNode.Nodes.Add(comment.LimitLength(64));

            tvGroups.SelectedNode = childNode;
            tbInfo.Text           = comment;
        }
示例#2
0
/*
 *                              foreach (LinkedInGroup group in groups.Result)
 *                              {
 *                                      LinkedInGetGroupPostsOptions postOptions = new LinkedInGetGroupPostsOptions();
 *                                      postOptions.PostOptions.SelectAll();
 *                                      postOptions.GroupId = group.Id;
 *                                      group.LoadPosts(postOptions);
 *
 *                                      foreach (LinkedInGroupPost post in group.Posts)
 *                                      {
 *                                              LinkedInGetGroupPostCommentsOptions commentOptions = new LinkedInGetGroupPostCommentsOptions();
 *                                              commentOptions.CommentOptions.SelectAll();
 *                                              commentOptions.PostId = post.Id;
 *                                              post.LoadComments(commentOptions);
 *
 *                                              foreach (LinkedInGroupComment comment in post.Comments)
 *                                              {
 *                                                      GroupPostComment c = new GroupPostComment() { Group = group, Post = post, Comment = comment };
 *                                                      comments.Add(c);
 *                                              }
 *                                      }
 *                              }
 *                      }
 */

        protected void AddComment(LinkedInGroupPost post, string comment)
        {
            post.Comment(comment);
        }