Changeset 12506 for trunk/sources/HeuristicLab.Optimizer
- Timestamp:
- 06/25/15 11:51:04 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r12504 r12506 96 96 foreach (var category in categories) { 97 97 var fullName = category.Key; 98 var tokens = fullName.Split(new[] { CreatableAttribute.Categories.Splitter }, StringSplitOptions.RemoveEmptyEntries); 98 var tokensWithOrdering = fullName.Split(new[] { CreatableAttribute.Categories.SplitToken }, StringSplitOptions.RemoveEmptyEntries); 99 var tokens = tokensWithOrdering.Select(t => t.Split(new[] { CreatableAttribute.Categories.OrderToken }, StringSplitOptions.RemoveEmptyEntries).Last()).ToList(); 99 100 var name = tokens.Last(); 100 var parents = tokens .Take(tokens.Length- 1);101 var parents = tokensWithOrdering.Take(tokens.Count - 1); 101 102 102 103 var categoryNode = new TreeNode(name, imageIndex: 1, selectedImageIndex: 1) { … … 118 119 string fullName = null; 119 120 foreach (string parentCategory in parentCategories) { 120 fullName = fullName == null ? parentCategory : fullName + "#"+ parentCategory;121 fullName = fullName == null ? parentCategory : fullName + CreatableAttribute.Categories.SplitToken + parentCategory; 121 122 parentNode = node.Nodes.Find(fullName, searchAllChildren: false).SingleOrDefault(); 122 123 if (parentNode == null) {
Note: See TracChangeset
for help on using the changeset viewer.