• 大小: 0.16M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: TreeViw  Xml  

资源简介

简单的XML 文件内容读取、显示到TreeView 控件的,适合初学者

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.xml;

namespace BindingxmlToTreeView
{
    public partial class Form1 : Form
    {
        xmlDocument Getxml = new xmlDocument();
        public Form1()
        {
            InitializeComponent();
            btnOpenxml.Click += BtnOpenxml_Click;
            BtnExit.Click += BtnExit_Click;
        }

        private void BtnExit_Click(object sender EventArgs e)
        {
            treeView1.Nodes.Clear();
            this.Close();
            Application.Exit();
        }

        private void BtnOpenxml_Click(object sender EventArgs e)
        {
            O

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     40960  2018-11-08 22:39  BindingxmlToTreeView\.vs\BindingxmlToTreeView\v15\.suo

     文件      10240  2018-11-08 22:31  BindingxmlToTreeView\BindingxmlToTreeView\bin\Debug\BindingxmlToTreeView.exe

     文件      22016  2018-11-08 22:31  BindingxmlToTreeView\BindingxmlToTreeView\bin\Debug\BindingxmlToTreeView.pdb

     文件       3403  2018-09-20 09:03  BindingxmlToTreeView\BindingxmlToTreeView\BindingxmlToTreeView.csproj

     文件       1679  2018-09-20 09:28  BindingxmlToTreeView\BindingxmlToTreeView\Form1.cs

     文件       3078  2018-09-20 09:03  BindingxmlToTreeView\BindingxmlToTreeView\Form1.Designer.cs

     文件       5817  2018-09-20 09:03  BindingxmlToTreeView\BindingxmlToTreeView\Form1.resx

     文件         42  2018-09-20 08:24  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.csproj.CoreCompileInputs.cache

     文件       2360  2018-11-08 22:31  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.csproj.FileListAbsolute.txt

     文件       1012  2018-09-20 09:03  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.csproj.GenerateResource.cache

     文件      10576  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.csprojAssemblyReference.cache

     文件      10240  2018-11-08 22:31  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.exe

     文件        180  2018-11-08 22:31  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.Form1.resources

     文件      22016  2018-11-08 22:31  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.pdb

     文件        180  2018-11-08 22:31  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\BindingxmlToTreeView.Properties.Resources.resources

     文件        827  2018-09-20 08:24  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6978  2018-09-20 08:32  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件      26183  2018-07-18 17:58  BindingxmlToTreeView\BindingxmlToTreeView\profile.xml

     文件        501  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\Program.cs

     文件       1356  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\Properties\AssemblyInfo.cs

     文件       2853  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\Properties\Resources.Designer.cs

     文件       5612  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\Properties\Resources.resx

     文件       1107  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\Properties\Settings.Designer.cs

     文件        249  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\Properties\Settings.settings

     文件       1657  2018-09-20 09:16  BindingxmlToTreeView\BindingxmlToTreeView\xmlFile1.xml

     文件       1159  2018-09-20 08:24  BindingxmlToTreeView\BindingxmlToTreeView.sln

     目录          0  2018-11-08 22:31  BindingxmlToTreeView\.vs\BindingxmlToTreeView\v15\Server\sqlite3

     目录          0  2018-10-29 12:12  BindingxmlToTreeView\.vs\BindingxmlToTreeView\v15\Server

     目录          0  2018-09-20 08:23  BindingxmlToTreeView\BindingxmlToTreeView\obj\Debug\TempPE

     目录          0  2018-10-29 12:12  BindingxmlToTreeView\.vs\BindingxmlToTreeView\v15

............此处省略16个文件信息

评论

共有 条评论