예제 #1
0
        private MeasureWnd createWindowForScreen(System.Windows.Forms.Screen screen)
        {
            var ret = new MeasureWnd(screen);

            _MeasureWnds.Add(screen.DeviceName, ret);
            System.Diagnostics.Debug.WriteLine($"Created window for screen {screen.DeviceName}");
            return(ret);
        }
예제 #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);
     }
 }
예제 #3
0
 private void hideToggledWindow()
 {
     _toggledWindow?.Hide();
     _toggledWindow = null;
 }