Пример #1
0
        protected virtual void InitDocks()
        {
            if (docks == null)
            {
                docks = new DockPoint[8];

                docks[0] = new DockPoint(0, 0, LinkControlType.MiddleLeft);
                docks[1] = new DockPoint(0, 0, LinkControlType.MiddleRight);
                docks[2] = new DockPoint(0, 0, LinkControlType.TopCenter);
                docks[3] = new DockPoint(0, 0, LinkControlType.TopLeft);
                docks[4] = new DockPoint(0, 0, LinkControlType.TopRight);
                docks[5] = new DockPoint(0, 0, LinkControlType.BottomCenter);
                docks[6] = new DockPoint(0, 0, LinkControlType.BottomLeft);
                docks[7] = new DockPoint(0, 0, LinkControlType.BottomRight);
            }
        }
Пример #2
0
 public double Distance(DockPoint d)
 {
     return(Math.Sqrt(Math.Pow(X - d.X, 2) + Math.Pow(Y - d.Y, 2)));
 }