예제 #1
0
 /// <summary>
 /// 绑定DataGridView的数据源。
 /// </summary>
 void DatabindGridView()
 {
     List<RunningProcess> runningProcesses = new List<RunningProcess>();
     foreach (var proc in Process.GetProcesses().OrderBy(p => p.Id))
     {
         RunningProcess runningProcess = new RunningProcess(proc);
         runningProcesses.Add(runningProcess);
     }
     gvProcess.DataSource = runningProcesses;
 }
예제 #2
0
        /// <summary>
        /// 绑定DataGridView的数据源。
        /// </summary>
        void DatabindGridView()
        {
            List <RunningProcess> runningProcesses = new List <RunningProcess>();

            foreach (var proc in Process.GetProcesses().OrderBy(p => p.Id))
            {
                RunningProcess runningProcess = new RunningProcess(proc);
                runningProcesses.Add(runningProcess);
            }
            gvProcess.DataSource = runningProcesses;
        }