C# Class WindowsActivityTracker.Daemon

This tracker stores all program switches (window switch) and changes of the window titles in the database (using Windows Hooks and its events).
Inheritance: Shared.BaseTrackerDisposable, ITracker
Afficher le fichier Open project: sealuzh/PersonalAnalytics

Méthodes publiques

Méthode Description
CreateDatabaseTablesIfNotExist ( ) : void
Daemon ( ) : System
GetVisualizationsDay ( DateTimeOffset date ) : List
GetVisualizationsWeek ( DateTimeOffset date ) : List
IsEnabled ( ) : bool
Start ( ) : void
Stop ( ) : void
UpdateDatabaseTables ( int version ) : void
WinEventProc ( IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime ) : void

Catch Window Switch Events

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
CheckIfIdleTime ( object sender, System.Timers.ElapsedEventArgs e ) : void

check every 10 seconds if the user has been idle for the past 120s

GetActiveWindowTitle ( IntPtr handle ) : string

Get the name of the currently active window

GetProcessName ( IntPtr handle ) : string

Get the name of the current process

StoreIdle ( ) : void
StoreProcess ( ) : void

Method Details

CreateDatabaseTablesIfNotExist() public méthode

public CreateDatabaseTablesIfNotExist ( ) : void
Résultat void

Daemon() public méthode

public Daemon ( ) : System
Résultat System

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetVisualizationsDay() public méthode

public GetVisualizationsDay ( DateTimeOffset date ) : List
date DateTimeOffset
Résultat List

GetVisualizationsWeek() public méthode

public GetVisualizationsWeek ( DateTimeOffset date ) : List
date DateTimeOffset
Résultat List

IsEnabled() public méthode

public IsEnabled ( ) : bool
Résultat bool

Start() public méthode

public Start ( ) : void
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void

UpdateDatabaseTables() public méthode

public UpdateDatabaseTables ( int version ) : void
version int
Résultat void

WinEventProc() public méthode

Catch Window Switch Events
public WinEventProc ( IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime ) : void
hWinEventHook System.IntPtr
eventType uint
hwnd System.IntPtr
idObject int
idChild int
dwEventThread uint
dwmsEventTime uint
Résultat void