Ejemplo n.º 1
0
        public Activity CreateActivity(IBaseElement baseElement)
        {
            Activity result = new Activity();

            result.Description   = new Description();
            result.Documentation = new Documentation();
            IdElement idElement = baseElement as IdElement;

            if (idElement != null)
            {
                result.Name = baseElement.Name;
                result.Id   = idElement.GetId();
            }
            VisualElement visualElement = baseElement as VisualElement;

            if (visualElement != null)
            {
                result.NodeGraphicsInfos = new NodeGraphicsInfos();
                result.NodeGraphicsInfos.NodeGraphicsInfo = new NodeGraphicsInfo[1];
                NodeGraphicsInfo info = new NodeGraphicsInfo();
                info.ToolId = VisualElementTools.GetToolId(visualElement);
                info.SetSize(visualElement);
                result.NodeGraphicsInfos.NodeGraphicsInfo[0] = info;
            }
            ProcessActivity(result, baseElement);
            return(result);
        }
Ejemplo n.º 2
0
        public IBaseElement CreateElement(object xpdlItem, NodeGraphicsInfos graphicInfo)
        {
            IBaseElement baseElement = CreateElement(xpdlItem);

            if (graphicInfo != null)
            {
                VisualElement visualElement = baseElement as VisualElement;
                if (visualElement != null)
                {
                    VisualElementTools.SetVisualElementInfo(graphicInfo, visualElement);
                }
            }
            return(baseElement);
        }