Esempio n. 1
0
        public static ProcessNode getAllByName(this ProcessNode node, string name, Guid ProgramGuid)
        {
            ProcessNode ppNode = node.getNode(name) as ProcessNode;

            if (ppNode != null)
            {
                return(ppNode);
            }
            else
            {
                Process[] ppNodeList = Process.GetProcessesByName(name);

                foreach (var item in ppNodeList)
                {
                    if (ppNode == null)
                    {
                        ppNode = new ProcessNode(item, name, ProgramGuid);
                    }
                    else
                    {
                        ppNode.Add(new ProcessNodeEntry(item, ProgramGuid));
                    }
                }

                return(ppNode);
            }
        }
Esempio n. 2
0
 public ProcessNode addChild(ProcessNode node, bool start = true)
 {
     if (Child == null)
     {
         Child = node;
         if (start)
         {
             Child.start();
         }
         return(Child);
     }
     else
     {
         return(Child.addChild(node, start));
     }
 }
Esempio n. 3
0
 public ProcessNode(string hash, ProcessStartInfo info, Guid OwnerGuid)
     : this(new Process(), hash, OwnerGuid)
 {
     Entry.RawEntry.StartInfo = info; Child = null;
 }
Esempio n. 4
0
 public ProcessNode(Process process, String hash, Guid OwnerGuid)
     : this(new ProcessNodeEntry(process, hash, OwnerGuid))
 {
     Child = null;
 }