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

            ecw.ShowDialog();

            if (!ecw.Cancelled)
            {
                Comment comment = ecw.GetData();
                comments.Add(new CommentViewModel(comment));
            }
        }
Esempio n. 2
0
        private void OnOpenCommentWindow_(object sender, RoutedEventArgs e)
        {
            if (!(DataContext is IssueVm issueVm))
            {
                return;
            }

            var window = new EditCommentWindow(new IssueVm(issueVm), null);

            window.Show();
            issueVm.CancelCommentCmd.Execute(null);
        }
Esempio n. 3
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()));
            }
        }