Пример #1
0
 private void BrowseNodesTV_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         TreeNode tn = BrowseNodesTV.GetNodeAt(e.X, e.Y);
         if (tn != null)
         {
             BrowseNodesTV.SelectedNode = tn;
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Ensures the correct node is selected before displaying the context menu.
 /// </summary>
 private void BrowseNodesTV_MouseDown(object sender, MouseEventArgs e)
 {
     try
     {
         BrowseNodesTV.SelectedNode = BrowseNodesTV.GetNodeAt(e.X, e.Y);
     }
     catch (Exception exception)
     {
         ClientUtils.HandleException(this.Text, exception);
     }
 }