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); } }
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); } }