Damn listview

Dec 15 2009 3:35 AM

I got a code:
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
using
System.IO;
using
System.Management;
 

namespace
WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
e.Node.Nodes.Clear();
string[] dir = Directory.GetDirectories(e.Node.FullPath, ("*"));
for (int i = 0; i < dir.Length; i++)
{
DirectoryInfo mappeninfo = new DirectoryInfo(dir[i]);
e.Node.Nodes.Add(mappeninfo.Name);
}
}
private void Form1_Load(object sender, EventArgs e)
{
string[] directories = Directory.GetLogicalDrives();
// hier word de directories geladen
foreach (string s in Directory.GetLogicalDrives())
{
treeView1.Nodes.Add(s);
}
}
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
string sPath = ("*");
DirectoryInfo di = new DirectoryInfo(sPath);
FileInfo[] rgFiles = di.GetFiles("*");

}
}
}
 
but the listview wont show any files in any directory

Answers (6)