本文整理汇总了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;
}
示例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;
}
示例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();
}