示例#1
0
        public void ToKvExcelAll(bool isArray = true)
        {
            var cache    = AttributeHelper.GetCacheStringValue <RegexLanguaheEnum>();
            var regexStr = string.Empty;

            SystemConsole.Run(config: new Dictionary <string, Action>()
            {
                ["不过滤"] = () =>
                {
                    ToKvExcel(isArray, regexStr);
                },
                ["匹配中文与日文"] = () =>
                {
                    regexStr = string.Join("|", cache.Where(p => p.Key >= RegexLanguaheEnum.日文 && p.Key <= RegexLanguaheEnum.中文).Select(p => p.Value));
                    ToKvExcel(isArray, regexStr);
                },
                ["只匹配中文"] = () =>
                {
                    regexStr = cache[RegexLanguaheEnum.中文];
                    ToKvExcel(isArray, regexStr);
                },
                ["只匹配日文"] = () =>
                {
                    regexStr = string.Join("|", cache.Where(p => p.Key < RegexLanguaheEnum.中文).Select(p => p.Value));
                    ToKvExcel(isArray, regexStr);
                },
                ["只匹配韩文"] = () =>
                {
                    regexStr = cache[RegexLanguaheEnum.韩文];
                    ToKvExcel(isArray, regexStr);
                }
            }, columnsCount: 3);
        }
示例#2
0
        public void Open()
        {
            var cache = AttributeHelper.GetCacheStringValue <RegexLanguaheEnum>();

            SystemConsole.Run(config: new Dictionary <string, Action>()
            {
                ["匹配中文与日文"] = () =>
                {
                    regexStr = string.Join("|", cache.Where(p => p.Key >= RegexLanguaheEnum.日文 && p.Key <= RegexLanguaheEnum.中文).Select(p => p.Value));
                    GetValue();
                },

                ["只匹配中文"] = () =>
                {
                    regexStr = cache[RegexLanguaheEnum.中文];
                    GetValue();
                },

                ["只匹配日文"] = () =>
                {
                    regexStr = string.Join("|", cache.Where(p => p.Key < RegexLanguaheEnum.中文).Select(p => p.Value));
                    GetValue();
                },

                ["只匹配韩文"] = () =>
                {
                    regexStr = cache[RegexLanguaheEnum.韩文];
                    GetValue();
                }
            });
        }