Changeset 18067 for branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs
- Timestamp:
- 10/14/21 17:59:53 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs
r18065 r18067 8 8 using HeuristicLab.Data; 9 9 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 10 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 10 11 using HeuristicLab.MainForm; 11 12 using HeuristicLab.MainForm.WindowsForms; … … 24 25 InitializeComponent(); 25 26 errorLabel.Text = ""; 27 treeChart.SymbolicExpressionTreeNodeClicked += TreeChart_SymbolicExpressionTreeNodeClicked; 28 } 29 30 private void TreeChart_SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) { 31 var visualTreeNode = sender as VisualTreeNode<ISymbolicExpressionTreeNode>; 32 if(visualTreeNode != null) { 33 var subFunctionTreeNode = visualTreeNode.Content as SubFunctionTreeNode; 34 viewHost.Content = subFunctionTreeNode?.SubFunction; 35 } 26 36 } 27 37 … … 32 42 expressionInput.Text = Content.Template; 33 43 symRegTreeChart.Content = Content.Tree; 34 subFunctionListView.Content = new ItemList<SubFunction>(Content.SubFunctions.Values).AsReadOnly(); 35 44 45 treeChart.Tree = Content.Tree; 46 36 47 errorLabel.Text = ""; 37 48 … … 43 54 Content.Template = expressionInput.Text; 44 55 symRegTreeChart.Content = Content.Tree; 45 46 var subFunctionList = new ItemList<SubFunction>(); 47 foreach (var func in Content.SubFunctions.Values) 48 subFunctionList.Add(func); 49 subFunctionListView.Content = subFunctionList.AsReadOnly(); 56 treeChart.Tree = Content.Tree; 50 57 51 58 errorLabel.Text = "Template structure successfully parsed.";
Note: See TracChangeset
for help on using the changeset viewer.