External/Aga.Controls/Tree/Input/InputWithControl.cs
author sl
Thu, 01 Jan 2015 23:35:49 +0100
changeset 405 5715aefd2bcc
permissions -rw-r--r--
SharpDisplay: Migrating to new robust client scheme.
     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 }