void SessionSwitch(object o, SessionSwitchEventArgs e)
{
if (e.Reason == SessionSwitchReason.SessionLock)
LockStatusChanged(this, new LockStatusChangedEventArgs(LockStatusChangedReason.Lock));
else if (e.Reason == SessionSwitchReason.SessionUnlock)
LockStatusChanged(this, new LockStatusChangedEventArgs(LockStatusChangedReason.Unlock));
}