本文整理汇总了C#中MindMate.Model.MapNode.GetSiblingLocation方法的典型用法代码示例。如果您正苦于以下问题:C# MapNode.GetSiblingLocation方法的具体用法?C# MapNode.GetSiblingLocation怎么用?C# MapNode.GetSiblingLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MindMate.Model.MapNode
的用法示例。
在下文中一共展示了MapNode.GetSiblingLocation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetSiblingLocation_NotSibling
public void GetSiblingLocation_NotSibling()
{
var r = new MapNode(new MapTree(), "r");
var c1 = new MapNode(r, "c1");
var cc1 = new MapNode(c1, "cc1");
var cc2 = new MapNode(c1, "cc2");
var cc3 = new MapNode(c1, "cc3");
var c2 = new MapNode(r, "c2");
Assert.AreEqual(cc3.GetSiblingLocation(c1), MindMate.Model.MapNode.SiblingLocaton.NotSibling);
}
示例2: GetSiblingLocation_Above_NotFirstChild
public void GetSiblingLocation_Above_NotFirstChild()
{
var r = new MapNode(new MapTree(), "r");
var c1 = new MapNode(r, "c1");
var cc1 = new MapNode(c1, "cc1");
var cc2 = new MapNode(c1, "cc2");
var cc3 = new MapNode(c1, "cc3");
var cc4 = new MapNode(c1, "cc4");
var cc5 = new MapNode(c1, "cc5");
var c2 = new MapNode(r, "c2");
Assert.AreEqual(cc4.GetSiblingLocation(cc2), MindMate.Model.MapNode.SiblingLocaton.Above);
}
示例3: GetSiblingLocation_Below_NotLastChild
public void GetSiblingLocation_Below_NotLastChild()
{
var r = new MapNode(new MapTree(), "r");
var c1 = new MapNode(r, "c1");
var cc1 = new MapNode(c1, "cc1");
var cc2 = new MapNode(c1, "cc2");
var cc3 = new MapNode(c1, "cc3");
var cc4 = new MapNode(c1, "cc4");
var cc5 = new MapNode(c1, "cc5");
var c2 = new MapNode(r, "c2");
Assert.AreEqual(cc2.GetSiblingLocation(cc5), MindMate.Model.MapNode.SiblingLocaton.Below);
}
示例4: ApplyFormatToNodesInBetween
private void ApplyFormatToNodesInBetween(MapNode node)
{
MapNode startNode = null, endNode = null;
switch (node.GetSiblingLocation(formatSource))
{
case MapNode.SiblingLocaton.Above:
startNode = formatSource;
endNode = node;
break;
case MapNode.SiblingLocaton.Below:
startNode = node;
endNode = formatSource;
break;
case MapNode.SiblingLocaton.NotSibling:
return;
}
startNode = startNode.Next;
while(startNode != endNode)
{
formatSource.CopyFormatTo(startNode);
startNode = startNode.Next;
}
}