Example #1
0
        public List <TaxonTreeNode> ToTaxonTreeNodeList(TaxonTreeNode _root)
        {
            if (_root == null)
            {
                return(null);
            }

            List <TaxonTreeNode> nodes = new List <TaxonTreeNode>();

            foreach (string fullname in TaxonFullNames)
            {
                TaxonTreeNode taxon = _root.FindTaxonByFullName(fullname);
                if (taxon != null)
                {
                    nodes.Add(taxon);
                }
            }
            return(nodes);
        }
Example #2
0
        //-----------------------------------------------------------------------------------------
        void FavoritesToUI()
        {
            TaxonTreeNode root = TaxonUtils.OriginalRoot;

            if (root == null)
            {
                return;
            }

            List <TaxonTreeNode> favFound = new List <TaxonTreeNode>();

            foreach (string fav in Favorites)
            {
                TaxonTreeNode taxon = root.FindTaxonByFullName(fav);
                if (taxon != null)
                {
                    favFound.Add(taxon);
                }
            }
            TaxonUtils.FavoritesSet(favFound);
        }