public bool OnPreKeyEvent(IWebBrowser browserControl, IBrowser browser, KeyType type, int keyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut)
        {
            if (type == KeyType.KeyUp && keyCode == (int)Keys.F5)
            {
                ReloadRequested?.Invoke();

                return(true);
            }

            return(false);
        }
        public void Reload()
        {
            if (_browserWindow == null)
            {
                throw new InvalidOperationException(MessageBrowserWindowNotAvailable);
            }

            ReloadRequested?.Invoke(this, EventArgs.Empty);

            _browserWindow.Reload();
        }
Example #3
0
        public bool OnPreKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int keyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut)
        {
            if (IsReloadShortcut(type, keyCode, modifiers))
            {
                isKeyboardShortcut = true;
                ReloadRequested?.Invoke();
                return(true);
            }

            return(false);
        }
Example #4
0
 public void Reload()
 => ReloadRequested?.Invoke(this, EventArgs.Empty);
 public override void Start()
 {
     ReloadRequested?.Invoke(this, new EventArgs());
 }