public void DisplayHook(Hook hook, IRunningProcess process, HookStateChangeInfo pepe) { if (!process.IsAlive()) return; lock (_dataLock) { process.Do(hook, (p, m, f) => { Add(process, m, f, hook); _hookNodes[hook].UpdateState(pepe.CurrentState); }); } }
private void HookStateChangedHandler(Hook hook, IRunningProcess aProcess, eNktHookState previousState, eNktHookState currentState) { var aStateChangeInfo = new HookStateChangeInfo(hook, aProcess, previousState, currentState); var aHook = aStateChangeInfo.Hook; if (aStateChangeInfo.CurrentState == eNktHookState.stRemoved) { _view.RemoveHook(aHook); _view.RemoveHookEnabled = false; _view.RemoveAllHooksEnabled = _spyManager.AtLeastOneHookWasCreated; _view.ExportHookingSettings = _spyManager.AtLeastOneHookWasCreated; } else _view.DisplayHookStatus(aStateChangeInfo); if (!aProcess.IsHooked()) _view.DisplayRecentlyUnhookedProcess(aProcess); else if (aProcess.AtLeastOneHookIsActive()) _view.DisplayRecentlyHookedProcessAsActive(aProcess); else _view.DisplayRecentlyHookedProcessAsInactive(aProcess); _view.RefreshModulesView(); }
public void DisplayHookStatus(HookStateChangeInfo aHookStateChage) { AddTreeViewUpdateJob(_hooksTreeView, () => _hooksTreeView.DisplayHook(aHookStateChage.Hook, aHookStateChage.Process, aHookStateChage)); }