public void DataReaderSetup(string foldername)
        {
            _foldername = foldername;

             //_objFolder = _shell.NameSpace(@_foldername);
            _objFolder = _shell.NameSpace(@"C:\Users\Jakob\Music\");

            for (int i = 0; i < short.MaxValue; i++)
            {
                string header = _objFolder.GetDetailsOf(null, i);
                if (String.IsNullOrEmpty(header))
                    break;
                _arrHeaders.Add(header);
            }

            foreach (Shell32.FolderItem2 item in _objFolder.Items())
            {
                for (int i = 0; i < _arrHeaders.Count; i++)
                //for (int i = 0; i < 50; i++) //this prints the metadata <--
                {
                    Console.WriteLine("{0}\t{1}: {2}", i, _arrHeaders[i], _objFolder.GetDetailsOf(item, i));
                }

            }
        }
Пример #2
0
        private void FillLocalView(Shell32.Folder folder)
        {

            this.Cursor = Cursors.WaitCursor;

            m_currentFolder = folder;
            // Notify that update begins
            LocalView.BeginUpdate();

            // Erase last view items
            LocalView.Items.Clear();

            // Erase previous lists image
            ImgListViewSmall.Images.Clear();
            ImgListViewLarge.Images.Clear();

            int idImage = 0;

            ListViewItem lvItem = new ListViewItem("..");
            lvItem.Tag = folder;

            LocalView.Items.Add(lvItem);

            Shell32.FolderItems items = folder.Items();

            // Folder enumeration
            foreach (Shell32.FolderItem item in items)
            {
                if (item.IsFolder)
                {
                    AddViewItem(item, ref idImage);
                }
            }

            // Other files 
            foreach (Shell32.FolderItem item in items)
            {
                if (!item.IsFolder)
                {
                    
                    AddViewItem(item, ref idImage);
                }
            }

            // End update view
            LocalView.EndUpdate();

            //ftpc.LocalFolder = folder.Title;

            this.Cursor = Cursors.Default;

        }
Пример #3
0
        public Main()
        {
            InitializeComponent();
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            SplitView.SplitPosition = this.Width / 2;

            m_Shell = new Shell32.ShellClass();
            m_RootShell = m_Shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfDRIVES);

            InitializeIconFolder();
            FillLocalView(m_RootShell);
        }
Пример #4
0
        public SharpFTP()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            SplitView.SplitPosition = this.Width / 2;

            m_Shell = new Shell32.ShellClass();
            m_RootShell = m_Shell.NameSpace(Shell32.ShellSpecialFolderConstants.ssfDRIVES);

            InitializeIconFolder();
            FillLocalView (m_RootShell);
        }
Пример #5
0
        public MediaItem(string Path)
        {
            this.Path = Path;

            Folder = Shell.NameSpace(System.IO.Path.GetDirectoryName(Path));
            FolderItem = Folder.ParseName(System.IO.Path.GetFileName(Path));
            
            Execute();
            UpdateContainingMedia();
            //TraceProperties();
        }