- /// <summary>
- /// 遍历skin 文件夹下的所有文件下的窗体风格文件 然后绑定到combobox
- /// </summary>
- private void SkinBind()
- {
- string dirp = System.AppDomain.CurrentDomain.BaseDirectory + "skin";
- DirectoryInfo mydir = new DirectoryInfo(dirp);
- ArrayList arr = new ArrayList(); ;
- foreach (FileSystemInfo fsi in mydir.GetFileSystemInfos())
- {
- DirectoryInfo mydir1 = new DirectoryInfo(dirp + "/" + fsi.Name);
- foreach (FileSystemInfo ssk in mydir1.GetFileSystemInfos())
- {
- string sskname = ssk.Name;
- if (sskname.Split('.').GetValue(1).ToString() == "ssk")
- {
- //arr.Add(@"skin\" + sskname);
- comboBox1.Items.Add(@"skin\" + fsi + @"\" + sskname);
- }
- }
- }
- }
源码下载http://pan.baidu.com/share/link?shareid=421189&uk=1879094096
http://www.aaspx.com/thread-198-1-1.html 原创发布