本文整理汇总了C#中ILine.GetEndIO方法的典型用法代码示例。如果您正苦于以下问题:C# ILine.GetEndIO方法的具体用法?C# ILine.GetEndIO怎么用?C# ILine.GetEndIO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILine
的用法示例。
在下文中一共展示了ILine.GetEndIO方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Reconnect
public static void Reconnect(ICanvas canvas,
ILine line, IElement splitPin,
double x, double y,
List<Connection> connections,
ILine currentLine,
IDiagramCreator creator)
{
var wire1 = connections[0].Wires.FirstOrDefault();
var wire2 = connections[1].Wires.FirstOrDefault();
var startRoot = (wire1.Start != null ? wire1.Start : wire2.Start) as IElement;
var endRoot = (wire1.End != null ? wire1.End : wire2.End) as IElement;
PointEx start;
PointEx end;
GetLocation(wire1, wire2, out start, out end);
if (start != null && end != null)
{
var startLine = Connect(canvas, startRoot, currentLine, start.X, start.Y, creator);
var splitLine = Connect(canvas, splitPin, startLine, x, y, creator);
var endLine = Connect(canvas, splitPin, splitLine, x, y, creator);
Connect(canvas, endRoot, endLine, start.X + end.X, start.Y + end.Y, creator);
startLine.SetStartVisible(line.GetStartVisible());
startLine.SetStartIO(line.GetStartIO());
endLine.SetEndVisible(line.GetEndVisible());
endLine.SetEndIO(line.GetEndIO());
}
else
{
throw new InvalidOperationException("LineEx must have Start and End points.");
}
}