Ejemplo n.º 1
0
        private GMenuItem GetMenuFrom(ActionNode n)
        {
            GMenuItem mi = new GMenuItem(n.Name);

            for (int i = 0; i < n.Nodes.Count; i++)
            {
                mi.Add(this.GetMenuFrom((ActionNode)n.Nodes[i]));
            }
            for (int j = 0; j < n.Handlers.Count; j++)
            {
                ActionHandler action = (ActionHandler)n.Handlers[j];
                GMenuItem     item2  = new GNewActionMenu(this, this.m_Macro, action);
                for (int k = 0; (action.Params != null) && (k < action.Params.Length); k++)
                {
                    item2.Add(this.GetMenuFrom(action.Params[k], null, action));
                }
                mi.Add(this.FormatMenu(item2));
            }
            return(this.FormatMenu(mi));
        }
Ejemplo n.º 2
0
 private GMenuItem GetMenuFrom(ActionNode n)
 {
     GMenuItem mi = new GMenuItem(n.Name);
     for (int i = 0; i < n.Nodes.Count; i++)
     {
         mi.Add(this.GetMenuFrom((ActionNode) n.Nodes[i]));
     }
     for (int j = 0; j < n.Handlers.Count; j++)
     {
         ActionHandler action = (ActionHandler) n.Handlers[j];
         GMenuItem item2 = new GNewActionMenu(this, this.m_Macro, action);
         for (int k = 0; (action.Params != null) && (k < action.Params.Length); k++)
         {
             item2.Add(this.GetMenuFrom(action.Params[k], null, action));
         }
         mi.Add(this.FormatMenu(item2));
     }
     return this.FormatMenu(mi);
 }