文件名称:treeview 的用法?
文件大小:269KB
文件格式:RAR
更新时间:2013-01-22 15:16:25
treeview 的用法?
string[] mypicture = System.IO.Directory.GetFiles("" + Application.StartupPath + @"\picture", "*.*", System.IO.SearchOption.AllDirectories); foreach (string mystr in mypicture) { string mypic = mystr.Substring(mystr.LastIndexOf("\\") + 1); string myspilt=mypic.Substring(mypic.LastIndexOf('.')+1).ToLower(); if (myspilt == "jpg" || myspilt == "gif" || myspilt == "bmp") { this.treeView1.SelectedNode.Nodes.Add(mypic); } } this.treeView1.SelectedNode.Expand();//展开所有节点;
【文件预览】:
treeview
----treeview.sln(914B)
----treeview.suo(17KB)
----treeview()
--------bin()
--------Form1.Designer.cs(10KB)
--------pictureshow.Designer.cs(3KB)
--------Program.cs(489B)
--------pictureshow.cs(566B)
--------obj()
--------Form1.cs(4KB)
--------Form1.resx(20KB)
--------pictureshow.resx(6KB)
--------treeview.csproj(4KB)
--------Properties()