• 大小: 4.84MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-08
  • 语言: 其他
  • 标签: C#  程序管理  

资源简介

界面漂亮,功能智能,操作简单,直观。简单的控件完成适用的功能,适合新手学习。。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;


using System.Drawing;
using System.Runtime.InteropServices;
namespace GuidWhat
{
    public class FileIcon
    {
        private string _Err;

        public string Err
        {
            get { return _Err; }
        }

        public Icon SmallIcon
        {
            get
            {
                IntPtr hImgSmall; //the handle to the system image list
                Icon icon = null;
                try
                {
                    SHFILEINFO shinfo = new SHFILEINFO();


                    hImgSmall = Win32.SHGetFileInfo(_FileName 0 ref shinfo (uint)Marshal.SizeOf(shinfo) Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON);
                    icon = System.Drawing.Icon.FromHandle(shinfo.hIcon);
                }
                catch (Exception ex)
                {
                    _Err = ex.Message;
                }
                return icon;
            }
        }

        public Icon LargeIcon
        {
            get
            {
                IntPtr hImgLarge; //the handle to the system image list
                Icon icon = null;
                try
                {
                    SHFILEINFO shinfo = new SHFILEINFO();

                    hImgLarge = Win32.SHGetFileInfo(_FileName 0 ref shinfo (uint)Marshal.SizeOf(shinfo) Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON);
                    icon = System.Drawing.Icon.FromHandle(shinfo.hIcon);
                }
                catch (Exception ex)
                {
                    _Err = ex.Message;
                }
                return icon;
            }
        }
        private string _FileName;

        public string FileName
        {
            get { return _FileName; }
            set { _FileName = value; }
        }
        public FileIcon() { }
        public FileIcon(string fileName)
        {
            _FileName = fileName;
        }
        
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5632  2012-01-05 16:03  GuidWhat\FileIcon\bin\Debug\FileIcon.dll

     文件      13824  2012-01-05 16:03  GuidWhat\FileIcon\bin\Debug\FileIcon.pdb

     文件       5120  2012-01-14 14:13  GuidWhat\FileIcon\bin\Release\FileIcon.dll

     文件      13824  2012-01-14 14:13  GuidWhat\FileIcon\bin\Release\FileIcon.pdb

     文件       2037  2012-01-05 16:03  GuidWhat\FileIcon\FileIcon.cs

     文件       2621  2010-09-10 10:09  GuidWhat\FileIcon\FileIcon.csproj

     文件       1309  2012-01-05 16:03  GuidWhat\FileIcon\obj\Debug\FileIcon.csproj.FileListAbsolute.txt

     文件       5632  2012-01-05 16:03  GuidWhat\FileIcon\obj\Debug\FileIcon.dll

     文件      13824  2012-01-05 16:03  GuidWhat\FileIcon\obj\Debug\FileIcon.pdb

     文件       4096  2010-09-11 17:55  GuidWhat\FileIcon\obj\Debug\Refactor\FileIcon.dll

     文件       1339  2012-01-14 14:13  GuidWhat\FileIcon\obj\Release\FileIcon.csproj.FileListAbsolute.txt

     文件       5120  2012-01-14 14:13  GuidWhat\FileIcon\obj\Release\FileIcon.dll

     文件      13824  2012-01-14 14:13  GuidWhat\FileIcon\obj\Release\FileIcon.pdb

     文件       1390  2010-09-10 10:04  GuidWhat\FileIcon\Properties\AssemblyInfo.cs

     文件        478  2012-01-05 16:03  GuidWhat\FileIcon\SHFileInfo.cs

     文件        532  2012-01-05 16:03  GuidWhat\FileIcon\Win32.cs

     文件      81139  2012-01-05 13:38  GuidWhat\GuidWhat\bin\1.jpg

     文件     509887  2012-01-05 13:39  GuidWhat\GuidWhat\bin\2.gif

     文件      26242  2012-01-05 14:10  GuidWhat\GuidWhat\bin\3.jpg

     文件      81139  2012-01-05 13:38  GuidWhat\GuidWhat\bin\Debug\1.jpg

     文件     509887  2012-01-05 13:39  GuidWhat\GuidWhat\bin\Debug\2.gif

     文件     143277  2012-01-05 13:39  GuidWhat\GuidWhat\bin\Debug\3.jpg

     文件      28672  2009-12-11 17:23  GuidWhat\GuidWhat\bin\Debug\ButtonEx.dll

     文件      20480  2009-07-30 15:27  GuidWhat\GuidWhat\bin\Debug\CheckBoxEx.dll

     文件       5632  2010-09-10 10:32  GuidWhat\GuidWhat\bin\Debug\FileIcon.dll

     文件      13824  2010-09-10 10:32  GuidWhat\GuidWhat\bin\Debug\FileIcon.pdb

     文件      36864  2009-08-06 17:34  GuidWhat\GuidWhat\bin\Debug\FileTransfersControl.dll

     文件     626688  2012-01-05 14:22  GuidWhat\GuidWhat\bin\Debug\GuidWhat.exe

     文件      32256  2012-01-05 14:22  GuidWhat\GuidWhat\bin\Debug\GuidWhat.pdb

     文件      14328  2012-01-05 15:56  GuidWhat\GuidWhat\bin\Debug\GuidWhat.vshost.exe

............此处省略69个文件信息

评论

共有 条评论