Ejemplo n.º 1
0
        public Node createTextNode_wiring(string text, PointF pt, Node parent)
        {
            Node label = new Node();

            gMeasureString.PageUnit = GraphicsUnit.Pixel;
            Font ft = textFont_wiring;

            label.FontFamily = new System.Windows.Media.FontFamily("Arial");
            label.FontSize   = 11;
            SizeF size = gMeasureString.MeasureString(text, ft);

            label.Fill         = System.Windows.Media.Brushes.Transparent;
            label.Text         = text;
            label.Size         = new System.Windows.Size(size.Width + 15, size.Height);
            label.Stroke       = System.Windows.Media.Brushes.Transparent;
            label.Geometry     = new RectangleGeometry(new System.Windows.Rect(0, 0, 0, 0));
            label.IsSelectable = false;
            System.Windows.Point ptToPoint = new System.Windows.Point(pt.X, pt.Y);
            System.Windows.Point location  = UtilityWiring.OffsetLocation(ptToPoint, parent.Location);
            if (parent is ng.WiringNodeCH)
            {
                location.X -= 60;
            }
            label.Location = location;
            parent.AddFlow.AddNode(label);
            return(label);
        }
Ejemplo n.º 2
0
 public Wiring(JCHVRF.Model.Project project, ng.SystemVRF systemVRF, AddFlow AddFlowWiring)
 {
     thisProject   = project;
     sysItem       = systemVRF;
     addFlowWiring = AddFlowWiring;
     DoDrawingWiring(thisProject, sysItem);
     utilWiring = new UtilityWiring(thisProject);
 }