External/Aga.Controls/Tree/Input/InputWithControl.cs
author Stephane Lenclud
Sat, 30 Jan 2016 23:01:51 +0100
branchMiniDisplay
changeset 454 f84878f52cd9
permissions -rw-r--r--
Disabling Nuvoton NCT6791D because of fan full speed bug on Asus Z97 WS.
     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 }