// Return true if this is being made a favorite, which // should cause the expansion of the original node to be cancelled protected bool MakeFavorite(bool doExpand) { if (_typeLib.Registered && !HasRemoveFavorite()) { // This may already be a favorite, since it got // moved there when it was translated (if it was just // translated) BrowserTreeNode foundNode = ComSupport.FindTypeLib(_typeLib.Key, ComSupport.FavoriteTypeLibNode); if (foundNode == null) { // Not in the favorites, put it there foundNode = new ComTypeLibTreeNode(_typeLib); ComSupport.FavoriteTypeLibNode.AddLogicalNode(foundNode); } _typeLib.RememberMe(); if (doExpand) { foundNode.Expand(); foundNode.PointToNode(); // Cancel expansion of original node return(true); } } return(false); }