protected override void WndProc(ref Message m)
            {
                if (m.Msg == WM_HOTKEY)
                {
                    HotKeyEventArgs e = new HotKeyEventArgs(m.LParam, m.WParam);
                    HotKeyManager.OnHotKeyPressed(e);
                }

                base.WndProc(ref m);
            }
 public static void SendActiveWindowToBack(object sender = null, HotKeyEventArgs e = null)
 {
     SendActiveWindowToBack();
 }
 private static void OnHotKeyPressed(HotKeyEventArgs e)
 {
     foreach (HotKey k in hotKeys)
     {
         if (e.ID == k.Id)
         {
             if (k.Handler != null)
                 k.Handler(null, e);
             else if (k.GenericHandler != null)
                 k.GenericHandler(null, e);
             break;
         }
     }
 }
 public static void RestoreLayout2(object sender = null, HotKeyEventArgs e = null)
 {
     RestoreAllWindowPositions(2);
 }
 public static void SaveLayout3(object sender = null, HotKeyEventArgs e = null)
 {
     SaveAllWindowPositions(3);
 }
 public static void MoveActiveWindowToRightScreen(object o, HotKeyEventArgs args)
 {
     MoveActiveWindowOffScreenInDirection(new Point(1,0));
 }
 public static void MoveActiveWindowToTopRight(object o, HotKeyEventArgs args)
 {
     SnapActiveWindow(SnapDirection.TopRight);
 }
 public static void MoveActiveWindowToLeft(object o, HotKeyEventArgs args)
 {
     SnapActiveWindow(SnapDirection.Left);
 }
 public static void MoveActiveWindowToCenter(object o, HotKeyEventArgs args)
 {
     SnapActiveWindow(SnapDirection.Center);
 }
 public static void MoveActiveWindowToBottom(object o, HotKeyEventArgs args)
 {
     SnapActiveWindow(SnapDirection.Bottom);
 }
 public static void IncreaseWindowTranspancy(object sender = null, HotKeyEventArgs e = null)
 {
     SetWindowTransparancy(1);
 }
 private static void GenericHotKeyPressed(object sender, HotKeyEventArgs args)
 {
     try
     {
         if (args.Modifiers == (KeyModifiers.Control | KeyModifiers.Shift) && args.Key == Keys.C)
         {
             //WindowManager.SaveAllWindowPositions();
         }
         else if (args.Modifiers == (KeyModifiers.Control | KeyModifiers.Shift) && args.Key == Keys.X)
         {
             //WindowManager.RestoreAllWindowPositions();
         }
         else if (args.Modifiers == (KeyModifiers.Control | KeyModifiers.Shift) && args.Key == Keys.Z)
         {
             //WindowManager.UndoRestoreAllWindowPositions();
         }
         else //unknown hot key pressed
         {
             //uncaught hotkey
             Log.I("UnActioned - " + args.Modifiers + "+" + args.Key + "");
         }
     }
     catch (Exception e)
     {
         Log.Exception(e);
     }
 }