コード例 #1
0
 // https://stackoverflow.com/questions/44980/programmatically-determine-a-duration-of-a-locked-workstation
 protected override void OnSessionChange(SessionChangeDescription sessionChangeDescription)
 {
     SessionSwitchMonitor.SystemSessionSwitch(sessionChangeDescription.SessionId, (SessionSwitchReason)sessionChangeDescription.Reason);
 }
コード例 #2
0
 protected static void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e)
 {
     // This is a direct copy of HideezServiceHost.HideezService.OnSessionChange
     SessionSwitchMonitor.SystemSessionSwitch(System.Diagnostics.Process.GetCurrentProcess().SessionId, e.Reason);
 }