Class FloatingWindowInterceptor
- Namespace
- Ink_Canvas.Helpers
- Assembly
- InkCanvasForClass.dll
悬浮窗拦截器 - 检测和隐藏指定的悬浮窗
public class FloatingWindowInterceptor : IDisposable
- Inheritance
-
FloatingWindowInterceptor
- Implements
- Inherited Members
Constructors
FloatingWindowInterceptor()
public FloatingWindowInterceptor()
Properties
IsRunning
public bool IsRunning { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetAllRules()
获取所有拦截规则
public Dictionary<FloatingWindowInterceptor.InterceptType, FloatingWindowInterceptor.InterceptRule> GetAllRules()
Returns
GetInterceptRule(InterceptType)
获取拦截规则
public FloatingWindowInterceptor.InterceptRule GetInterceptRule(FloatingWindowInterceptor.InterceptType type)
Parameters
Returns
GetInterceptedWindowsCount()
获取当前被拦截的窗口数量
public int GetInterceptedWindowsCount()
Returns
RestoreAllWindows()
恢复所有被拦截的窗口
public void RestoreAllWindows()
RestoreWindow(IntPtr)
恢复指定窗口
public bool RestoreWindow(IntPtr hWnd)
Parameters
hWndIntPtr
Returns
RestoreWindowsByType(InterceptType)
恢复指定类型的被拦截窗口
public void RestoreWindowsByType(FloatingWindowInterceptor.InterceptType type)
Parameters
ScanOnce()
手动扫描一次
public void ScanOnce()
SetInterceptRule(InterceptType, bool)
设置拦截规则
public void SetInterceptRule(FloatingWindowInterceptor.InterceptType type, bool enabled)
Parameters
typeFloatingWindowInterceptor.InterceptTypeenabledbool
Start(int)
启动拦截器
public void Start(int scanIntervalMs = 5000)
Parameters
scanIntervalMsint
Stop()
停止拦截器
public void Stop()
Events
WindowIntercepted
public event EventHandler<FloatingWindowInterceptor.WindowInterceptedEventArgs> WindowIntercepted
Event Type
WindowRestored
public event EventHandler<FloatingWindowInterceptor.WindowRestoredEventArgs> WindowRestored