public TristateTreeNode GetNodeAtLocation(Point point)
        {
            if (new Rectangle(new Point(0, 0), Size).Contains(point))
            {
                return(this);
            }

            Point offset = new Point(tabWidth, this.Size.Height);

            Console.WriteLine("co: " + offset);
            for (int i = 0; i < nodes.Count; i++)
            {
                TristateTreeNode node = nodes[i];
                if (new Rectangle(offset, node.BigSize).Contains(point))
                {
                    return(node.GetNodeAtLocation(
                               new Point(
                                   point.X - offset.X,
                                   point.Y - offset.Y
                                   )
                               ));
                }
                offset = node.GetDrawingOffset(GetGraphics(), offset);
                Console.WriteLine("co: " + offset);
            }
            return(null);
        }
Exemple #2
0
        private TristateTreeNode GetNodeAtLocation(Point point)
        {
            Point offset = startDrawOffset;

            for (int i = 0; i < nodes.Count; i++)
            {
                TristateTreeNode node = nodes[i];
                if (new Rectangle(offset, node.BigSize).Contains(point))
                {
                    return(node.GetNodeAtLocation(
                               new Point(
                                   point.X - offset.X,
                                   point.Y - offset.Y
                                   )
                               ));
                }
                offset = node.GetDrawingOffset(g, offset);
                Console.WriteLine("OFF: " + offset);
            }
            return(null);
        }