File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
- using System . Collections ;
1
+ using System . Collections ;
2
2
using System . Collections . Generic ;
3
3
using System . ComponentModel ;
4
4
using System . Diagnostics . Contracts ;
@@ -128,6 +128,10 @@ public int Compare(object x, object y)
128
128
{
129
129
return compare . Compare ( en1 . Text , en2 . Text ) ;
130
130
}
131
+ if ( x is TreeNode tn1 && tn1 . Parent == null && y is TreeNode tn2 && tn2 . Parent == null )
132
+ {
133
+ return ( int ) tn1 . Tag - ( int ) tn2 . Tag ;
134
+ }
131
135
132
136
return 0 ;
133
137
}
@@ -224,7 +228,8 @@ public ClassNodeView()
224
228
{
225
229
Text = "Classes" ,
226
230
ImageIndex = 0 ,
227
- SelectedImageIndex = 0
231
+ SelectedImageIndex = 0 ,
232
+ Tag = 0
228
233
} ;
229
234
230
235
classesTreeView . Nodes . Add ( classesRootNode ) ;
@@ -233,7 +238,8 @@ public ClassNodeView()
233
238
{
234
239
Text = "Enums" ,
235
240
ImageIndex = 2 ,
236
- SelectedImageIndex = 2
241
+ SelectedImageIndex = 2 ,
242
+ Tag = 1
237
243
} ;
238
244
239
245
classesTreeView . Nodes . Add ( enumsRootNode ) ;
You can’t perform that action at this time.
0 commit comments