Hi,
I am building a form that should become custom directory browser.
How can I determine whether a selected ListView item is a file or a folder?
TypeScript
private void ProjectListView_ItemActivate(object sender, System.EventArgs e)
{
try {
string sProjectsPath = (global::Offshore_Supports_Menu.Properties.Settings.Default.Projects_Dir);
string sDir = ProjectTreeView.SelectedNode.FullPath;
string sItem = ProjectListView.SelectedItems[0].Text;
//If the sItem is a file then run the File
Process.Start(sProjectsPath + "\\" + sDir + "\\" + sItem);
//If the sItem is a folder then open the folder in ListView
}
catch (Exception Exc) { MessageBox.Show(Exc.ToString()); }
}
Mahesh Joshi70 pointsPosted Oct 30, 2007, 4:45 AM EDT
Gerben8 pointsPosted Oct 30, 2007, 4:53 AM EDT
Thanx for your reaction ... but I solved the problem 30 minutes ago...