public static AppUsageStartReason ToStartReason(this SystemStateChange ssc) { switch (ssc) { case SystemStateChange.MonitorOn: return(AppUsageStartReason.MonitorOn); case SystemStateChange.Resume: return(AppUsageStartReason.Resume); default: throw new Exception(); } }
public static AppUsageEndReason ToEndReason(this SystemStateChange ssc) { switch (ssc) { case SystemStateChange.MonitorOff: return(AppUsageEndReason.MonitorOff); case SystemStateChange.Suspend: return(AppUsageEndReason.Suspend); case SystemStateChange.Logoff: return(AppUsageEndReason.Logoff); case SystemStateChange.Shutdown: return(AppUsageEndReason.Shutdown); default: throw new Exception(); } }
private void RaiseSystemMainStateChanged(SystemStateChange stateChange) { SystemMainStateChanged(this, new SystemStateChangedArgs(stateChange)); }
public SystemStateChangedArgs(SystemStateChange newState) { ChangedToState = newState; }
public static bool IsStartRecordingEvent(this SystemStateChange ssc) { return(StartRecordingEvents.Contains(ssc)); }