コード例 #1
0
ファイル: FileLister.cs プロジェクト: mkbiltek2019/Lesons_SAG
        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
            });
        }
コード例 #2
0
ファイル: FileLister.cs プロジェクト: mkbiltek2019/Lesons_SAG
        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,
            });
        }