• 大小: 45KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-27
  • 语言: 其他
  • 标签: 递归  Treelsit  

资源简介

使用递归获取TreeList中所有勾选的结点

资源截图

代码片段和文件信息

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.Collections;
using DevExpress.XtraTreeList.Nodes;
using DevExpress.XtraEditors.Controls;

namespace vjsdn.TreeList_Recusive
{
    public partial class frmRecursion : Form
    {
        public frmRecursion()
        {
            InitializeComponent();
        }
      
        private void frmRecursion_Load(object sender EventArgs e)
        {
            treeList1.ExpandAll();
        }

        private void btnGetSelectedNodes_Click(object sender EventArgs e)
        {            
            IList nodes = new Recursion().GetCheckNodes(this.treeList1);
         
            listBoxControl1.Items.Clear();

            foreach (object o in nodes)
                listBoxControl1.Items.Add(o);
        }
    }
}

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

     文件      11776  2009-12-22 16:04  vjsdn.TreeList_Recusive\bin\Debug\vjsdn.TreeList_Recusive.exe

     文件      28160  2009-12-22 16:04  vjsdn.TreeList_Recusive\bin\Debug\vjsdn.TreeList_Recusive.pdb

     文件      14328  2009-12-22 16:14  vjsdn.TreeList_Recusive\bin\Debug\vjsdn.TreeList_Recusive.vshost.exe

     目录          0  2009-12-22 15:56  vjsdn.TreeList_Recusive\bin\Debug

     目录          0  2009-12-22 15:52  vjsdn.TreeList_Recusive\bin

     文件        957  2009-12-22 16:16  vjsdn.TreeList_Recusive\frmRecursion.cs

     文件       5307  2009-12-22 16:04  vjsdn.TreeList_Recusive\frmRecursion.Designer.cs

     文件       5814  2009-12-22 16:04  vjsdn.TreeList_Recusive\frmRecursion.resx

     目录          0  2009-12-22 15:38  vjsdn.TreeList_Recusive\obj\Debug\Refactor

     文件      26662  2009-12-22 15:44  vjsdn.TreeList_Recusive\obj\Debug\ResolveAssemblyReference.cache

     目录          0  2009-12-22 15:29  vjsdn.TreeList_Recusive\obj\Debug\TempPE

     文件        993  2009-12-22 16:14  vjsdn.TreeList_Recusive\obj\Debug\vjsdn.TreeList_Recusive.csproj.FileListAbsolute.txt

     文件        912  2009-12-22 16:04  vjsdn.TreeList_Recusive\obj\Debug\vjsdn.TreeList_Recusive.csproj.GenerateResource.Cache

     文件      11776  2009-12-22 16:04  vjsdn.TreeList_Recusive\obj\Debug\vjsdn.TreeList_Recusive.exe

     文件        430  2009-12-22 16:04  vjsdn.TreeList_Recusive\obj\Debug\vjsdn.treelist_recusive.exe.licenses

     文件        180  2009-12-22 16:04  vjsdn.TreeList_Recusive\obj\Debug\vjsdn.TreeList_Recusive.frmRecursion.resources

     文件      28160  2009-12-22 16:04  vjsdn.TreeList_Recusive\obj\Debug\vjsdn.TreeList_Recusive.pdb

     文件        180  2009-12-22 15:56  vjsdn.TreeList_Recusive\obj\Debug\vjsdn.TreeList_Recusive.Properties.Resources.resources

     目录          0  2009-12-22 16:04  vjsdn.TreeList_Recusive\obj\Debug

     目录          0  2009-12-22 15:29  vjsdn.TreeList_Recusive\obj

     文件        511  2009-12-22 15:53  vjsdn.TreeList_Recusive\Program.cs

     文件       1378  2009-12-22 15:29  vjsdn.TreeList_Recusive\Properties\AssemblyInfo.cs

     文件        131  2009-12-22 16:04  vjsdn.TreeList_Recusive\Properties\licenses.licx

     文件       2896  2009-12-22 15:29  vjsdn.TreeList_Recusive\Properties\Resources.Designer.cs

     文件       5612  2009-12-22 15:29  vjsdn.TreeList_Recusive\Properties\Resources.resx

     文件       1108  2009-12-22 15:29  vjsdn.TreeList_Recusive\Properties\Settings.Designer.cs

     文件        249  2009-12-22 15:29  vjsdn.TreeList_Recusive\Properties\Settings.settings

     目录          0  2009-12-22 16:04  vjsdn.TreeList_Recusive\Properties

     文件       2481  2009-12-22 16:14  vjsdn.TreeList_Recusive\Recursion.cs

     文件       4377  2009-12-22 15:56  vjsdn.TreeList_Recusive\vjsdn.TreeList_Recusive.csproj

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

评论

共有 条评论