Exemplo n.º 1
0
 void OnNewCommentAdded(CommentAddedEventArgs args)
 {
     TargetCore.Comments.Add (args.newComment);
     // TODO: Do we save here or what?
 }
Exemplo n.º 2
0
        void AddCommentButtonClicked(object sender, EventArgs e)
        {
            CommentData comment = new CommentData ();

            // Re-create all the comment information
            comment.Title = subjectEntry.Text;
            comment.Author = "Me";
            // TODO TODO TODO - change this
            comment.Content = commentTextView.Buffer.Text;
            comment.PostDate = DateTime.Now;

            CommentAddedEventArgs args = new CommentAddedEventArgs ();
            args.newComment = comment;

            NewCommentAdded (args);

            // now add the comment to the GUI
            AddCommentToGui (comment);

            // Clear out the reply window
            this.commentTextView.Buffer.Text = "";
            this.subjectEntry.Text = "";
        }