Example #1
0
        private ClasFile GetDirectories(DirectoryInfo directoryInfo)
        {
            SHFILEINFO infoIcons = ShellGetFileInfo.GetFileInfo(directoryInfo.FullName);

            return(new ClasFile()
            {
                Name = directoryInfo.Name,
                IconFile = Icon.FromHandle(infoIcons.hIcon),
                ExtensionFile = "<DIR>",
                Action = OpenDirectory
            });
        }
Example #2
0
        private ClasFile GetFiles(FileInfo directoryInfo)
        {
            SHFILEINFO infoIcons = ShellGetFileInfo.GetFileInfo(directoryInfo.FullName);

            return(new ClasFile()
            {
                Name = directoryInfo.Name,
                IconFile = Icon.FromHandle(infoIcons.hIcon),
                Size = GetSizeFile(directoryInfo),
                ExtensionFile = directoryInfo.Extension,
                Action = OpenFile,
            });
        }