本文整理汇总了C#中MindMate.Model.MapNode.DeleteNode方法的典型用法代码示例。如果您正苦于以下问题:C# MapNode.DeleteNode方法的具体用法?C# MapNode.DeleteNode怎么用?C# MapNode.DeleteNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MindMate.Model.MapNode
的用法示例。
在下文中一共展示了MapNode.DeleteNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteNode_LastChild
public void DeleteNode_LastChild()
{
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 c2 = new MapNode(r, "c2");
cc2.DeleteNode();
Assert.AreEqual(c1.LastChild, cc1);
}
示例2: DeleteNode_RootNode
public void DeleteNode_RootNode()
{
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 c2 = new MapNode(r, "c2");
r.DeleteNode();
Assert.AreEqual(r, r.Tree.RootNode);
}
示例3: LastSelectedChild
public void LastSelectedChild()
{
var r = new MapNode(new MapTree(), "r");
var c1 = new MapNode(r, "c1");
var c11 = new MapNode(c1, "cc1");
var c12 = new MapNode(c1, "cc2");
var c2 = new MapNode(r, "c2");
c12.Selected = true;
c12.DeleteNode();
Assert.IsNull(c1.LastSelectedChild);
}