/// <summary> /// ブックマークタイトル編集ダイアログ表示 /// </summary> /// <param name="title">タイトル</param> private DialogResult ShowBookmarkEditor(string title) { var dlg = new BookmarkTitleEditor(); dlg.MainDisplay = this; dlg.BookmarkTitle = title; return dlg.ShowDialog(); }
/// <summary> /// 「ブックマークの追加」クリック /// </summary> private void menuAddBookmark_Click(object sender, EventArgs e) { WebBrowser currentBrowser = this.GetCurrentBrowser(); if (null == currentBrowser) { return; } var dlg = new BookmarkTitleEditor(); dlg.MainDisplay = this; dlg.BookmarkTitle = currentBrowser.DocumentTitle; if (DialogResult.OK == this.ShowBookmarkEditor(currentBrowser.DocumentTitle)) { this.AddBookmarkMenu(this.BookmarkTitle, currentBrowser.Url.ToString()); } }