Esempio n. 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;
        }
Esempio n. 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;
        }
 public ProcessDataEventArgs(ProcessData data)
 {
     this.Data = data;
 }
 public ProcessDataEventArgs(ProcessData data)
 {
     this.Data = data;
 }