Example #1
0
        /// <summary>
        /// Create a WindowMenuEntry under a MgMenu
        /// </summary>
        /// <param name="mgFormBase"></param>
        /// <param name="menuType">WindowMenu / Separator</param>
        /// <param name="windowMenuIdx">Index where new menuentry should be added</param>
        /// <param name="guiMgForm"></param>
        /// <param name="menuStyle">Pulldown / Context</param>
        /// <param name="setChecked"
        public override void CreateMenuEntry(MgFormBase mgFormBase, MenuType menuType, int windowMenuIdx, GuiMgForm guiMgForm, MenuStyle menuStyle, bool setChecked)
        {
            MenuEntry menuEntry = base.CreateMenuEntryItem(mgFormBase, menuType, guiMgForm, menuStyle, setChecked);
            MgMenu    mgMenu    = getParentMgMenu();

            mgMenu.addMenu(menuEntry, windowMenuIdx + 1);
            mgMenu.setIndexes(false);
        }
Example #2
0
 /// <summary>
 ///   reset the index on the menu entry
 /// </summary>
 /// <param name = "resetIndexes"></param>
 private void resetIndexes()
 {
     // refresh the set index to reflect the change
     if (ParentMenuEntry != null && ParentMenuEntry.menuType() == MenuType.MENU)
     {
         ((MenuEntryMenu)ParentMenuEntry).setIndexes(false);
     }
     else
     {
         _parentMgMenu.setIndexes(false);
     }
 }