コード例 #1
0
        private void OnProcessStarted(object sender, ProcessEventArgs e)
        {
            // Note that it is possible (but unlikely) that we already have an entry for
            // a process with this ID. This can happen if the stopped event was lost.
            ProcessData data;
            if (!this.processes.TryGetValue(e.Id, out data))
            {
                data = new ProcessData();
                this.processes.Add(e.Id, data);
            }

            data.Id = e.Id;
            data.Name = Path.GetFileName(e.ImageName);
            data.StartTime = e.Timestamp;
        }
コード例 #2
0
        private void OnProcessStarted(object sender, ProcessEventArgs e)
        {
            // Note that it is possible (but unlikely) that we already have an entry for
            // a process with this ID. This can happen if the stopped event was lost.
            ProcessData data;

            if (!this.processes.TryGetValue(e.Id, out data))
            {
                data = new ProcessData();
                this.processes.Add(e.Id, data);
            }

            data.Id        = e.Id;
            data.Name      = Path.GetFileName(e.ImageName);
            data.StartTime = e.Timestamp;
        }
コード例 #3
0
 public ProcessDataEventArgs(ProcessData data)
 {
     this.Data = data;
 }
コード例 #4
0
 public ProcessDataEventArgs(ProcessData data)
 {
     this.Data = data;
 }