External/Aga.Controls/Tree/Input/InputWithControl.cs
changeset 345 0c551e8818e0
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/External/Aga.Controls/Tree/Input/InputWithControl.cs	Sun May 27 15:16:19 2012 +0000
     1.3 @@ -0,0 +1,30 @@
     1.4 +using System;
     1.5 +using System.Collections.Generic;
     1.6 +using System.Text;
     1.7 +
     1.8 +namespace Aga.Controls.Tree
     1.9 +{
    1.10 +	internal class InputWithControl: NormalInputState
    1.11 +	{
    1.12 +		public InputWithControl(TreeViewAdv tree): base(tree)
    1.13 +		{
    1.14 +		}
    1.15 +
    1.16 +		protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
    1.17 +		{
    1.18 +			if (Tree.SelectionMode == TreeSelectionMode.Single)
    1.19 +			{
    1.20 +				base.DoMouseOperation(args);
    1.21 +			}
    1.22 +			else if (CanSelect(args.Node))
    1.23 +			{
    1.24 +				args.Node.IsSelected = !args.Node.IsSelected;
    1.25 +				Tree.SelectionStart = args.Node;
    1.26 +			}
    1.27 +		}
    1.28 +
    1.29 +		protected override void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
    1.30 +		{
    1.31 +		}
    1.32 +	}
    1.33 +}