Ejemplo n.º 1
0
            internal void Relocate(EnumShape shape)
            {
                Diagram diagram = shape.Diagram;
                if (diagram != null)
                {
                    Rectangle record = shape.GetMemberRectangle(shape.ActiveMemberIndex);

                    Point absolute = new Point(shape.Right, record.Top);
                    Size relative = new Size(
                        (int)(absolute.X * diagram.Zoom) - diagram.Offset.X + MarginSize,
                        (int)(absolute.Y * diagram.Zoom) - diagram.Offset.Y);
                    relative.Height -= (Window.Height - (int)(record.Height * diagram.Zoom)) / 2;

                    Window.Location = Window.ParentLocation + relative;
                }
            }
Ejemplo n.º 2
0
 internal override void Init(DiagramElement element)
 {
     shape = (EnumShape)element;
     base.Init(element);
 }