/// <include file='doc\TreeViewHitTestInfo.uex' path='docs/doc[@for="TreeViewHitTestInfo.TreeViewHitTestInfo"]/*' /> /// <devdoc> /// Creates a TreeViewHitTestInfo instance. /// </devdoc> public TreeViewHitTestInfo(TreeNode hitNode, TreeViewHitTestLocations hitLocation) { this.node = hitNode; this.loc = hitLocation; }
/// <summary> /// Hit检测结果是否在TreeNode上(目前只有在图片或文字上才会返回true) /// </summary> bool HitIsOnNode(TreeViewHitTestLocations location) { return (location & TreeViewHitTestLocations.Image) == TreeViewHitTestLocations.Image || (location & TreeViewHitTestLocations.Label) == TreeViewHitTestLocations.Label; }
public TreeViewHitTestInfo(TreeNode hitNode, TreeViewHitTestLocations hitLocation) { this.node = hitNode; this.location = hitLocation; }
public void TreeViewHitTestInfo_Ctor_TreeNode_TreeViewHitTestLocations(TreeNode hitNode, TreeViewHitTestLocations hitLocation) { var hitTestInfo = new TreeViewHitTestInfo(hitNode, hitLocation); Assert.Same(hitNode, hitTestInfo.Node); Assert.Equal(hitLocation, hitTestInfo.Location); }
// Constructors public TreeViewHitTestInfo(TreeNode hitNode, TreeViewHitTestLocations hitLocation) { }