public HookService() { this.detector.Pressed += this.KeyHookOnPressed; this.detector.Start(); this.helper = VDMHelper.helper; }
public static VirtualDesktop MoveToRight(this IntPtr hWnd, IVdmHelper helper) { var current = VirtualDesktop.FromHwnd(hWnd); if (current != null) { var right = current.GetRight(); if (right == null) { if (Settings.General.LoopDesktop) { var desktops = VirtualDesktop.GetDesktops(); if (desktops.Length >= 2) { right = desktops.First(); } } } if (right != null) { if (VirtualDesktopHelper.MoveToDesktop(hWnd, right) || helper.MoveWindowToDesktop(hWnd, right.Id)) { return(right); } } } SystemSounds.Asterisk.Play(); return(null); }
public HookService() { this.detector.Pressed += this.KeyHookOnPressed; this.detector.Start(); this.helper = VdmHelperFactory.CreateInstance(); this.helper.Init(); }
public static VirtualDesktop MoveToNew(this IntPtr hWnd, IVdmHelper helper) { var newone = VirtualDesktop.Create(); if (newone != null) { if (VirtualDesktopHelper.MoveToDesktop(hWnd, newone) || helper.MoveWindowToDesktop(hWnd, newone.Id)) { return(newone); } } SystemSounds.Asterisk.Play(); return(null); }
public VirtualDesktopGridManager(SysTrayProcess sysTrayProcess, SettingValues settings) { this.settings = settings; this.sysTrayProcess = sysTrayProcess; VDMHelper = VdmHelperFactory.CreateInstance(); VDMHelper.Init(); foregroundWindowChangedDelegate = new WinAPI.WinEventDelegate(ForegroundWindowChanged); fgWindowHook = WinAPI.SetWinEventHook(WinAPI.EVENT_SYSTEM_FOREGROUND, WinAPI.EVENT_SYSTEM_FOREGROUND, IntPtr.Zero, foregroundWindowChangedDelegate, 0, 0, WinAPI.WINEVENT_OUTOFCONTEXT); // Create a custom message ID for other processes to trigger actions. commandWindowMessage = RegisterWindowMessage("VIRTUALDESKTOPGRIDSWITCHER_COMMAND"); Application.AddMessageFilter(this); Start(); }
public HookService(IVdmHelper helper) { this._detector.Pressed += this.KeyHookOnPressed; this._detector.Start(); this._helper = helper; }
public PinService(IVdmHelper helper) { this._helper = helper; VirtualDesktop.CurrentChanged += this.VirtualDesktopOnCurrentChanged; }
public HookService(IVdmHelper helper) { this._detector.Pressed += this.KeyHookOnPressed; this._detector.Start(); this._helper = helper; }