Esempio n. 1
0
 public static void Start()
 {
     if (StepDiagram != null)
     {
         throw new Exception("Unable to start twice. Already listening. Call HookEngine.Stop after calling HookEngine.Start");
     }
     activeWindowHandle  = Win.GetActiveWindow();
     StepDiagram         = new StepDiagram();
     cpuUsageCalculator  = new CpuUsageCalculator();
     currentProcessTimer = new Timer(CheckCpuUsage, null, 100, 100);
     HookEvents();
     StepDiagram.AddTaskActive(WindowsEvents.GetActiveWindowTitle(), Win.GetForegroundWindow());
 }
Esempio n. 2
0
 static void HookManager_WindowActivated(object sender, WindowActivatedEventArgs e)
 {
     StepDiagram.AddTaskActive(e.WindowName, e.Handle);
 }