private FileViewModel(string path, string itemGroup) { Path = path; isAlias = false; Icon = new Lazy <Icon>(() => IconExtractor.Extract(Path, true)); ItemGroup = itemGroup; fileInfo = new Lazy <FileInfo>(() => new FileInfo(path)); }
public static System.Drawing.Icon DriveIcon(this DriveInfo di) { switch (di.DriveType) { case DriveType.Fixed: return(IconExtractor.Extract("shell32.dll", 79, true)); case DriveType.Network: return(IconExtractor.Extract("shell32.dll", 273, true)); case DriveType.Removable: return(IconExtractor.Extract("shell32.dll", 7, true)); default: return(null); } }
public FolderShortcutViewModel(string path, string name) : this(path, name, null, IconExtractor.Extract(path)) { }