コード例 #1
0
        public virtual StartEventBuilder startEvent(string id)
        {
            StartEvent start     = createChild(typeof(StartEvent), id);
            BpmnShape  bpmnShape = createBpmnShape(start);

            Coordinates = bpmnShape;
            return(start.builder());
        }
コード例 #2
0
        public virtual StartEventBuilder startEvent(string id)
        {
            StartEvent start = createChild(typeof(StartEvent), id);

            BpmnShape startShape      = createBpmnShape(start);
            BpmnShape subProcessShape = findBpmnShape(Element);

            if (subProcessShape != null)
            {
                Bounds subProcessBounds = subProcessShape.Bounds;
                Bounds startBounds      = startShape.Bounds;

                double subProcessX      = subProcessBounds.getX().Value;
                double subProcessY      = subProcessBounds.getY().Value;
                double subProcessHeight = subProcessBounds.getHeight().Value;
                double startHeight      = startBounds.getHeight().Value;

                startBounds.setX(subProcessX + SPACE);
                startBounds.setY(subProcessY + subProcessHeight / 2 - startHeight / 2);
            }

            return(start.builder());
        }