Пример #1
0
            public void Position(MessageProcessingRoute route)
            {
                var handler = diagram.GetItemFromContainer(route.ProcessingHandler);

                if (handler == null)
                {
                    return;
                }

                var arrow = diagram.GetItemFromContainer(route.FromArrow);

                if (arrow == null)
                {
                    return;
                }

                var routeVisual = diagram.GetItemFromContainer(route);

                if (routeVisual == null)
                {
                    return;
                }

                var height = Math.Abs(arrow.Y - handler.Y);

                routeVisual.X      = handler.X + ((handler.ActualWidth - routeVisual.ActualWidth) / 2);
                routeVisual.Y      = arrow.Y + ArrowBoundary + ArrowHeadHeight;
                routeVisual.Height = height - (3 * ArrowHeadHeight) + 1;
            }
Пример #2
0
            public void Position(MessageProcessingRoute route)
            {
                var handler = diagram.GetItemFromContainer(route.ProcessingHandler);
                if (handler == null)
                {
                    return;
                }

                var arrow = diagram.GetItemFromContainer(route.FromArrow);
                if (arrow == null)
                {
                    return;
                }

                var routeVisual = diagram.GetItemFromContainer(route);
                if (routeVisual == null)
                {
                    return;
                }

                var height = Math.Abs(arrow.Y - handler.Y);

                routeVisual.X = handler.X + ((handler.ActualWidth - routeVisual.ActualWidth) / 2);
                routeVisual.Y = arrow.Y + ArrowBoundary + ArrowHeadHeight;
                routeVisual.Height = height - (3 * ArrowHeadHeight) + 1;
            }