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

资源简介


资源截图

代码片段和文件信息

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

namespace testTreeView
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void treeView1_AfterCheck(object sender TreeViewEventArgs e)
        {
            if (e.Action != TreeViewAction.Unknown && (e.Node.Nodes.Count > 0 || e.Node.Name == “root“))
            {
                foreach (TreeNode childNode in e.Node.Nodes)
                {
                    childNode.Checked = e.Node.Checked;

                }
                this.label1.Text = e.Node.Checked.ToString();
            }
            this.label2

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-08-09 13:23  TreeViewEx\
     目录           0  2012-08-09 13:27  TreeViewEx\testTreeView\
     文件         929  2012-08-08 13:37  TreeViewEx\testTreeView.sln
     文件       27136  2012-08-09 13:27  TreeViewEx\testTreeView.suo
     目录           0  2012-08-09 13:23  TreeViewEx\testTreeView\bin\
     目录           0  2012-08-09 13:23  TreeViewEx\testTreeView\bin\Debug\
     文件       24576  2012-08-08 13:24  TreeViewEx\testTreeView\bin\Debug\testTreeView.exe
     文件       26112  2012-08-08 13:24  TreeViewEx\testTreeView\bin\Debug\testTreeView.pdb
     文件        5632  2012-08-08 12:10  TreeViewEx\testTreeView\bin\Debug\testTreeView.vshost.exe
     目录           0  2012-08-09 13:23  TreeViewEx\testTreeView\bin\Release\
     文件       24576  2012-08-09 13:27  TreeViewEx\testTreeView\bin\Release\testTreeView.exe
     文件       34304  2012-08-09 13:27  TreeViewEx\testTreeView\bin\Release\testTreeView.pdb
     文件        5632  2012-08-09 13:26  TreeViewEx\testTreeView\bin\Release\testTreeView.vshost.exe
     文件        1140  2012-08-09 13:27  TreeViewEx\testTreeView\Form1.cs
     文件       12140  2012-08-09 13:26  TreeViewEx\testTreeView\Form1.Designer.cs
     文件        5814  2012-08-09 13:26  TreeViewEx\testTreeView\Form1.resx
     目录           0  2012-08-09 13:23  TreeViewEx\testTreeView\obj\
     目录           0  2012-08-09 13:23  TreeViewEx\testTreeView\obj\Debug\
     目录           0  2012-08-08 12:10  TreeViewEx\testTreeView\obj\Debug\TempPE\
     文件         842  2012-08-08 13:24  TreeViewEx\testTreeView\obj\Debug\testTreeView.csproj.GenerateResource.Cache
     文件       24576  2012-08-08 13:24  TreeViewEx\testTreeView\obj\Debug\testTreeView.exe
     文件         180  2012-08-08 13:24  TreeViewEx\testTreeView\obj\Debug\testTreeView.Form1.resources
     文件       26112  2012-08-08 13:24  TreeViewEx\testTreeView\obj\Debug\testTreeView.pdb
     文件         180  2012-08-08 12:18  TreeViewEx\testTreeView\obj\Debug\testTreeView.Properties.Resources.resources
     目录           0  2012-08-09 13:27  TreeViewEx\testTreeView\obj\Release\
     目录           0  2012-08-08 13:37  TreeViewEx\testTreeView\obj\Release\TempPE\
     文件         842  2012-08-09 13:26  TreeViewEx\testTreeView\obj\Release\testTreeView.csproj.GenerateResource.Cache
     文件       24576  2012-08-09 13:27  TreeViewEx\testTreeView\obj\Release\testTreeView.exe
     文件         180  2012-08-09 13:26  TreeViewEx\testTreeView\obj\Release\testTreeView.Form1.resources
     文件       34304  2012-08-09 13:27  TreeViewEx\testTreeView\obj\Release\testTreeView.pdb
     文件         180  2012-08-08 13:37  TreeViewEx\testTreeView\obj\Release\testTreeView.Properties.Resources.resources
............此处省略10个文件信息

评论

共有 条评论