static void onWindowCreated(object sender, Lib.WindowHookEventArgs e) { try { if (Whitelist.Contains(e.WindowTitle)) { return; } if (learning) { Whitelist.Add(e.WindowTitle); } GetWindowThreadProcessId(e.Handle, out uint pID); var pString = string.Format("[{0}] \"{1}\" =>", pID, e.WindowTitle); Logger.Trace(pString, "On Window Created: ", e.WindowClass); var proc = Process.GetProcessById(Convert.ToInt32(pID)); ProcessHandler.HandleProcess(proc); } catch (Exception ex) { Logger.Error(ex.GetType(), "while processing", e, ":", ex.Message); } }
private void InvokeHandleProcess() { systemUnderTest.HandleProcess(eventArgs); }