Plugin is usable in combination with other plugins, because it can only show messages to Trace messages. Or in Output windows if Trace messages are redirected to UI.
Here is a sample of how to attach to events of this plugin:
IPluginDescription winlogon = this.Host.Plugins.Plugins["6b7a3e25-8cef-4549-85a0-915114875dce"]; private void Winlogon_Active(Object sender, EventArgs e) { System.Diagnostics.Debug.WriteLine("Winlogon_Active " + e.ToString()); } private void Winlogon_Inactive(Object sender, EventArgs e) { System.Diagnostics.Debug.WriteLine("Winlogon_Inactive " + e.ToString()); }
The plugin supports subscription to the following events:
Logon
— User login to desktop
winlogon.GetMember("Logon").AddEventHandler(new EventHandler<DataEventArgs>(Winlogon_Active));
Logoff
— User logout from desktop
winlogon.GetMember("Logoff").AddEventHandler(new EventHandler<DataEventArgs>(Winlogon_Inactive));
DisplayLock
— The user has locked the screen (Ctrl+L)
winlogon.GetMember("DisplayLock").AddEventHandler(new EventHandler<DataEventArgs>(Winlogon_Inactive));
DisplayUnlock
— The user has unlocked the screen
winlogon.GetMember("DisplayUnlock").AddEventHandler(new EventHandler<DataEventArgs>(Winlogon_Active));
StartScreenSaver
— Screen saver has started
winlogon.GetMember("StartScreenSaver").AddEventHandler(new EventHandler<DataEventArgs>(Winlogon_Inactive));
StopScreenSaver
— Screen saver has stopped
winlogon.GetMember("StopScreenSaver").AddEventHandler(new EventHandler<DataEventArgs>(Winlogon_Active));
Suspending
— Putting the system into standby mode
winlogon.GetMember("Suspending").AddEventHandler(new EventHandler<DataEventArgs>(Winlogon_Inactive));
Plugin contains only one configuration element Enable Logging
: False — allow writing in the Output window an event about the user entering or leaving with the total user work time for the current day.