当前位置: 首页>>代码示例>>C#>>正文


C# Shape.GluedShapes方法代码示例

本文整理汇总了C#中Shape.GluedShapes方法的典型用法代码示例。如果您正苦于以下问题:C# Shape.GluedShapes方法的具体用法?C# Shape.GluedShapes怎么用?C# Shape.GluedShapes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shape的用法示例。


在下文中一共展示了Shape.GluedShapes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CalculateGatewayDirection

        private IOwlIndividual CalculateGatewayDirection(Shape shape, IOwlIndividual individual)
        {
            /*
             * formal Table 8.46
             * Unspecified: There are no constraints. The Gateway MAY have any number of incoming and outgoing Sequence Flows.
             * Converging: This Gateway MAY have multiple incoming Sequence Flows but MUST have no more than one (1) outgoing Sequence Flow.
             * Diverging: This Gateway MAY have multiple outgoing Sequence Flows but MUST have no more than one (1) incoming Sequence Flow.
             * Mixed: This Gateway contains multiple outgoing and multiple incoming Sequence Flows.
            */

            int incomingNumber = shape.GluedShapes(VisGluedShapesFlags.visGluedShapesIncoming1D, "", null).Length;
            int outgoingNumber = shape.GluedShapes(VisGluedShapesFlags.visGluedShapesOutgoing1D, "", null).Length;

            OwlIndividual gatewayDirection;

            if (incomingNumber > 1 && outgoingNumber <= 1)
            {
                //Converging
                gatewayDirection = (OwlIndividual)this._graph.Nodes[ToolKit.GetFullName(Constant.BPMN_TARGET_NAMESPACE, "Converging")];

            }
            else if (incomingNumber <= 1 && outgoingNumber > 1)
            {
                //Diverging
                gatewayDirection = (OwlIndividual)this._graph.Nodes[ToolKit.GetFullName(Constant.BPMN_TARGET_NAMESPACE, "Diverging")];
            }
            else if (incomingNumber > 1 && outgoingNumber > 1)
            {
                //Mixed
                gatewayDirection = (OwlIndividual)this._graph.Nodes[ToolKit.GetFullName(Constant.BPMN_TARGET_NAMESPACE, "Mixed")];
            }
            else
            {
                //Unspecified
                gatewayDirection = (OwlIndividual)this._graph.Nodes[ToolKit.GetFullName(Constant.BPMN_TARGET_NAMESPACE, "Unspecified")];

            }

            IOwlEdge hasGatewayDirection = new OwlEdge(ToolKit.GetFullName(Constant.BPMN_TARGET_NAMESPACE, "hasGatewayDirection"));
            hasGatewayDirection.ChildNode = gatewayDirection;

            individual.AttachChildEdge(hasGatewayDirection);

            return individual;
        }
开发者ID:ryukinkou,项目名称:IdmTranslateProgram,代码行数:45,代码来源:GatewayFactory.cs

示例2: BuildFlowRelationship

        private IOwlIndividual BuildFlowRelationship(Shape shape, IOwlIndividual individual)
        {
            Array incomingFlow = shape.GluedShapes(VisGluedShapesFlags.visGluedShapesIncoming1D, "", null);

            foreach (int id in incomingFlow)
            {
                Shape flow = this._page.Shapes.get_ItemFromID(id);
                //Console.WriteLine(ToolKit.FlowElementNaming(this._page, flow));
                //TODO build relationship
            }

            Array outgoingFlow = shape.GluedShapes(VisGluedShapesFlags.visGluedShapesOutgoing1D, "", null);

            foreach (int ID in outgoingFlow)
            {
                Shape flow = this._page.Shapes.get_ItemFromID(ID);
                //Console.WriteLine(ToolKit.FlowElementNaming(this._page, flow));
                //TODO build relationship
            }

            return individual;
        }
开发者ID:ryukinkou,项目名称:IdmTranslateProgram,代码行数:22,代码来源:GatewayFactory.cs

示例3: QueryFlowRelationship

        public static Shape[] QueryFlowRelationship(Shape shape, VisGluedShapesFlags flag)
        {
            Array idArray = shape.GluedShapes(flag, "", null);

            List<Shape> shapes = new List<Shape>();

            foreach (int id in idArray)
            {
                Shape gluedShape = shape.ContainingPage.Shapes.get_ItemFromID(id);
                shapes.Add(gluedShape);
            }

            return shapes.ToArray();
        }
开发者ID:ryukinkou,项目名称:IdmTranslateProgram,代码行数:14,代码来源:ToolKit.cs


注:本文中的Shape.GluedShapes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。