internal int getDepth()
 {
     if (_parent != null)
     {
         return(_parent.getDepth() + 1);
     }
     else
     {
         return(0);
     }
 }
Beispiel #2
0
        internal void Dragging(DockingContainer movingObj, int x, int y)
        {
            int maxDepth = 0;
            int depth;
            DockingContainer selectedSuccessor = null;

            this.Invalidate();
            foreach (DockingContainer d in _successors.Values)
            {
                //for (int i = 0; i < _successors.Count; i++)
                //{

                if (CoodinateHandling.isEntered(d, 0, 0) && d.isInPopup() == false)
                {
                    if ((depth = d.getDepth()) > maxDepth)
                    {
                        maxDepth          = depth;
                        selectedSuccessor = d;
                    }
                }
            }
            if (maxDepth > 0)
            {
                Rectangle rect   = CoodinateHandling.FromClientToClient(selectedSuccessor, this);
                Point     center = CoodinateHandling.getCenter(rect, _iconCenter.Width, _iconCenter.Height);

                ShowSelection(checkIfOverCenterBtns(), selectedSuccessor, movingObj);
                _iconCenter.SetBounds(center.X, center.Y, 0, 0, BoundsSpecified.Location);
                _iconCenter.Show();
                _iconCenter.BringToFront();
                _iconCenter.label1.Text = "" + selectedSuccessor.getDepth() + "/" + selectedSuccessor.Name + "/" + selectedSuccessor.getContainerType().ToString();
            }
            else
            {
                _selection.Hide();
            }
        }