예제 #1
0
        private CommandKeyBinding Load(DecoupledStorage storage, string folderName)
        {
            if (storage == null)
            {
                return(null);
            }

            CommandKeyBinding lLastSelected = null;

            Hashtable lFolders = storage.GetSubFolders(folderName);

            foreach (DictionaryEntry lEntry in lFolders)
            {
                string            lFolderName           = (string)lEntry.Key;
                CommandKeyFolder  lNewFolder            = new CommandKeyFolder(this);
                CommandKeyBinding lLastSelectedInFolder = lNewFolder.Load(storage, lFolderName);
                if (lLastSelectedInFolder != null)
                {
                    lLastSelected = lLastSelectedInFolder;
                }
            }

            _Name = ProcessFolderName(folderName);
            _Name = CodeRush.StrUtil.DecodeName(_Name);

            storage.FolderName = folderName;

            CommandKeyBinding lLastSelectedInBindings = LoadThisFolder(storage);

            if (lLastSelected == null)
            {
                lLastSelected = lLastSelectedInBindings;
            }
            return(lLastSelected);
        }
        // private methods...

        #region LoadShortcuts
        private void LoadShortcuts()
        {
            _RootFolder = new CommandKeyFolder();
            _RootFolder.Load(OptXkeysShortcuts.GetCategory(), OptXkeysShortcuts.GetPageName());
            _Shortcuts = _RootFolder.ToPlainCollection();
        }