Пример #1
0
 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;
     }
 }
Пример #2
0
 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;
 }
Пример #3
0
 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;
     }
 }
Пример #4
0
 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)
 {
 }
Пример #7
0
 public abstract void MouseUp(TreeNodeAdvMouseEventArgs args);
Пример #8
0
 protected override void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
 {
 }
Пример #9
0
 protected virtual void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
 {
     Tree.ClearSelection();
 }