Exemplo n.º 1
0
        public bool OnInitGui()
        {
            if (this._logger != null)
            {
                this._logger.InfoFormat("OnInitGui()@{0}", DateTime.Now);
            }

            Menu apiExtMenu = new Menu();

            uint menuId = apiExtMenu.AddMainMenu("[API Extensions]", Menu.MainMenuName.eMainMenuHelp,
                                                 "FirstAction Text", "FirstAction", "First Action Samples", 1);

            menuId = apiExtMenu.AddMenuItem("Call Other Action", "ActionApiExtCallOtherAction", "Call Other Action", menuId, 1, false, false);

            uint popupMenuId = apiExtMenu.AddPopupMenuItem("API Popup Menu", "Popup Menu Sample", "ActionApiExtPopupMenu", "Popup Menu Sample...", menuId, 1, false, false);

            popupMenuId = apiExtMenu.AddMenuItem("Next Symbol Variant", "ActionNextSymbolVariant", "Next Symbol Variant...", popupMenuId, 1, false, false);

            menuId = apiExtMenu.AddMenuItem("Gui Examples", "ActionApiExtWithGuiSamples", "Gui Examples...", menuId, 1, false, false);

            ContextMenu         contextMenu  = new ContextMenu();
            ContextMenuLocation menuLocation = new ContextMenuLocation("Editor", "Ged");

            contextMenu.AddMenuItem(menuLocation, "API Ext Context Menu", "ActionApiContextMenu", true, false);

            return(true);
        }
 /// <summary>
 /// Initiates the contextmenu entry in the page navigator.
 /// The method is seperated from Register() so that it is more easy to copy sections into other scriptfiles.
 /// </summary>
 public void InitiateMenu()
 {
     menuText     = getMenuText();
     menu         = new Eplan.EplApi.Gui.ContextMenu();
     menuLocation = new ContextMenuLocation("PmPageObjectTreeDialog", "1007");
     menu.AddMenuItem(menuLocation, menuText, "OpenProjectFilePath", false, false);
 }
 public void CreateMenu()
 {
     ContextMenuLocation oCtxLoc = new ContextMenuLocation();
     oCtxLoc.DialogName = "Editor";
     oCtxLoc.ContextMenuName = "Ged";
     Eplan.EplApi.Gui.ContextMenu oCTXMnu = new Eplan.EplApi.Gui.ContextMenu();
     oCTXMnu.AddMenuItem(oCtxLoc, "Makro tauschen...", "XMSwapMacroFromMacroBoxAction", true, false);
 }
Exemplo n.º 4
0
    public void CreateMenu()
    {
        ContextMenuLocation oCtxLoc = new ContextMenuLocation();

        oCtxLoc.DialogName      = "Editor";
        oCtxLoc.ContextMenuName = "Ged";
        Eplan.EplApi.Gui.ContextMenu oCTXMnu = new Eplan.EplApi.Gui.ContextMenu();
        oCTXMnu.AddMenuItem(oCtxLoc, "Makro tauschen...", "XMSwapMacroFromMacroBoxAction", true, false);
    }