Exemplo n.º 1
0
        private CommandContextMenu GetCommandContextMenu(String subDir)
        {
            int i = subDir.LastIndexOf(".");

            if (i > 0)
            {
                subDir = subDir.Substring(i + 1);
            }
            CommandContextMenu ccc;

            if (ActionSubMenu.TryGetValue(subDir, out ccc))
            {
                return(ccc);
            }
            ccc = new CommandContextMenu(instance, Plugin)
            {
                Label       = subDir,
                Handler     = null,
                ContextType = typeof(object),
                act         = null,
                useType     = typeof(object)
            };
            ActionSubMenu[subDir] = ccc;
            instance.TabConsole.RegisterContextAction(ccc);
            return(ccc);
        }
Exemplo n.º 2
0
 private CommandContextMenu GetCommandContextMenu(String subDir)
 {
     int i = subDir.LastIndexOf(".");
     if (i > 0) subDir = subDir.Substring(i + 1);
     CommandContextMenu ccc;           
     if (ActionSubMenu.TryGetValue(subDir,out ccc)) return ccc;
     ccc = new CommandContextMenu(instance, Plugin)
     {
         Label = subDir,
         Handler = null,
         ContextType = typeof(object),
         act = null,
         useType = typeof(object)
     };
     ActionSubMenu[subDir] = ccc;
     instance.TabConsole.RegisterContextAction(ccc);
     return ccc;
 }