protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     if (Tree.SelectionMode == TreeSelectionMode.Single)
     {
         base.DoMouseOperation(args);
     }
     else if (CanSelect(args.Node))
     {
         args.Node.IsSelected = !args.Node.IsSelected;
         Tree.SelectionStart  = args.Node;
     }
 }
 public override void MouseUp(TreeNodeAdvMouseEventArgs args)
 {
     Tree.ItemDragMode = false;
     if (_mouseDownFlag)
     {
         if (args.Button == MouseButtons.Left)
         {
             DoMouseOperation(args);
         }
         else if (args.Button == MouseButtons.Right)
         {
             Tree.CurrentNode = args.Node;
         }
     }
     _mouseDownFlag = false;
 }
 protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     Tree.SuspendSelectionEvent = true;
     try
     {
         Tree.ClearSelection();
         if (args.Node != null)
         {
             args.Node.IsSelected = true;
         }
         Tree.SelectionStart = args.Node;
     }
     finally
     {
         Tree.SuspendSelectionEvent = false;
     }
 }
 protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     if (Tree.SelectionMode == TreeSelectionMode.Single || Tree.SelectionStart == null)
     {
         base.DoMouseOperation(args);
     }
     else if (CanSelect(args.Node))
     {
         Tree.SuspendSelectionEvent = true;
         try
         {
             SelectAllFromStart(args.Node);
         }
         finally
         {
             Tree.SuspendSelectionEvent = false;
         }
     }
 }
 public override void MouseUp(TreeNodeAdvMouseEventArgs args)
 {
     FinishResize();
 }
 public override void MouseDown(TreeNodeAdvMouseEventArgs args)
 {
 }
Esempio n. 7
0
 public abstract void MouseUp(TreeNodeAdvMouseEventArgs args);
 protected override void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
 {
 }
 protected virtual void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
 {
     Tree.ClearSelection();
 }