예제 #1
0
 private void BindHotKey()
 {
     if (Program.StartMode == StartMode.Tray)
     {
         if (UseHK)
         {
             if (_hotKeyBinder == null)
             {
                 _hotKeyBinder              = new HotkeyBinder();
                 _hotKeyBinder.Keys         = Keys.PrintScreen;
                 _hotKeyBinder.ModKey       = 0;
                 _hotKeyBinder.WindowHandle = Tray.TrayHandle;
                 _hotKeyBinder.HotKey      += Clipper.TakeSnapshot;
                 _hotKeyBinder.Bind();
             }
         }
         else
         {
             if (_hotKeyBinder != null)
             {
                 _hotKeyBinder.Unbind();
                 _hotKeyBinder = null;
             }
         }
     }
 }
예제 #2
0
 private void BindHotKey()
 {
     if (Program.StartMode == StartMode.Tray)
     {
         if (UseHK)
         {
             if (_hotKeyBinder == null)
             {
                 _hotKeyBinder = new HotkeyBinder();
                 _hotKeyBinder.Keys = Keys.PrintScreen;
                 _hotKeyBinder.ModKey = 0;
                 _hotKeyBinder.WindowHandle = Tray.TrayHandle;
                 _hotKeyBinder.HotKey += Clipper.TakeSnapshot;
                 _hotKeyBinder.Bind();
             }
         }
         else
         {
             if (_hotKeyBinder != null)
             {
                 _hotKeyBinder.Unbind();
                 _hotKeyBinder = null;
             }
         }
     }
 }