Ejemplo n.º 1
0
 protected virtual void OnNodeMouseDoubleClick(DynamicTreeNodeMouseEventArgs e)
 {
     if (NodeMouseDoubleClick != null)
     {
         NodeMouseDoubleClick(this, e);
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnNodeMouseUp(DynamicTreeNodeMouseEventArgs e)
 {
     if (NodeMouseUp != null)
     {
         NodeMouseUp(this, e);
     }
 }
        private void treeView_NodeMouseDown(object sender, DynamicTreeNodeMouseEventArgs e)
        {
            DynamicTreeNode selection = e.Node;

            if (selection == null && e.Button == MouseButtons.Right)
            {
                //select regardless of horizontal alignment in the view
                selection =
                    treeView.Nodes.VisibleNodes.Where(node => node.Bounds.Top <= e.Y && node.Bounds.Bottom >= e.Y).
                        FirstOrDefault();
            }

            treeView.SelectedNode = selection;
            btnRemove.Enabled = selection != null;
        }
 protected virtual void OnNodeMouseUp(DynamicTreeNodeMouseEventArgs e)
 {
     if (NodeMouseUp != null)
         NodeMouseUp(this, e);
 }
 protected virtual void OnNodeMouseDoubleClick(DynamicTreeNodeMouseEventArgs e)
 {
     if (NodeMouseDoubleClick != null)
         NodeMouseDoubleClick(this, e);
 }