示例#1
0
        private void SelectNodes(SelectedItemCollection selection)
        {
            List <object>          objects = selection.AsObjects();
            List <VirtualTreeNode> nodes   = new List <VirtualTreeNode>(objects.ConvertAll(o => FindInTree(o)));

            if (!nodes.Contains(null))
            {
                Assert.IsTrue(SelectInTree(objects.ToArray()), "Couldn't select node for selection.");
            }
            else
            {
                PutInNavigationMode(NativeMode);

                nodes = new List <VirtualTreeNode>(objects.ConvertAll(o => FindInTree(o)));

                Assert.IsFalse(nodes.Contains(null), "Couldn't find nodes for selection.");
                Assert.IsTrue(SelectInTree(objects.ToArray()), "Couldn't select node for selection.");
            }
        }
示例#2
0
        private void SelectNodes(SelectedItemCollection selection)
        {
            List<object> objects = selection.AsObjects();
            List<VirtualTreeNode> nodes = new List<VirtualTreeNode>(objects.ConvertAll(o => FindInTree(o)));

            if (!nodes.Contains(null))
            {
                Assert.IsTrue(SelectInTree(objects.ToArray()), "Couldn't select node for selection.");
            }
            else
            {
                PutInNavigationMode(NativeMode);

                nodes = new List<VirtualTreeNode>(objects.ConvertAll(o => FindInTree(o)));

                Assert.IsFalse(nodes.Contains(null), "Couldn't find nodes for selection.");
                Assert.IsTrue(SelectInTree(objects.ToArray()), "Couldn't select node for selection.");
            }
        }