private void OnAccessorKeyPressed(object sender, AcceleratorKeyPressedEventArgs e) { uint currentStyle = this.GetWindowStyle(); uint currentExStyle = this.GetWindowExStyle(); if (e.KeyVentType == KeyEventType.KeyDown && e.VirtualKey == Diga.Core.Api.Win32.VirtualKeys.VK_F11) { if (currentStyle == NoneStyle && currentExStyle == NoneExStyle) { this.SetWindowState(WindowState.Normal); this.UpdateStyle(this.OldStyle); this.UpdateExStyle(this.OldExStyle); this.UpdateWidow(); } else { this.OldStyle = currentStyle; this.OldExStyle = currentExStyle; this.SetWindowState(WindowState.Maximized); this.UpdateStyle(NoneStyle); this.UpdateExStyle(NoneExStyle); this.UpdateWidow(); } NativeApp.DoEvents(); } }
protected virtual void OnAcceleratorKeyPressed(AcceleratorKeyPressedEventArgs e) { if (AcceleratorKeyPressed != null) { AcceleratorKeyPressed(this, e); } }
public void HandleAcceleratorKey(int tabId, AcceleratorKeyPressedEventArgs e) { if (e.KeyEventType == WEBVIEW2_KEY_EVENT_TYPE.WEBVIEW2_KEY_EVENT_TYPE_KEY_DOWN) { if (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift)) { if (e.VirtualKey == (uint)Key.H) { string filePath = "Content\\content_ui\\"; filePath = Path.Combine(filePath, "history"); filePath += ".html"; string fullPath = GetFullPathFor(filePath); _tabDictionary[_activeTabId].Navigate(fullPath); } } } }
public void HandleAcceleratorKey(int tabId, AcceleratorKeyPressedEventArgs e) { if (e.KeyEventType == Interop.WEBVIEW2_KEY_EVENT_TYPE.WEBVIEW2_KEY_EVENT_TYPE_KEY_DOWN) { if ((ModifierKeys & Keys.Control) == Keys.Control) { if (e.VirtualKey == (uint)Keys.H) { string filePath = "Content\\content_ui\\"; filePath = Path.Combine(filePath, "history"); filePath += ".html"; string fullPath = GetFullPathFor(filePath); _tabDictionary[_activeTabId].Navigate(fullPath); } } } }
private void controlsWebView2_AcceleratorKeyPressed(object sender, AcceleratorKeyPressedEventArgs e) { HandleAcceleratorKey(_activeTabId, e); }
protected override void OnAcceleratorKeyPressed(AcceleratorKeyPressedEventArgs e) { _parentBrowser.HandleAcceleratorKey(_tabId, e); base.OnAcceleratorKeyPressed(e); }
private void OnWebViewAcceleratorKeyPressed(object sender, AcceleratorKeyPressedEventArgs e) { Trace.TraceInformation("OnWebViewAcceleratorKeyPressed"); //MessageBox.Show(this, "OnWebViewAcceleratorKeyPressed"); e.Handled = false; }