Пример #1
0
        private void AddPoint(VisualPoint point)
        {
            points.Add(point);

            this.Children.Add(point);
            point.PositionChanged += NodePositionChanged;
        }
Пример #2
0
        public VisualEntryNode(EntryNode node, VisualFloor floor) : base(node, floor)
        {
            points = new List <VisualPoint>();
            var dx = 60;
            var dy = 30;

            topLeft     = new VisualPoint(node.Position + new Vector(-dx, -dy)); AddPoint(topLeft);
            topRight    = new VisualPoint(node.Position + new Vector(dx, -dy)); AddPoint(topRight);
            bottomRight = new VisualPoint(node.Position + new Vector(dx, dy)); AddPoint(bottomRight);
            bottomLeft  = new VisualPoint(node.Position + new Vector(-dx, dy)); AddPoint(bottomLeft);
            Dimensions  = new Rect(bottomLeft.Position, topRight.Position);
            Draw();
        }