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);
     }
 }
Exemple #3
0
 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);
             }
         }
     }
 }
Exemple #4
0
 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);
             }
         }
     }
 }
Exemple #5
0
 private void controlsWebView2_AcceleratorKeyPressed(object sender, AcceleratorKeyPressedEventArgs e)
 {
     HandleAcceleratorKey(_activeTabId, e);
 }
Exemple #6
0
 protected override void OnAcceleratorKeyPressed(AcceleratorKeyPressedEventArgs e)
 {
     _parentBrowser.HandleAcceleratorKey(_tabId, e);
     base.OnAcceleratorKeyPressed(e);
 }
Exemple #7
0
 private void OnWebViewAcceleratorKeyPressed(object sender, AcceleratorKeyPressedEventArgs e)
 {
     Trace.TraceInformation("OnWebViewAcceleratorKeyPressed");
     //MessageBox.Show(this, "OnWebViewAcceleratorKeyPressed");
     e.Handled = false;
 }