public void writeProcess(Process p)
 {
     try
     {
         string outstr = datetime_formatted + "," + p.name + "," + p.pid + "," + p.commandline;
        m_streamWriter.WriteLine(outstr);
     }
     catch (Exception ex)
     {
         Console.WriteLine("Exception " + ex.Message);
     }
 }
 public static void Print(Process s)
 {
     Console.WriteLine("Process =  {0} {1}  {2}" , s.pid,s.name,s.commandline);
 }
 public static void markunseen(Process s)
 {
     s.alive = false;
 }
 public void WriteXml(Process p)
 {
     dxl.writeProcess(p);
 }
 public void WriteCsv(Process p)
 {
     csv.writeProcess(p);
 }
 public void writeProcess(Process p)
 {
     writer.WriteStartElement("Process");
     writer.WriteAttributeString("PID", p.pid.ToString());
     writer.WriteAttributeString("Name", p.name);
     writer.WriteAttributeString("CommandLine", p.commandline);
     writer.WriteAttributeString("Owner", p.owner);
     writer.WriteAttributeString("CreationTime", p.creation_date.ToString());
      //     writer.WriteElementString("PID", p.pid.ToString());
      //     writer.WriteElementString("Name", p.name);
      //     writer.WriteElementString("CommandLine", p.commandline);
      //     writer.WriteElementString("Owner", p.owner);
      //     writer.WriteElementString("CreationTime", p.creation_date.ToString());
     writer.WriteEndElement();
 }