private void bookmarkCommentButton_Click(object sender, EventArgs e) { BookmarkCommentDlg dlg = new BookmarkCommentDlg(); dlg.Comment = this.bookmarkComment; if (dlg.ShowDialog() == DialogResult.OK) { this.bookmarkComment = dlg.Comment; Dirty(); } }
void BookmarkComment(Bookmark bookmark) { BookmarkCommentDlg dlg = new BookmarkCommentDlg(); dlg.Comment = bookmark.Text; if (dlg.ShowDialog() == DialogResult.OK) { BookmarkProvider.UpdateBookmarkText(bookmark, dlg.Comment); dataGridView.Refresh(); } }