External/Aga.Controls/Tree/Input/InputWithControl.cs
author moel.mich
Sun, 27 May 2012 15:16:19 +0000
changeset 345 0c551e8818e0
permissions -rw-r--r--
Added the source code of Aga.Controls (TreeViewAdv for .Net) version 1.7.0.0.
     1 using System;
     2 using System.Collections.Generic;
     3 using System.Text;
     4 
     5 namespace Aga.Controls.Tree
     6 {
     7 	internal class InputWithControl: NormalInputState
     8 	{
     9 		public InputWithControl(TreeViewAdv tree): base(tree)
    10 		{
    11 		}
    12 
    13 		protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
    14 		{
    15 			if (Tree.SelectionMode == TreeSelectionMode.Single)
    16 			{
    17 				base.DoMouseOperation(args);
    18 			}
    19 			else if (CanSelect(args.Node))
    20 			{
    21 				args.Node.IsSelected = !args.Node.IsSelected;
    22 				Tree.SelectionStart = args.Node;
    23 			}
    24 		}
    25 
    26 		protected override void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
    27 		{
    28 		}
    29 	}
    30 }