private void NewComment() { EditCommentWindow ecw = new EditCommentWindow(); ecw.ShowDialog(); if (!ecw.Cancelled) { Comment comment = ecw.GetData(); comments.Add(new CommentViewModel(comment)); } }
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())); } }