private void BtnDBBrowser_Click(object sender, EventArgs e) { var f = new DBBrowserForm(Application); f.Show(this); }
bool IContextMenuHandler.OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags) { return(Application.ExecuteInExceptionCatcher <bool>(() => { string filePath = null; if (parameters.TypeFlags.HasFlag(ContextMenuType.Link) && new Uri(parameters.LinkUrl).Fragment.StartsWith("#FILE:")) { filePath = Uri.UnescapeDataString(new Uri(parameters.LinkUrl).Fragment.Replace("#FILE:", "")); } switch ((int)commandId) { case ShowDevTools: break; case ShowDebugForm: break; case OpenFile: OwnerForm.OpenFileByResultSelect(filePath); break; case OpenFolder: Process.Start(Path.GetDirectoryName(filePath)); break; } if ((int)commandId == ShowDevTools) { browser.ShowDevTools(); } if ((int)commandId == ShowDBBrowser) { OwnerForm.InvokeOnUIThread((f) => { var f2 = new DBBrowserForm(Application); f2.Show(f); }); } if ((int)commandId == GroongaDebug) { OwnerForm.InvokeOnUIThread((f) => { var f2 = new GroongaDebugForm() { GM = Application.GM }; f2.Show(f); }); } if ((int)commandId == ShowDebugForm) { OwnerForm.InvokeOnUIThread((f) => { var f2 = new DebugForm(Application); f2.Show(f); }); } if ((int)commandId == OpenFile) { } if ((int)commandId == OpenFolder) { } return false; })); }