Beispiel #1
0
 private void OpenDir(string path)
 {
     ListViewItem lvi;
     FolderObj fo = new FolderObj();
     IFSObject temp = null;
     Current = (ICatalog)fo;
     Current.Initialize(path);
     Current.ReloadFiles();
     listView1.Items.Clear();
     string[] files;
     int n = Current.GetFileSystemEntriesCount();
     if (n == 0)
         return;
     files = new string[n];
     for (int i = 0; i < n; i++)
         files[i] = Current.GetFileSystemEntryName(i);
     for(int i=0; i < files.Length; i++)
     {
         temp = Current.GetFile(i);
         if (temp.isDir() == 1)
             lvi = new ListViewItem(files[i], 0);
         else
             lvi = new ListViewItem(files[i], 1);
         listView1.Items.Add(lvi);
     }
     textBox1.Text = path;
 }