Esempio n. 1
0
 public Program(Process process)
 {
     Name = process.GetName();
     Path = process.GetPath();
     if (!(Path is null))
     {
         Path       = System.IO.Path.GetFullPath(Path);
         IconSource = PathInfoHelper.GetIcon(Path, IconType.Small);
     }
 }
Esempio n. 2
0
 public Program(string path)
 {
     path       = System.IO.Path.GetFullPath(path);
     Path       = path;
     IconSource = PathInfoHelper.GetIcon(Path, IconType.Small);
     Name       = FileVersionInfo.GetVersionInfo(path).FileDescription ?? "";
     if (string.IsNullOrWhiteSpace(Name))
     {
         Name = System.IO.Path.GetFileNameWithoutExtension(path);
     }
 }