Changeset 6496 for trunk/sources
- Timestamp:
- 06/29/11 00:33:48 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentTreeView.Designer.cs
r6485 r6496 167 167 this.optimizerTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.optimizerTreeView_DragOver); 168 168 this.optimizerTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.optimizerTreeView_KeyDown); 169 this.optimizerTreeView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.optimizerTreeview_MouseClick);170 169 this.optimizerTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.optimizerTreeView_MouseDown); 170 this.optimizerTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.optimizerTreeview_NodeMouseClick); 171 this.optimizerTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(optimizerTreeView_NodeMouseDoubleClick); 171 172 // 172 173 // imageList … … 221 222 222 223 } 223 224 224 #endregion 225 225 -
trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentTreeView.cs
r6488 r6496 29 29 using HeuristicLab.Common; 30 30 using HeuristicLab.Core.Views; 31 using HeuristicLab.MainForm; 31 32 using HeuristicLab.PluginInfrastructure; 32 33 … … 496 497 497 498 #region control events 498 private void optimizerTreeview_MouseClick(object sender, MouseEventArgs e) { 499 Point coordinates = new Point(e.X, e.Y); 500 TreeNode selectedNode = optimizerTreeView.GetNodeAt(coordinates); 501 if (selectedNode != null) { 502 optimizerTreeView.SelectedNode = selectedNode; 503 detailsViewHost.Content = (IOptimizer)selectedNode.Tag; 504 SetEnabledStateOfControls(); 505 } 499 private void optimizerTreeView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { 500 if (e.X < e.Node.Bounds.Left || e.X > e.Node.Bounds.Right) return; 501 IOptimizer optimizer = (IOptimizer)e.Node.Tag; 502 MainFormManager.MainForm.ShowContent(optimizer); 503 } 504 private void optimizerTreeview_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { 505 if (e.X < e.Node.Bounds.Left || e.X > e.Node.Bounds.Right) return; 506 optimizerTreeView.SelectedNode = e.Node; 507 detailsViewHost.Content = (IOptimizer)e.Node.Tag; 508 SetEnabledStateOfControls(); 506 509 } 507 510 private void optimizerTreeView_MouseDown(object sender, MouseEventArgs e) { 508 511 // enables deselection of treeNodes 512 if (e.Button != System.Windows.Forms.MouseButtons.Left) return; 509 513 if (optimizerTreeView.SelectedNode == null) return; 510 514 Point coordinates = new Point(e.X, e.Y); 511 if (e.Button == System.Windows.Forms.MouseButtons.Left && optimizerTreeView.GetNodeAt(coordinates) == null) { 515 TreeNode node = optimizerTreeView.GetNodeAt(coordinates); 516 if (node == null || coordinates.X < node.Bounds.Left || coordinates.X > node.Bounds.Right) { 512 517 optimizerTreeView.SelectedNode = null; 513 518 detailsViewHost.Content = null;
Note: See TracChangeset
for help on using the changeset viewer.