Exemplo n.º 1
0
 private void _KListener_KeyUp(object sender, KB_Hook.RawKeyEventArgs args)
 {
     if (Config.AppSettings.ToggleMeasureWindowShortCut.IsPressed(args.Key, checkModifiers()))
     {
         hideToggledWindow();
     }
 }
Exemplo n.º 2
0
 private void _KListener_KeyDown(object sender, KB_Hook.RawKeyEventArgs args)
 {
     try {
         var key  = args.Key;
         var mods = checkModifiers();
         if (Config.AppSettings.ToggleMeasureWindowShortCut.IsPressed(args.Key, mods))
         {
             _toggledWindow = _toggledWindow ?? showMeasureWnd();
         }
         else if (Config.AppSettings.ShowHideMeasureWindowShortCut.IsPressed(args.Key, mods))
         {
             if (isMeasureWndVisible())
             {
                 hideMeasureWnd();
             }
             else
             {
                 showMeasureWnd();
             }
         }
     } catch (Exception e) {
         handleException(e);
     }
 }