示例#1
0
        //遍历文件夹下所有的xml文件,将条目按方法添加到listview中
        public void walkEveryXml(string inputPath)
        {
            string getFileName;
            int    FNindex;

            //如果存在这个文件夹,遍历其下的每个文件
            if (System.IO.Directory.Exists(inputPath))
            {
                foreach (string d in System.IO.Directory.GetFileSystemEntries(inputPath))
                {
                    if (System.IO.Directory.Exists(d))//如果当前的是文件夹,则递归
                    {
                        walkEveryXml(d);
                    }
                    else if (d.Substring(d.LastIndexOf(".", d.Length - 1), d.Length - d.LastIndexOf(".", d.Length - 1)) == ".xml")   //如果是xml文件,则加入到listview中
                    {
                        FNindex     = d.IndexOf(outFileName);
                        FNindex     = FNindex + outFileName.Length + 1;
                        getFileName = d.Substring(FNindex, d.Length - FNindex);

                        SmaliMeta smTmp = new SmaliMeta(getFileName, d);
                        listViewContent.Insert(0, smTmp);
                        listView1.Items.Insert(0, smTmp.showName);
                    }
                }
            }
        }
示例#2
0
        //读入单个的xml文件,并进行解读
        private void readSinglexml(string showName, string path)
        {
            SmaliMeta smTmp = new SmaliMeta(showName, path);

            listViewContent.Insert(0, smTmp);
            listView1.Items.Insert(0, smTmp.showName);
            DrawGraph(path, false);
        }
示例#3
0
 //读入单个的xml文件,并进行解读
 private void readSinglexml(string showName, string path)
 {
     SmaliMeta smTmp = new SmaliMeta(showName, path);
     listViewContent.Insert(0, smTmp);
     listView1.Items.Insert(0, smTmp.showName);
     DrawGraph(path,false);
 }
示例#4
0
        //遍历文件夹下所有的xml文件,将条目按方法添加到listview中
        public void walkEveryXml(string inputPath)
        {
            string getFileName;
            int FNindex;
            //如果存在这个文件夹,遍历其下的每个文件
            if (System.IO.Directory.Exists(inputPath) )
            {
                foreach (string d in System.IO.Directory.GetFileSystemEntries(inputPath))
                {
                    if (System.IO.Directory.Exists(d))//如果当前的是文件夹,则递归
                        walkEveryXml(d);
                    else if (d.Substring(d.LastIndexOf(".", d.Length - 1), d.Length - d.LastIndexOf(".", d.Length - 1)) == ".xml")   //如果是xml文件,则加入到listview中
                    {
                        FNindex = d.IndexOf(outFileName);
                        FNindex = FNindex + outFileName.Length + 1;
                        getFileName = d.Substring(FNindex, d.Length - FNindex);

                        SmaliMeta smTmp = new SmaliMeta(getFileName, d);
                        listViewContent.Insert(0, smTmp);
                        listView1.Items.Insert(0, smTmp.showName);
                    }
                }
            }
        }