Esempio n. 1
0
        public SelectFileDialog()
        {
            //Creates the File system template.
            FileSystem = new FileSystemTemplate(
                null, // Set the root folder to null to show ANY logical drive
                new List <string>()
            {
                "*" + "dll"
            },
                new List <string>()
            {
                "*"     // Show ANY directory
            });

            InitializeComponent();
        }
Esempio n. 2
0
        internal IOItem(string path, IOItemType type, IOItem parent, List <Wildcard> fileWildcard, List <Wildcard> dirWildcard, FileSystemTemplate template)
        {
            switch (type)
            {
            case IOItemType.Folder:
                ItemInfo = new DirectoryInfo(path);
                break;

            case IOItemType.File:
                ItemInfo = new FileInfo(path);
                break;
            }

            Icon i = GetIcon(path, type);

            this.Icon         = Imaging.CreateBitmapSourceFromHIcon(i.Handle, System.Windows.Int32Rect.Empty, BitmapSizeOptions.FromWidthAndHeight(i.Width, i.Height));
            this.Type         = type;
            this.Parent       = parent;
            this.fileWildcard = fileWildcard;
            this.dirWildcard  = dirWildcard;
            _template         = template;
        }