Changeset 12499 for branches/BubbleChart
- Timestamp:
- 06/23/15 16:02:53 (9 years ago)
- Location:
- branches/BubbleChart
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/BubbleChartView.cs
r12498 r12499 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing;25 24 using System.Linq; 26 25 using System.Windows.Forms; … … 31 30 using HeuristicLab.Data; 32 31 using HeuristicLab.MainForm; 33 using HeuristicLab.MainForm.WindowsForms;34 32 35 33 namespace HeuristicLab.Optimization.BubbleChart { … … 46 44 private string YAxisValue { get { return (string)yAxisComboBox.SelectedItem; } } 47 45 private string SizeAxisValue { get { return (string)sizeComboBox.SelectedItem; } } 46 47 private bool updating = false; 48 48 49 49 public new RecursiveDataItem Content { … … 304 304 } 305 305 } 306 307 private void UpdateNodeColors() {308 var selectedDepth = treeView.SelectedNode != null ? treeView.SelectedNode.Level : (int?)null;309 var selectedIndex = treeView.SelectedNode != null ? treeView.SelectedNode.Index : (int?)null;310 foreach (TreeNode node in treeView.Nodes) {311 UpdateNodeColor(node, selectedDepth, selectedIndex);312 }313 }314 private void UpdateNodeColor(TreeNode node, int? depth, int? index) {315 if (depth.HasValue && index.HasValue && node.Level == depth /*&& node.Index == index*/)316 node.BackColor = Color.Yellow;317 else318 node.BackColor = Color.White;319 foreach (TreeNode child in node.Nodes)320 UpdateNodeColor(child, depth, index);321 }322 306 #endregion 323 307 324 308 #region Event Handlers 325 309 private void treeView_AfterCheck(object sender, TreeViewEventArgs e) { 310 if (updating) return; 311 updating = true; 326 312 UpdateComboBoxes(); 327 313 UpdateDataPoints(); 314 updating = false; 328 315 } 329 316 private void treeView_AfterSelect(object sender, TreeViewEventArgs e) { … … 334 321 335 322 private void axisComboBox_SelectedValueChanged(object sender, EventArgs e) { 323 if (updating) return; 324 updating = true; 336 325 UpdateDataPoints(); 337 326 UpdateAxisLabels(); 327 updating = false; 338 328 } 339 329 340 330 private void includeChildrenCheckBox_CheckedChanged(object sender, EventArgs e) { 331 if (updating) return; 332 updating = true; 341 333 UpdateTreeViewCheckBoxes(); 342 334 UpdateComboBoxes(); 335 updating = false; 343 336 } 344 337 345 338 private void levelNumericUpDown_ValueChanged(object sender, EventArgs e) { 339 if (updating) return; 340 updating = true; 346 341 UpdateTreeViewCheckBoxes(); 347 342 UpdateComboBoxes(); 343 updating = false; 348 344 } 349 345 #endregion … … 363 359 } 364 360 } 365 366 private void BeginUpdateComboBoxes() {367 xAxisComboBox.BeginUpdate();368 yAxisComboBox.BeginUpdate();369 sizeComboBox.BeginUpdate();370 }371 private void EndUpdateComboBoxes() {372 xAxisComboBox.EndUpdate();373 yAxisComboBox.EndUpdate();374 sizeComboBox.EndUpdate();375 }376 361 #endregion 377 362 }
Note: See TracChangeset
for help on using the changeset viewer.