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