Changeset 11205 for branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs
- Timestamp:
- 07/18/14 13:44:53 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 29 29 using HeuristicLab.PluginInfrastructure; 30 30 31 using VisualSymbolicExpressionTreeNode = HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.VisualTreeNode<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTreeNode>; 32 31 33 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views { 32 34 public sealed partial class SymbolicExpressionGrammarAllowedChildSymbolsControl : UserControl { … … 103 105 104 106 var tree = new SymbolicExpressionTree(new SymbolicExpressionTreeNode(Symbol)); 105 symbolicExpressionTreeChart.SuspendRepaint = true;106 107 if (Grammar.GetMaximumSubtreeCount(Symbol) > 0) { 107 108 for (int i = 0; i < Grammar.GetMaximumSubtreeCount(Symbol); i++) { … … 116 117 } 117 118 symbolicExpressionTreeChart.Tree = tree; 118 119 symbolicExpressionTreeChart.SuspendRepaint = true; 119 120 foreach (var subtreeNode in tree.Root.Subtrees) { 120 121 foreach (var allowedChildNode in subtreeNode.Subtrees) { … … 142 143 } 143 144 } 144 145 145 symbolicExpressionTreeChart.SuspendRepaint = false; 146 146 UpdateSelectedSymbolicExpressionTreeNodes(); … … 153 153 else visualNode.FillColor = Color.LightSteelBlue; 154 154 } 155 symbolicExpressionTreeChart.Repaint ();155 symbolicExpressionTreeChart.RepaintNodes(); 156 156 } 157 157 … … 162 162 163 163 VisualSymbolicExpressionTreeNode clickedNode = (VisualSymbolicExpressionTreeNode)sender; 164 var selectedNode = clickedNode. SymbolicExpressionTreeNode;164 var selectedNode = clickedNode.Content; 165 165 if (selectedNode.SubtreeCount == 0) { 166 166 if (!selectedSymbolicExpressionTreeNodes.Contains(selectedNode)) … … 207 207 var visualNode = symbolicExpressionTreeChart.FindVisualSymbolicExpressionTreeNodeAt(coordinates.X, coordinates.Y); 208 208 if (visualNode != null) { 209 var node = visualNode. SymbolicExpressionTreeNode;209 var node = visualNode.Content; 210 210 var root = symbolicExpressionTreeChart.Tree.Root; 211 211 if (node == root || node.Parent == root) e.Effect = DragDropEffects.Copy; … … 223 223 var symbols = data as IEnumerable<ISymbol>; 224 224 225 if (node. SymbolicExpressionTreeNode== root) {225 if (node.Content == root) { 226 226 if (symbol != null) 227 227 Grammar.AddAllowedChildSymbol(root.Symbol, symbol); … … 229 229 foreach (var s in symbols) Grammar.AddAllowedChildSymbol(root.Symbol, s); 230 230 } else { 231 int argumentIndex = root.IndexOfSubtree(node. SymbolicExpressionTreeNode);231 int argumentIndex = root.IndexOfSubtree(node.Content); 232 232 if (symbol != null) 233 233 Grammar.AddAllowedChildSymbol(root.Symbol, symbol, argumentIndex);
Note: See TracChangeset
for help on using the changeset viewer.