public static NaviNode FindBaseNode(NaviNode node) { var parentNode = node; while (parentNode != null && parentNode.Parent != null && parentNode.Parent.Parent != null) { parentNode = parentNode.Parent; } return(parentNode); }
public static int FindExpandableNode(NaviNode node) { var sectionId = -1; var section = node; while (section != null && section.Parent != null && section.Parent.Parent != null) { sectionId = section.Id; section = section.Parent; } return(sectionId); }