• 大小: 0.07M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-26
  • 语言: C#
  • 标签: Gerber  解析  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;


namespace GMDO
{
    public partial class FileList : Form
    {
        public  List files = new List();
        public  static List filesResult= new List();
        public FileList()
        {
            InitializeComponent();
        }

       
        private void FileList_Load(object sender EventArgs e)
        {
            try
             {
                 string selectPath = Form1.selectPath;
                 ///获取所选目录
                 string[] s = Directory.GetFiles(selectPath);
                 ///通过遍历去添加所有父节点
                 foreach (string m in s)
                 {
                     ///父节点
                     TreeNode node = new TreeNode(m);
                     ///给treeview添加节点
                     this.treeView1.Nodes.Add(node);
                     ///调用方法递归出磁盘的所有文件,并将父节点和路径传入
                     //expendtree(mnode);
                 }
             }
             catch { }
         
        }

        private void expendtree(string pathTreeNode tn)
         {
             try
             {
                 ///获取父节点目录的子目录
                 string[] s1 = Directory.GetDirectories(path);
                 string[] f1 = Directory.GetFiles(path);
                 ///子节点
                 TreeNode subnode = new TreeNode();
                 ///通过遍历给传进来的父节点添加子节点
                 foreach (string j in s1)
                 {
                     subnode = new TreeNode(j);
                     tn.Nodes.Add(subnode);
                     ///对文件夹不断递归, 得到所有文件
                     expendtree(j subnode);
                 }
                 foreach (string j in f1)
                 {
                     subnode = new TreeNode(j);
                     tn.Nodes.Add(subnode);
                     ///对文件夹不断递归, 得到所有文件
                     expendtree(j subnode);
                 }
             }
             catch { } 
         }

        private void button1_Click(object sender EventArgs e)
        {
            foreach (TreeNode node in treeView1.Nodes)
            {
                
                if (node.Checked)
                {
                    files.Add(node.Text);
                }
            }
            Form1.selectPath = files[0];
            this.Close();
        }


    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-05 15:16  GMDO_V4.0\
     目录           0  2018-11-14 16:17  GMDO_V4.0\GMDO\
     文件        1009  2018-05-25 14:32  GMDO_V4.0\GMDO.sln
     文件       51200  2018-11-14 16:18  GMDO_V4.0\GMDO.v12.suo
     文件         187  2018-05-25 14:32  GMDO_V4.0\GMDO\App.config
     目录           0  2018-11-05 15:16  GMDO_V4.0\GMDO\bin\
     目录           0  2018-11-05 15:16  GMDO_V4.0\GMDO\bin\Debug\
     文件       17408  2018-11-14 16:17  GMDO_V4.0\GMDO\bin\Debug\GMDO.exe
     文件         187  2018-05-25 14:32  GMDO_V4.0\GMDO\bin\Debug\GMDO.exe.config
     文件       40448  2018-11-14 16:17  GMDO_V4.0\GMDO\bin\Debug\GMDO.pdb
     文件       24224  2018-11-14 16:18  GMDO_V4.0\GMDO\bin\Debug\GMDO.vshost.exe
     文件         187  2018-05-25 14:32  GMDO_V4.0\GMDO\bin\Debug\GMDO.vshost.exe.config
     文件         490  2017-03-19 05:00  GMDO_V4.0\GMDO\bin\Debug\GMDO.vshost.exe.manifest
     目录           0  2018-05-25 15:01  GMDO_V4.0\GMDO\bin\Release\
     文件        2821  2018-11-14 16:11  GMDO_V4.0\GMDO\FileList.cs
     文件        3386  2018-11-14 14:45  GMDO_V4.0\GMDO\FileList.Designer.cs
     文件        5817  2018-11-14 14:45  GMDO_V4.0\GMDO\FileList.resx
     文件       11011  2018-11-14 16:17  GMDO_V4.0\GMDO\Form1.cs
     文件        7143  2018-11-14 14:39  GMDO_V4.0\GMDO\Form1.Designer.cs
     文件        6599  2018-11-14 14:38  GMDO_V4.0\GMDO\Form1.resx
     文件        4107  2018-10-19 11:10  GMDO_V4.0\GMDO\GMDO.csproj
     目录           0  2018-11-05 15:16  GMDO_V4.0\GMDO\obj\
     目录           0  2018-11-14 16:17  GMDO_V4.0\GMDO\obj\Debug\
     文件        1453  2018-05-25 21:48  GMDO_V4.0\GMDO\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7015  2018-11-14 13:36  GMDO_V4.0\GMDO\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件        4117  2018-11-14 16:18  GMDO_V4.0\GMDO\obj\Debug\GMDO.csproj.FileListAbsolute.txt
     文件        1102  2018-11-14 14:45  GMDO_V4.0\GMDO\obj\Debug\GMDO.csproj.GenerateResource.Cache
     文件        2211  2018-05-25 15:00  GMDO_V4.0\GMDO\obj\Debug\GMDO.csprojResolveAssemblyReference.cache
     文件       17408  2018-11-14 16:17  GMDO_V4.0\GMDO\obj\Debug\GMDO.exe
     文件         180  2018-11-14 14:45  GMDO_V4.0\GMDO\obj\Debug\GMDO.FileList.resources
     文件         180  2018-11-14 14:38  GMDO_V4.0\GMDO\obj\Debug\GMDO.Form1.resources
............此处省略13个文件信息

评论

共有 条评论