/// <summary>
        /// Apply settings to root menus.
        /// </summary>
        /// <param name="menuRoot"> The root menus collection.</param>
        private void ApplySettingsMenuRootItems(MenuRootHashtable menuRoot)
        {
            foreach (DictionaryEntry de in menuRoot)
            {
                Ecyware.GreenBlue.Controls.MenuRoot menuList = (MenuRoot)de.Value;

                CommandBarMenu rootMenu = null;

                // Get the root menu first
                for (int i=0;i<this.menubar.Items.Count;i++)
                {
                    // check if found
                    if ( menubar.Items[i].MenuShortcut == menuList.Shortcut )
                    {
                        rootMenu = (CommandBarMenu)menubar.Items[i];
                        break;
                    }
                }

                if ( rootMenu != null )
                {
                    // Apply settings
                    rootMenu.IsVisible = menuList.Visible;
                    rootMenu.IsEnabled = menuList.Enabled;
                }
            }
        }
        private MenuRootHashtable LoadWorkspaceMenu()
        {
            MenuRootHashtable mnRoot = new MenuRootHashtable();

            mnRoot.Add("3", new MenuRoot("Help","&Help",Shortcut.CtrlShiftH));
            mnRoot.Add("2", new MenuRoot("View","&View",Shortcut.CtrlShiftW));
            mnRoot.Add("1",new MenuRoot("File","&File",Shortcut.CtrlShiftF));

            mnRoot["3"].MenuItems = BuildHelpMenus();
            mnRoot["2"].MenuItems = BuildWindowMenuItems();
            mnRoot["1"].MenuItems = BuildSessionMenuItems();

            return mnRoot;
        }
 public MenuRootHashtable(MenuRootHashtable original)
 {
     innerHash = new Hashtable (original.innerHash);
 }
        /// <summary>
        /// Creates the menus for the workspace.
        /// </summary>
        /// <returns> A MenuRootHashtable.</returns>
        private MenuRootHashtable BuildPluginMenuRoot()
        {
            mnRoot = new MenuRootHashtable();

            mnRoot.Add("5", new MenuRoot("Help","&Help",Shortcut.CtrlShiftH));
            mnRoot.Add("4",new MenuRoot("Tools","&Tools",Shortcut.CtrlShiftT));
            // mnRoot.Add("3",new MenuRoot("Application","&Session",Shortcut.CtrlShiftF));
            mnRoot.Add("2", new MenuRoot("View","&View",Shortcut.CtrlShiftW));
            mnRoot.Add("1", new MenuRoot("Edit","&Edit",Shortcut.CtrlShiftE));
            mnRoot.Add("0", new MenuRoot("File","&File", Shortcut.CtrlShiftI));

            mnRoot["5"].MenuItems = BuildHelpMenus();
            mnRoot["4"].MenuItems = BuildToolMenu();
            //mnRoot["3"].MenuItems = BuildSessionMenuItems();
            mnRoot["2"].MenuItems = BuildWindowMenuItems();
            mnRoot["1"].MenuItems = BuildEditMenuItems();
            mnRoot["0"].MenuItems = BuildFileMenuItems();

            return mnRoot;
        }
 internal MenuRootHashtableEnumerator(MenuRootHashtable enumerable)
 {
     innerEnumerator = enumerable.InnerHash.GetEnumerator();
 }
        public MenuRootHashtable Clone()
        {
            MenuRootHashtable clone = new MenuRootHashtable();
            clone.innerHash = (Hashtable) innerHash.Clone();

            return clone;
        }
        public static MenuRootHashtable Synchronized(MenuRootHashtable nonSync)
        {
            MenuRootHashtable sync = new MenuRootHashtable();
            sync.innerHash = Hashtable.Synchronized(nonSync.innerHash);

            return sync;
        }
 /// <summary>
 /// Creates a new ApplyMenuRootSettingsEventArgs.
 /// </summary>
 /// <param name="rootShortcut"> The menu shortcut.</param>
 /// <param name="menu"> The root menus.</param>
 public ApplyMenuRootSettingsEventArgs(Shortcut rootShortcut,MenuRootHashtable menu)
 {
     this.MenuRootItems = menu;
 }
 /// <summary>
 /// Creates a new LoadPluginMenuEventArgs.
 /// </summary>
 /// <param name="menu"> The root menus.</param>
 public LoadPluginMenuEventArgs(MenuRootHashtable menu)
 {
     this.MenuRoot = menu;
 }