Table of Contents

Class ScreenDetectionHelper

Namespace
Ink_Canvas.Helpers
Assembly
InkCanvasForClass.dll

屏幕检测帮助类 - 用于检测窗口所在的屏幕和屏幕信息

public static class ScreenDetectionHelper
Inheritance
ScreenDetectionHelper
Inherited Members

Methods

GetAllScreens()

获取所有屏幕信息

public static Screen[] GetAllScreens()

Returns

Screen[]

所有屏幕的数组

GetPrimaryScreen()

获取主屏幕

public static Screen GetPrimaryScreen()

Returns

Screen

主屏幕

GetWindowScreen(Window)

获取窗口所在的屏幕

public static Screen GetWindowScreen(Window window)

Parameters

window Window

要检测的窗口

Returns

Screen

窗口所在的屏幕,如果无法检测则返回主屏幕

HasMultipleScreens()

检查是否有多个屏幕

public static bool HasMultipleScreens()

Returns

bool

如果有多个屏幕返回true,否则返回false

IsWindowOnPrimaryScreen(Window)

检查窗口是否在主屏幕上

public static bool IsWindowOnPrimaryScreen(Window window)

Parameters

window Window

要检查的窗口

Returns

bool

如果窗口在主屏幕上返回true,否则返回false