Class WindowOverviewModel
- Namespace
- Ink_Canvas.Helpers
- Assembly
- InkCanvasForClass.dll
窗口概览模型 - 实时监控桌面所有可见窗口并计算遮挡情况
public class WindowOverviewModel : IDisposable
- Inheritance
-
WindowOverviewModel
- Implements
- Inherited Members
Constructors
WindowOverviewModel()
构造函数
public WindowOverviewModel()
Properties
Windows
当前窗口列表(按Z顺序排序,最上层在前)
public List<WindowInfo> Windows { get; }
Property Value
Methods
Dispose()
释放资源
public void Dispose()
FindWindowsByProcessName(string)
根据进程名查找窗口
public List<WindowInfo> FindWindowsByProcessName(string processName)
Parameters
processNamestring进程名
Returns
- List<WindowInfo>
匹配的窗口列表
FindWindowsByTitle(string)
根据窗口标题查找窗口
public List<WindowInfo> FindWindowsByTitle(string title)
Parameters
titlestring窗口标题(支持部分匹配)
Returns
- List<WindowInfo>
匹配的窗口列表
GetCoveringWindows(WindowRect, List<string>, double)
获取覆盖指定区域的所有窗口
public List<WindowInfo> GetCoveringWindows(WindowRect area, List<string> excludeProcessNames = null, double coverageThreshold = 0.1)
Parameters
areaWindowRect要检查的区域
excludeProcessNamesList<string>要排除的进程名列表
coverageThresholddouble覆盖阈值
Returns
- List<WindowInfo>
覆盖该区域的窗口列表(按Z顺序,最上层在前)
GetFullScreenWindows(List<string>)
获取所有全屏窗口
public List<WindowInfo> GetFullScreenWindows(List<string> excludeProcessNames = null)
Parameters
Returns
- List<WindowInfo>
全屏窗口列表
HasFullScreenWindow(List<string>)
检查是否有全屏窗口
public bool HasFullScreenWindow(List<string> excludeProcessNames = null)
Parameters
Returns
- bool
如果有全屏窗口返回true
IsAreaCovered(WindowRect, List<string>, double)
检查指定区域是否被其他窗口覆盖
public bool IsAreaCovered(WindowRect area, List<string> excludeProcessNames = null, double coverageThreshold = 0.5)
Parameters
areaWindowRect要检查的区域
excludeProcessNamesList<string>要排除的进程名列表(例如当前应用程序)
coverageThresholddouble覆盖阈值(0.0-1.0),超过此阈值认为被覆盖
Returns
- bool
如果被覆盖返回true
IsAreaCoveredByFullScreenWindow(WindowRect, List<string>)
检查指定区域是否被全屏窗口覆盖
public bool IsAreaCoveredByFullScreenWindow(WindowRect area, List<string> excludeProcessNames = null)
Parameters
areaWindowRect要检查的区域
excludeProcessNamesList<string>要排除的进程名列表
Returns
- bool
如果被全屏窗口覆盖返回true
UpdateWindows()
更新窗口列表
public void UpdateWindows()
Events
WindowsUpdated
窗口列表更新事件
public event EventHandler<List<WindowInfo>> WindowsUpdated