Changeset 9055
- Timestamp:
- 12/14/12 11:18:01 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.cs
r8110 r9055 40 40 protected override void OnContentChanged() { 41 41 base.OnContentChanged(); 42 symbolicExpressionTreeView.Content = null; 42 43 if (Content != null) 43 44 symbolicExpressionTreeView.Content = Content.SymbolicExpressionTree; 44 else45 symbolicExpressionTreeView.Content = null;46 45 } 47 46 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs
r9043 r9055 67 67 // viewHost 68 68 // 69 this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 70 | System.Windows.Forms.AnchorStyles.Left) 69 this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 70 | System.Windows.Forms.AnchorStyles.Left) 71 71 | System.Windows.Forms.AnchorStyles.Right))); 72 72 this.viewHost.Caption = "View"; … … 126 126 // flowLayoutPanel 127 127 // 128 this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 128 this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 129 129 | System.Windows.Forms.AnchorStyles.Right))); 130 130 this.flowLayoutPanel.Controls.Add(this.btnSimplify); … … 170 170 // treeChart 171 171 // 172 this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 173 | System.Windows.Forms.AnchorStyles.Left) 172 this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 173 | System.Windows.Forms.AnchorStyles.Left) 174 174 | System.Windows.Forms.AnchorStyles.Right))); 175 175 this.treeChart.BackgroundColor = System.Drawing.Color.White; … … 184 184 this.treeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F); 185 185 this.treeChart.Tree = null; 186 this.treeChart.SymbolicExpressionTreeNodeClicked += new System.Windows.Forms.MouseEventHandler(this.treeChart_SymbolicExpressionTreeNodeClicked);187 186 this.treeChart.SymbolicExpressionTreeNodeDoubleClicked += new System.Windows.Forms.MouseEventHandler(this.treeChart_SymbolicExpressionTreeNodeDoubleClicked); 188 187 // -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r9043 r9055 108 108 treeStatusValue.ForeColor = Color.Green; 109 109 } else { 110 btnOptimizeConstants.Enabled = true;111 btnSimplify.Enabled = true;110 btnOptimizeConstants.Enabled = false; 111 btnSimplify.Enabled = false; 112 112 treeStatusValue.Text = "Invalid"; 113 113 treeStatusValue.ForeColor = Color.Red; … … 167 167 constantTreeNode.Value = value; 168 168 return constantTreeNode; 169 }170 171 private void treeChart_SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {172 169 } 173 170 … … 186 183 parent.InsertSubtree(indexOfSubtree, originalNode); 187 184 changedNodes.Remove(symbExprTreeNode); 188 UpdateModel(tree);189 185 } else if (foldedNodes.ContainsKey(symbExprTreeNode)) { 190 186 // undo node folding 191 187 SwitchNodeWithReplacementNode(parent, indexOfSubtree); 192 UpdateModel(tree);193 }188 } 189 UpdateModel(tree); 194 190 } 195 191 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs
r9043 r9055 79 79 80 80 protected override void OnSymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) { 81 if (currSelected != null) {82 currSelected.LineColor = Color.FromArgb(255, currSelected.LineColor);83 RepaintNode(currSelected);84 }85 81 currSelected = (VisualSymbolicExpressionTreeNode)sender; ; 86 82 if (currSelected != null) { … … 88 84 RepaintNode(currSelected); 89 85 } 86 base.OnSymbolicExpressionTreeNodeClicked(sender, e); 90 87 } 91 88 92 89 protected override void SymbolicExpressionTreeChart_MouseClick(object sender, MouseEventArgs e) { 93 var visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y); 94 if (visualTreeNode != null) { 95 OnSymbolicExpressionTreeNodeClicked(visualTreeNode, e); 96 } else if (currSelected != null) { 90 if (currSelected != null) { 97 91 currSelected.LineColor = Color.FromArgb(255, currSelected.LineColor); 98 92 RepaintNode(currSelected); 99 currSelected = null;100 }93 } 94 base.SymbolicExpressionTreeChart_MouseClick(sender, e); 101 95 } 102 96 … … 173 167 private void copySubtree() { 174 168 if (tempNode != null) { 175 foreach (var subtree in tempNode.IterateNodesBreadth()) { 176 var vNode = GetVisualSymbolicExpressionTreeNode(subtree); 177 vNode.LineColor = Color.FromArgb(255, vNode.LineColor); // reset the alpha value to 255 169 foreach (var subtree in tempNode.IterateNodesPostfix()) { 170 var visualNode = GetVisualSymbolicExpressionTreeNode(subtree); 171 visualNode.LineColor = Color.FromArgb(255, visualNode.LineColor); // reset the alpha value to 255 172 visualNode.TextColor = Color.FromArgb(255, visualNode.TextColor); 178 173 if (subtree.Parent != null) { 179 var v Arc= GetVisualSymbolicExpressionTreeNodeConnection(subtree.Parent, subtree);180 v Arc.LineColor = Color.FromArgb(255, vArc.LineColor);174 var visualLine = GetVisualSymbolicExpressionTreeNodeConnection(subtree.Parent, subtree); 175 visualLine.LineColor = Color.FromArgb(255, visualLine.LineColor); 181 176 } 182 177 } … … 197 192 private void removeNodeToolStripMenuItem_Click(object sender, EventArgs e) { 198 193 var node = currSelected.SymbolicExpressionTreeNode; 194 if (node == tempNode) tempNode = null; 199 195 ModifyTree(Tree, node.Parent, node, null, removeSubtree: false); 200 196 currSelected = null; // because the currently selected node was just deleted … … 202 198 private void removeSubtreeToolStripMenuItem_Click(object sender, EventArgs e) { 203 199 var node = currSelected.SymbolicExpressionTreeNode; 200 if (node.IterateNodesPostfix().Contains(tempNode)) tempNode = null; 204 201 ModifyTree(Tree, node.Parent, node, null, removeSubtree: true); 205 202 currSelected = null; // because the currently selected node was just deleted
Note: See TracChangeset
for help on using the changeset viewer.