示例#1
0
        internal static List <CodeNamePair> GetCodeNamePairList(string domainName, string key, CodeNamePairAppendItemType appendItemType)
        {
            CodeNamePair getCustomAppendSelectedItem;
            CodeNamePair getCustomAppendAllItem;

            List <CodeNamePair> returnList = CodeNamePairManager.GetList(domainName, key, out getCustomAppendSelectedItem, out getCustomAppendAllItem);

            CodeNamePair selectedItem;
            CodeNamePair allItem;

            CodeNamePairManager.GetDefaultAppendItem(out selectedItem, out allItem);
            switch (appendItemType)
            {
            case CodeNamePairAppendItemType.All:
                returnList.Insert(0, allItem);
                break;

            case CodeNamePairAppendItemType.Select:
                returnList.Insert(0, selectedItem);
                break;

            case CodeNamePairAppendItemType.Custom_Select:
                returnList.Insert(0, getCustomAppendSelectedItem);
                break;

            case CodeNamePairAppendItemType.Custom_All:
                returnList.Insert(0, getCustomAppendAllItem);
                break;

            default:
                break;
            }
            return(returnList);
        }
        private static void FileRenamed(object sender, RenamedEventArgs target)
        {
            string name = Path.GetFileNameWithoutExtension(target.OldFullPath);

            CodeNamePairManager.ClearCache(name);
        }
        private static void FileChanged(object sender, FileSystemEventArgs target)
        {
            string name = Path.GetFileNameWithoutExtension(target.FullPath);

            CodeNamePairManager.ClearCache(name);
        }