C# 클래스 ACAT.Lib.Core.Utility.WindowActivityMonitor

Monitors the activity of the foreground window and notifies event subscribers if the focues of the active window changes, OR if the focus changes from one control to another inside the active window Also supports a heartbeat where subscribers can be periodically notified of the current focused window/ window element
파일 보기 프로젝트 열기: brlima94/acat-localization

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes resources

GetActiveWindowAsync ( ) : void

Asyncrhonously forces an event to be raised regardless of whether focus changed or not

IsDifferent ( AutomationElement ele1, AutomationElement ele2 ) : bool

Compares the two automation elements and returns if they are identical or not

Pause ( ) : void

Pauses the activity monitoring. No events will be raised when paused

Resume ( ) : void

Resumes window activity monitoring.

Start ( ) : bool

Starts activity monitoring

비공개 메소드들

메소드 설명
GetActiveWindow ( ) : void
GetForegroundWindowInfo ( ) : ACAT.Lib.Core.Utility.WindowActivityMonitorInfo
GetProcessForWindow ( IntPtr hwnd ) : Process
_timer_Tick ( object sender, EventArgs e ) : void

The timer function to check the currently focused window and to see if focus changed or not

getActiveWindow ( bool flag = false ) : void
release ( Object syncObj ) : void

Releases the synch object

tryEnter ( Object syncObj ) : bool

Uses Monitor to see if it can enter

메소드 상세

Dispose() 공개 정적인 메소드

Disposes resources
public static Dispose ( ) : void
리턴 void

GetActiveWindowAsync() 공개 정적인 메소드

Asyncrhonously forces an event to be raised regardless of whether focus changed or not
public static GetActiveWindowAsync ( ) : void
리턴 void

IsDifferent() 공개 정적인 메소드

Compares the two automation elements and returns if they are identical or not
public static IsDifferent ( AutomationElement ele1, AutomationElement ele2 ) : bool
ele1 System.Windows.Automation.AutomationElement first element
ele2 System.Windows.Automation.AutomationElement second element
리턴 bool

Pause() 공개 정적인 메소드

Pauses the activity monitoring. No events will be raised when paused
public static Pause ( ) : void
리턴 void

Resume() 공개 정적인 메소드

Resumes window activity monitoring.
public static Resume ( ) : void
리턴 void

Start() 공개 정적인 메소드

Starts activity monitoring
public static Start ( ) : bool
리턴 bool