Beispiel #1
0
 public static string FormatProcess(ProcessWrapper process)
 {
     return  String.Format("{0}{1} {2} {3}", 
         (process.ParentId == 0 ? "   " : "-->"),
         (process.Id.ToString() + (process.HasExited ? "*" : "")).PadRight(10),
         process.ProcessName.PadRight(12),
         process.CommandLine);
 }
Beispiel #2
0
 private static void KillSingle(ProcessWrapper process)
 {
         try
         {
             process.Kill();
         }
         catch (Exception e)
         {
             Console.WriteLine(e.GetType().ToString() + ": " + e.Message);
         }
 }