Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 public FolderShortcutViewModel(string path, string name) : this(path, name, null, IconExtractor.Extract(path))
 {
 }