更新时间:2023-02-05 21:06:10
我认为这对你有帮助......
TreeView for .NET
并检查这个
TreeView示例
I am getting files and folders of a directory in cmd prompt from where I am getting those files and folders information in a string in c# windows forms application using
Stream Reader
So, following is my string which I displayed in a messageBox
/sdcard/Music/:
----rwxr-x system sdcard_rw 8414449 2013-08-02 04:01 Kalimba.mp3
d---rwxr-x system sdcard_rw 2013-08-02 07:43 aaa
d---rwxr-x system sdcard_rw 2013-08-02 04:02 abc
d---rwxr-x system sdcard_rw 2013-08-02 04:06 afolder
----rwxr-x system sdcard_rw 280065 2013-08-02 04:01 mono.mp3
/sdcard/Music//aaa:
/sdcard/Music//abc:
d---rwxr-x system sdcard_rw 2013-08-02 04:02 New Folder
----rwxr-x system sdcard_rw 280065 2013-08-02 04:01 aty.mp3
/sdcard/Music//abc/New Folder:
----rwxr-x system sdcard_rw 8414449 2013-08-02 04:02 msc.mp3
/sdcard/Music//afolder:
----rwxr-x system sdcard_rw 280065 2013-08-02 04:06 xyz zyx vyx.mp3
Now i want to make a tree view from this text string and add nodes and child nodes as the names of files and folder for example aaa, kalimba.mp3,aaa,xyz zyx vyx.mp3.But the tree view nodes and child nodes should be in a hierarchy like file explorer
hope you i delivered my question correctly
I think this can be helpful to you...
TreeView for .NET
and check this one too
TreeView Example