예제 #1
0
        /// <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);
            }
        }
예제 #2
0
 private void OnRemovedProcess(int processId) => ProcessModels.Remove(processId);