public bool OnPreKeyEvent(CefSharp.IWebBrowser browserControl, CefSharp.KeyType type, int windowsKeyCode, int nativeKeyCode, CefSharp.CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut) { if (windowsKeyCode == (int)Keys.F12) { Program.Form.ChromiumBrowser.ShowDevTools(); } return(false); }
bool CefSharp.IContextMenuHandler.OnContextMenuCommand(CefSharp.IWebBrowser browserControl, CefSharp.IBrowser browser, CefSharp.IFrame frame, CefSharp.IContextMenuParams parameters, CefSharp.CefMenuCommand commandId, CefSharp.CefEventFlags eventFlags) { //throw new NotImplementedException(); return(false); }
bool CefSharp.IContextMenuHandler.OnContextMenuCommand(CefSharp.IWebBrowser browserControl, CefSharp.IBrowser browser, CefSharp.IFrame frame, CefSharp.IContextMenuParams parameters, CefSharp.CefMenuCommand commandId, CefSharp.CefEventFlags eventFlags) { return(false); }
public bool OnKeyEvent(CefSharp.IWebBrowser browserControl, CefSharp.KeyType type, int windowsKeyCode, CefSharp.CefEventFlags modifiers, bool isSystemKey) { return(false); }
public bool OnContextMenuCommand(CefSharp.IWebBrowser chromiumWebBrowser, CefSharp.IBrowser browser, CefSharp.IFrame frame, CefSharp.IContextMenuParams parameters, CefSharp.CefMenuCommand commandId, CefSharp.CefEventFlags eventFlags) { switch (commandId) { case CefSharp.CefMenuCommand.ViewSource: if (ViewSource != null) { ViewSource(this, new EventArgs()); } return(true); case (CefSharp.CefMenuCommand)OpenLink: case (CefSharp.CefMenuCommand)OpenLinkSource: { if (OpenLinkOrSource != null) { OpenLinkOrSource(this, new OpenLinkOrSourceArgs(parameters.LinkUrl, commandId == (CefSharp.CefMenuCommand)OpenLinkSource)); } } return(true); case (CefSharp.CefMenuCommand)CopyImage: { if (CopyImageToClipboard != null) { CopyImageToClipboard(this, new CopyImageEventArgs(parameters.SourceUrl)); } } return(true); case (CefSharp.CefMenuCommand)OpenDevTool: { if (ShowDevTool != null) { ShowDevTool(this, new EventArgs()); } } return(true); case (CefSharp.CefMenuCommand)CopyLink: { Clipboard.SetText(parameters.LinkUrl); } return(true); case (CefSharp.CefMenuCommand)OpenLoadScript: { if (LoadScript != null) { LoadScript(this, new EventArgs()); } } return(true); default: break; } return(false); }