/// <summary> /// Initially populates a list of processes. /// </summary> private void PopulateProcesses() { foreach (int key in ProcessModels.Keys) { ProcessModels.Remove(key); } foreach (System.Diagnostics.Process process in System.Diagnostics.Process.GetProcesses()) { AddProcess(process); } }
private void OnRemovedProcess(int processId) => ProcessModels.Remove(processId);