├── .gitattributes
├── .gitignore
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── Binary
├── FastTree.dll
├── FastTree.xml
└── Tester.exe
├── FastTree.sln
├── FastTree
├── FastList
│ ├── FastList.cs
│ ├── FastListBase.cs
│ └── FastListBase.resx
├── FastTree.csproj
├── FastTree.csproj.DotSettings
├── FastTree
│ ├── FastTree.cs
│ └── FastTreeNode.cs
├── FastTreeModel
│ └── FastTreeNode.cs
├── Properties
│ └── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Resources
│ ├── checkbox_no.png
│ ├── checkbox_yes.png
│ ├── collapse.png
│ ├── default_icon.png
│ ├── empty.png
│ └── expand.png
└── obj
│ └── Debug
│ ├── FastTree.csproj.FileListAbsolute.txt
│ ├── FastTreeNS.FastListBase.resources
│ ├── FastTreeNS.Resources.resources
│ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
├── README.md
└── Tester
├── DataModel
└── Node.cs
├── FastListCustomize.Designer.cs
├── FastListCustomize.cs
├── FastListCustomize.resx
├── FastListDragItemSample.Designer.cs
├── FastListDragItemSample.cs
├── FastListDragItemSample.resx
├── FastListDropItemSample.Designer.cs
├── FastListDropItemSample.cs
├── FastListDropItemSample.resx
├── FastListExpandedSample.Designer.cs
├── FastListExpandedSample.cs
├── FastListExpandedSample.resx
├── FastListReadonlyAndDisabledItemsSample.Designer.cs
├── FastListReadonlyAndDisabledItemsSample.cs
├── FastListReadonlyAndDisabledItemsSample.resx
├── FastListSimplestSample.Designer.cs
├── FastListSimplestSample.cs
├── FastListSimplestSample.resx
├── FastListStressTest.Designer.cs
├── FastListStressTest.cs
├── FastListStressTest.resx
├── FastListVirtualCheckboxesSample.Designer.cs
├── FastListVirtualCheckboxesSample.cs
├── FastListVirtualCheckboxesSample.resx
├── FastTreeDragAndDropSample.Designer.cs
├── FastTreeDragAndDropSample.cs
├── FastTreeDragAndDropSample.resx
├── FastTreeEditSample.Designer.cs
├── FastTreeEditSample.cs
├── FastTreeEditSample.resx
├── FastTreeFileExplorerSample.Designer.cs
├── FastTreeFileExplorerSample.cs
├── FastTreeFileExplorerSample.resx
├── FastTreeFileExplorerSample2.Designer.cs
├── FastTreeFileExplorerSample2.cs
├── FastTreeFileExplorerSample2.resx
├── FastTreeSimplestSample.Designer.cs
├── FastTreeSimplestSample.cs
├── FastTreeSimplestSample.resx
├── FastTreeStressTest.Designer.cs
├── FastTreeStressTest.cs
├── FastTreeStressTest.resx
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── Resources
├── default_icon.png
└── folder.png
├── Tester.csproj
├── app.config
├── bin
└── Debug
│ ├── Tester.exe.config
│ └── Tester.vshost.exe.config
└── obj
└── x86
└── Debug
├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
├── Tester.FastListDragItemSample.resources
├── Tester.FastListDropItemSample.resources
├── Tester.FastListExpandedSample.resources
├── Tester.FastListReadonlyAndDisabledItemsSample.resources
├── Tester.FastListSimplestSample.resources
├── Tester.FastTreeFileExplorerSample.resources
├── Tester.FastTreeFileExplorerSample2.resources
├── Tester.FastTreeSimplestSample.resources
├── Tester.MainForm.resources
├── Tester.Properties.Resources.resources
└── Tester.csproj.FileListAbsolute.txt
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | [Bb]in/
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | ## Ignore Visual Studio temporary files, build results, and
9 | ## files generated by popular Visual Studio add-ons.
10 |
11 | # User-specific files
12 | *.suo
13 | *.user
14 | *.sln.docstates
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Rr]elease/
19 | x64/
20 | *_i.c
21 | *_p.c
22 | *.ilk
23 | *.meta
24 | *.obj
25 | *.pch
26 | *.pdb
27 | *.pgc
28 | *.pgd
29 | *.rsp
30 | *.sbr
31 | *.tlb
32 | *.tli
33 | *.tlh
34 | *.tmp
35 | *.log
36 | *.vspscc
37 | *.vssscc
38 | .builds
39 |
40 | # Visual C++ cache files
41 | ipch/
42 | *.aps
43 | *.ncb
44 | *.opensdf
45 | *.sdf
46 |
47 | # Visual Studio profiler
48 | *.psess
49 | *.vsp
50 | *.vspx
51 |
52 | # Guidance Automation Toolkit
53 | *.gpState
54 |
55 | # ReSharper is a .NET coding add-in
56 | _ReSharper*
57 |
58 | # NCrunch
59 | *.ncrunch*
60 | .*crunch*.local.xml
61 |
62 | # Installshield output folder
63 | [Ee]xpress
64 |
65 | # DocProject is a documentation generator add-in
66 | DocProject/buildhelp/
67 | DocProject/Help/*.HxT
68 | DocProject/Help/*.HxC
69 | DocProject/Help/*.hhc
70 | DocProject/Help/*.hhk
71 | DocProject/Help/*.hhp
72 | DocProject/Help/Html2
73 | DocProject/Help/html
74 |
75 | # Click-Once directory
76 | publish
77 |
78 | # Publish Web Output
79 | *.Publish.xml
80 |
81 | # NuGet Packages Directory
82 | packages
83 |
84 | # Windows Azure Build Output
85 | csx
86 | *.build.csdef
87 |
88 | # Windows Store app package directory
89 | AppPackages/
90 |
91 | # Others
92 | [Bb]in
93 | [Oo]bj
94 | sql
95 | TestResults
96 | [Tt]est[Rr]esult*
97 | *.Cache
98 | ClientBin
99 | [Ss]tyle[Cc]op.*
100 | ~$*
101 | *.dbmdl
102 | Generated_Code #added for RIA/Silverlight projects
103 |
104 | # Backup & report files from converting an old project file to a newer
105 | # Visual Studio version. Backup files are not needed, because we have git ;-)
106 | _UpgradeReport_Files/
107 | Backup*/
108 | UpgradeLog*.XML
109 |
--------------------------------------------------------------------------------
/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PavelTorgashov/FastTree/eec02bd5137f605ce8569b532ffa5aed7205e7d0/1.png
--------------------------------------------------------------------------------
/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PavelTorgashov/FastTree/eec02bd5137f605ce8569b532ffa5aed7205e7d0/2.png
--------------------------------------------------------------------------------
/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PavelTorgashov/FastTree/eec02bd5137f605ce8569b532ffa5aed7205e7d0/3.png
--------------------------------------------------------------------------------
/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PavelTorgashov/FastTree/eec02bd5137f605ce8569b532ffa5aed7205e7d0/4.png
--------------------------------------------------------------------------------
/Binary/FastTree.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PavelTorgashov/FastTree/eec02bd5137f605ce8569b532ffa5aed7205e7d0/Binary/FastTree.dll
--------------------------------------------------------------------------------
/Binary/FastTree.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | FastTree
5 |
6 |
7 |
8 |
9 | Occurs when user start to drag items
10 |
11 |
12 |
13 |
14 | Occurs when user drag object over node
15 |
16 |
17 |
18 |
19 | Occurs when user drop object on given item
20 |
21 |
22 |
23 |
24 | Draws Expand box, Check box and Icon of the Item
25 |
26 |
27 |
28 |
29 | Absolute Y coordinate of the control to item index
30 |
31 |
32 |
33 |
34 |
35 |
36 | Control visible rect coordinates to item index
37 |
38 |
39 |
40 |
41 | Control visible rect coordinates to item info
42 |
43 |
44 |
45 |
46 | x0 x1 x2 x3 x4 x5
47 | | | | | | |
48 | □ □ □ ItemText
49 |
50 |
51 |
52 |
53 | Updates scrollbar position after Value changed
54 |
55 |
56 |
57 |
58 | List of all visible nodes
59 |
60 |
61 |
62 |
63 | Occurs when user start to drag node
64 |
65 |
66 |
67 |
68 | Occurs when user drag object over node
69 |
70 |
71 |
72 |
73 | Occurs when user drop object on given node
74 |
75 |
76 |
77 |
78 | Returns all expanded children of the node
79 |
80 |
81 |
82 |
83 | Returns all expanded children of the item
84 |
85 |
86 |
87 |
88 | This method is used only for programmatically expanding.
89 | For GUI expanding - use CanExpandItem
90 |
91 |
92 |
93 |
94 | General tree data model
95 |
96 |
97 |
98 |
99 | A strongly-typed resource class, for looking up localized strings, etc.
100 |
101 |
102 |
103 |
104 | Returns the cached ResourceManager instance used by this class.
105 |
106 |
107 |
108 |
109 | Overrides the current thread's CurrentUICulture property for all
110 | resource lookups using this strongly typed resource class.
111 |
112 |
113 |
114 |
115 | Looks up a localized resource of type System.Drawing.Bitmap.
116 |
117 |
118 |
119 |
120 | Looks up a localized resource of type System.Drawing.Bitmap.
121 |
122 |
123 |
124 |
125 | Looks up a localized resource of type System.Drawing.Bitmap.
126 |
127 |
128 |
129 |
130 | Looks up a localized resource of type System.Drawing.Bitmap.
131 |
132 |
133 |
134 |
135 | Looks up a localized resource of type System.Drawing.Bitmap.
136 |
137 |
138 |
139 |
140 | Looks up a localized resource of type System.Drawing.Bitmap.
141 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------
/Binary/Tester.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PavelTorgashov/FastTree/eec02bd5137f605ce8569b532ffa5aed7205e7d0/Binary/Tester.exe
--------------------------------------------------------------------------------
/FastTree.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastTree", "FastTree\FastTree.csproj", "{C8B484C9-A5C6-4B4E-BF98-8198921F30B6}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csproj", "{11E7396C-50B2-40FE-8037-B7689AE7AFCF}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|Mixed Platforms = Debug|Mixed Platforms
12 | Debug|x86 = Debug|x86
13 | Release|Any CPU = Release|Any CPU
14 | Release|Mixed Platforms = Release|Mixed Platforms
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
21 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
22 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Debug|x86.ActiveCfg = Debug|Any CPU
23 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Release|Any CPU.Build.0 = Release|Any CPU
25 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
26 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
27 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}.Release|x86.ActiveCfg = Release|Any CPU
28 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Debug|Any CPU.ActiveCfg = Debug|x86
29 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
30 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Debug|Mixed Platforms.Build.0 = Debug|x86
31 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Debug|x86.ActiveCfg = Debug|x86
32 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Debug|x86.Build.0 = Debug|x86
33 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Release|Any CPU.ActiveCfg = Release|x86
34 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Release|Mixed Platforms.ActiveCfg = Release|x86
35 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Release|Mixed Platforms.Build.0 = Release|x86
36 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Release|x86.ActiveCfg = Release|x86
37 | {11E7396C-50B2-40FE-8037-B7689AE7AFCF}.Release|x86.Build.0 = Release|x86
38 | EndGlobalSection
39 | GlobalSection(SolutionProperties) = preSolution
40 | HideSolutionNode = FALSE
41 | EndGlobalSection
42 | EndGlobal
43 |
--------------------------------------------------------------------------------
/FastTree/FastList/FastListBase.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 | 77, 17
125 |
126 |
--------------------------------------------------------------------------------
/FastTree/FastTree.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {C8B484C9-A5C6-4B4E-BF98-8198921F30B6}
9 | Library
10 | Properties
11 | FastTreeNS
12 | FastTree
13 | v3.5
14 | 512
15 |
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | bin\Debug\FastTree.XML
26 |
27 |
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | UserControl
45 |
46 |
47 | UserControl
48 |
49 |
50 | UserControl
51 |
52 |
53 |
54 |
55 | True
56 | True
57 | Resources.resx
58 |
59 |
60 |
61 |
62 | FastListBase.cs
63 |
64 |
65 | ResXFileCodeGenerator
66 | Designer
67 | Resources.Designer.cs
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
96 |
--------------------------------------------------------------------------------
/FastTree/FastTree.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
3 | True
--------------------------------------------------------------------------------
/FastTree/FastTree/FastTreeNode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace FastTreeNS
7 | {
8 | ///
9 | /// General tree data model
10 | ///
11 | public class FastTreeNode
12 | {
13 | protected readonly List childs = new List();
14 |
15 | public object Tag { get; set; }
16 |
17 | private FastTreeNode parent;
18 | public FastTreeNode Parent
19 | {
20 | get { return parent; }
21 | set
22 | {
23 | if (parent == value)
24 | return;
25 |
26 | SetParent(value);
27 |
28 | if(parent != null)
29 | parent.childs.Add(this);
30 | }
31 | }
32 |
33 | protected virtual void SetParent(FastTreeNode value)
34 | {
35 | if (parent != null && parent != value)
36 | parent.childs.Remove(this);
37 |
38 | parent = value;
39 | }
40 |
41 | public virtual void RemoveNode(FastTreeNode node)
42 | {
43 | childs.Remove(node);
44 | SetParent(null);
45 | }
46 |
47 | public virtual void AddNode(FastTreeNode node)
48 | {
49 | if(node.Parent != this)
50 | childs.Add(node);
51 | SetParent(this);
52 | }
53 |
54 | public virtual void InsertNode(int index, FastTreeNode node)
55 | {
56 | childs.Insert(index, node);
57 | SetParent(this);
58 | }
59 |
60 | public virtual void InsertNodeBefore(FastTreeNode existsNode, FastTreeNode node)
61 | {
62 | var i = childs.IndexOf(existsNode);
63 | if (i < 0) i = 0;
64 |
65 | InsertNode(i, node);
66 | }
67 |
68 | public virtual void InsertNodeAfter(FastTreeNode existsNode, FastTreeNode node)
69 | {
70 | var i = childs.IndexOf(existsNode) + 1;
71 | InsertNode(i, node);
72 | }
73 |
74 | public virtual void RemoveNode(IEnumerable nodes)
75 | {
76 | var hash = new HashSet(nodes);
77 | var j = 0;
78 | for (int i = 0; i < childs.Count; i++)
79 | {
80 | if (hash.Contains(childs[i]))
81 | j++;
82 | else
83 | childs[i].SetParent(null);
84 | childs[i] = childs[i + j];
85 | }
86 |
87 | if(j > 0)
88 | childs.RemoveRange(childs.Count - j, j);
89 | }
90 |
91 | public virtual void AddNode(IEnumerable nodes)
92 | {
93 | childs.AddRange(nodes);
94 | foreach(var node in nodes)
95 | node.SetParent(this);
96 | }
97 |
98 | public virtual void InsertNode(int index, IEnumerable nodes)
99 | {
100 | childs.InsertRange(index, nodes);
101 | foreach (var node in nodes)
102 | node.SetParent(this);
103 | }
104 |
105 | public virtual void InsertNodeBefore(FastTreeNode existsNode, IEnumerable nodes)
106 | {
107 | var i = childs.IndexOf(existsNode);
108 | if (i < 0)
109 | i = 0;
110 |
111 | InsertNode(i, nodes);
112 | }
113 |
114 | public virtual void InsertNodeAfter(FastTreeNode existsNode, IEnumerable nodes)
115 | {
116 | var i = childs.IndexOf(existsNode) + 1;
117 | InsertNode(i, nodes);
118 | }
119 |
120 | public int IndexOf(FastTreeNode node)
121 | {
122 | return childs.IndexOf(node);
123 | }
124 |
125 | public IEnumerable Childs
126 | {
127 | get
128 | {
129 | return childs;
130 | }
131 | }
132 |
133 | public IEnumerable GetChilds()
134 | {
135 | return GetChilds(t=>t is TagType);
136 | }
137 |
138 | public IEnumerable GetChilds(Predicate