private readonly ProcessInfo.WinEventDelegate _dele;//leave this here to prevent garbage collection private ProcessHelper() { //listen to window focus changed event _dele = OnFocusedWindowChanged; ProcessInfo.RegisterWindowFocusEvent(_dele); }
private readonly ProcessInfo.WinEventDelegate _dele; //leave this here to prevent garbage collection #endregion Fields #region Constructors private ProcessHelper() { //listen to window focus changed event _dele = OnFocusedWindowChanged; ProcessInfo.RegisterWindowFocusEvent(_dele); }