本文整理汇总了C#中ICanvas.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# ICanvas.Remove方法的具体用法?C# ICanvas.Remove怎么用?C# ICanvas.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICanvas
的用法示例。
在下文中一共展示了ICanvas.Remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Split
public static bool Split(ICanvas canvas, ILine line, ILine currentLine, IPoint point, IDiagramCreator creator, bool snap)
{
var pin = Insert.Pin(canvas, point, creator, snap);
double x = pin.GetX();
double y = pin.GetY();
var temp = Connect(canvas, pin, currentLine, x, y, creator);
canvas.Remove(line);
var connections = ModelEditor.RemoveWireConnections(canvas, line);
if (connections != null && connections.Count == 2)
Reconnect(canvas, line, pin, x, y, connections, temp, creator);
else
throw new InvalidOperationException("LineEx should have only two connections: Start and End.");
return true;
}
示例2: MouseRemoveCurrentLine
private void MouseRemoveCurrentLine(ICanvas canvas)
{
var connection = Context.CurrentRoot.GetTag() as Connection;
var wires = connection.Wires;
var last = wires.LastOrDefault();
wires.Remove(last);
canvas.Remove(Context.CurrentLine);
}