Пример #1
0
 internal static void StartTimer(string vmName, string packageName)
 {
     AppUsageTimer.StopTimer();
     AppUsageTimer.sLastAppPackage = packageName;
     AppUsageTimer.sLastVMName     = vmName;
     AppUsageTimer.sStopwatch.Reset();
     AppUsageTimer.sStopwatch.Start();
 }
Пример #2
0
 private static void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e)
 {
     if (e.Reason == SessionSwitchReason.SessionLock)
     {
         AppUsageTimer.StopTimer();
     }
     else
     {
         if (e.Reason != SessionSwitchReason.SessionUnlock)
         {
             return;
         }
         AppUsageTimer.StartTimerAfterResume();
     }
 }
Пример #3
0
 internal static void SaveData()
 {
     AppUsageTimer.StopTimer();
     RegistryManager.Instance.AInfo = AppUsageTimer.EncryptString(JsonConvert.SerializeObject((object)AppUsageTimer.sDictAppUsageInfo));
 }