Table of Contents

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

bool

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

Dictionary<FloatingWindowInterceptor.InterceptType, FloatingWindowInterceptor.InterceptRule>

GetInterceptRule(InterceptType)

获取拦截规则

public FloatingWindowInterceptor.InterceptRule GetInterceptRule(FloatingWindowInterceptor.InterceptType type)

Parameters

type FloatingWindowInterceptor.InterceptType

Returns

FloatingWindowInterceptor.InterceptRule

GetInterceptedWindowsCount()

获取当前被拦截的窗口数量

public int GetInterceptedWindowsCount()

Returns

int

RestoreAllWindows()

恢复所有被拦截的窗口

public void RestoreAllWindows()

RestoreWindow(IntPtr)

恢复指定窗口

public bool RestoreWindow(IntPtr hWnd)

Parameters

hWnd IntPtr

Returns

bool

RestoreWindowsByType(InterceptType)

恢复指定类型的被拦截窗口

public void RestoreWindowsByType(FloatingWindowInterceptor.InterceptType type)

Parameters

type FloatingWindowInterceptor.InterceptType

ScanOnce()

手动扫描一次

public void ScanOnce()

SetInterceptRule(InterceptType, bool)

设置拦截规则

public void SetInterceptRule(FloatingWindowInterceptor.InterceptType type, bool enabled)

Parameters

type FloatingWindowInterceptor.InterceptType
enabled bool

Start(int)

启动拦截器

public void Start(int scanIntervalMs = 5000)

Parameters

scanIntervalMs int

Stop()

停止拦截器

public void Stop()

Events

WindowIntercepted

public event EventHandler<FloatingWindowInterceptor.WindowInterceptedEventArgs> WindowIntercepted

Event Type

EventHandler<FloatingWindowInterceptor.WindowInterceptedEventArgs>

WindowRestored

public event EventHandler<FloatingWindowInterceptor.WindowRestoredEventArgs> WindowRestored

Event Type

EventHandler<FloatingWindowInterceptor.WindowRestoredEventArgs>