Пример #1
0
        private GMenuItem GetMenuFrom(ParamNode n, Action a, ActionHandler ah)
        {
            GMenuItem item;

            if (n.Param != null)
            {
                item = new GParamMenu(n, ah, a);
            }
            else
            {
                item = new GMenuItem(n.Name);
            }
            if (n.Nodes != null)
            {
                for (int i = 0; i < n.Nodes.Length; i++)
                {
                    item.Add(this.GetMenuFrom(n.Nodes[i], a, ah));
                }
            }
            return(this.FormatMenu(item));
        }
Пример #2
0
 private GMenuItem GetMenuFrom(ParamNode n, Action a, ActionHandler ah)
 {
     GMenuItem item;
     if (n.Param != null)
     {
         item = new GParamMenu(n, ah, a);
     }
     else
     {
         item = new GMenuItem(n.Name);
     }
     if (n.Nodes != null)
     {
         for (int i = 0; i < n.Nodes.Length; i++)
         {
             item.Add(this.GetMenuFrom(n.Nodes[i], a, ah));
         }
     }
     return this.FormatMenu(item);
 }