Ejemplo n.º 1
0
 private SystemMenuItem RecursivePath(SystemMenuItem parent, int[] path, int pathIndex)
 {
     if (path.Length == pathIndex + 1)
     {
         return(parent.GetSubItems()[path[pathIndex]]);
     }
     else
     {
         return(RecursivePath(parent.GetSubItems()[path[pathIndex]], path, pathIndex + 1));
     }
 }
Ejemplo n.º 2
0
        private List <int> RecursiveIDGetter(SystemMenuItem item)
        {
            List <int> usedIds = new List <int>();

            usedIds.Add(item.ID);
            foreach (SystemMenuItem itm in item.GetSubItems())
            {
                usedIds.AddRange(RecursiveIDGetter(itm));
            }
            return(usedIds);
        }