Changeset 9835 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs
- Timestamp:
- 08/01/13 13:01:40 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking
- Property svn:ignore
-
old new 1 *.suo 2 _ReSharper.HeuristicLab.Tracking 1 _ReSharper.Sliding Window GP 3 2 bin
-
- Property svn:mergeinfo changed
/branches/Sliding Window GP (added) merged: 7820,7837,7845,7850,9047,9126,9145,9162-9165 -
Property
svn:global-ignores
set to
_ReSharper.HeuristicLab.Tracking
- Property svn:ignore
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs
r9420 r9835 88 88 89 89 public GenealogyGraphChart() { 90 // InitializeComponent(); 90 91 Chart = new Chart(0, 0, PreferredSize.Width, PreferredSize.Height); 91 92 x = 0; 92 93 y = PreferredSize.Height + Cx + 2 * Diameter; 94 Chart.Mode = ChartMode.Select; 93 95 } 94 96 … … 190 192 191 193 protected override void pictureBox_MouseMove(object sender, MouseEventArgs e) { 192 if (!drawing) 194 if (!drawing) { 195 switch (e.Button) { 196 case MouseButtons.Left: 197 Chart.Mode = ChartMode.Select; 198 Cursor = Cursors.Default; 199 break; 200 case MouseButtons.Middle: 201 Chart.Mode = ChartMode.Move; 202 Cursor = Cursors.Hand; 203 break; 204 } 193 205 base.pictureBox_MouseMove(sender, e); 206 } 194 207 } 195 208 196 209 protected override void pictureBox_MouseUp(object sender, MouseEventArgs e) { 210 Cursor = Cursors.Default; 211 if (Chart.Mode == ChartMode.Move) { 212 Chart.Mode = ChartMode.Select; 213 return; 214 } 215 197 216 if (Chart.Mode != ChartMode.Select) { 198 217 base.pictureBox_MouseUp(sender, e); 199 218 return; 200 219 } 220 201 221 var visualNodes = Chart.GetAllPrimitives(e.Location).Where(p => p is VisualGenealogyGraphNode).ToList(); 202 222 if (visualNodes.Count <= 0) { … … 280 300 } 281 301 302 public void HighlightNodes(IEnumerable<SymbolicExpressionGenealogyGraphNode> nodes) { 303 Chart.UpdateEnabled = false; 304 ClearAllNodes(); 305 foreach (var node in nodes) { 306 GetVisualGenealogyGraphNode(node).Brush = new SolidBrush(node.GetColor()); 307 } 308 Chart.UpdateEnabled = true; 309 Chart.EnforceUpdate(); 310 } 311 282 312 // TODO: optimize and reduce complexity of this method 283 313 public void HighlightNodes(IEnumerable<ISymbolicExpressionTree> trees) {
Note: See TracChangeset
for help on using the changeset viewer.