Ejemplo n.º 1
0
        private void NewComment()
        {
            EditCommentWindow ecw = new EditCommentWindow();

            ecw.ShowDialog();

            if (!ecw.Cancelled)
            {
                Comment comment = ecw.GetData();
                comments.Add(new CommentViewModel(comment));
            }
        }
Ejemplo n.º 2
0
        private void EditComment()
        {
            if (SelectedComment == null)
            {
                return;
            }

            var ecw = new EditCommentWindow(SelectedComment);

            ecw.ShowDialog();

            if (!ecw.Cancelled)
            {
                comments.Remove(SelectedComment);
                comments.Add(new CommentViewModel(ecw.GetData()));
            }
        }