当前位置: 首页>>代码示例>>C#>>正文


C# MapNode.GetSiblingLocation方法代码示例

本文整理汇总了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);
        }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例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);
        }
开发者ID:,项目名称:,代码行数:13,代码来源:

示例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);
        }
开发者ID:,项目名称:,代码行数:13,代码来源:

示例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;
            }
        }
开发者ID:,项目名称:,代码行数:24,代码来源:


注:本文中的MindMate.Model.MapNode.GetSiblingLocation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。