瀏覽代碼

填空數量

CrazyIter_Bin 3 年之前
父節點
當前提交
1af2be90fc
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 1 0
      HTEXLib/DOCX/Models/LangConfig.cs
  2. 5 0
      HTEXLib/Translator/HTML2ITEMV3Translator.cs

+ 1 - 0
HTEXLib/DOCX/Models/LangConfig.cs

@@ -32,5 +32,6 @@ namespace HTEXLib.DOCX.Models
         public string Filed { get; set; }
         public string Filed { get; set; }
         public string Judge { get; set; }
         public string Judge { get; set; }
         public string Level { get; set; }
         public string Level { get; set; }
+        public string Count { get; set; }
     }
     }
 }
 }

+ 5 - 0
HTEXLib/Translator/HTML2ITEMV3Translator.cs

@@ -71,6 +71,7 @@ namespace HTEXLib.Translator
                 dict[_langConfig.Item.Point] = new string[] { _langConfig.Lang, Point };
                 dict[_langConfig.Item.Point] = new string[] { _langConfig.Lang, Point };
                 dict[_langConfig.Item.Score] = new string[] { _langConfig.Lang, Score };
                 dict[_langConfig.Item.Score] = new string[] { _langConfig.Lang, Score };
                 dict[_langConfig.Item.Level] = new string[] { _langConfig.Lang, Level };
                 dict[_langConfig.Item.Level] = new string[] { _langConfig.Lang, Level };
+                dict[_langConfig.Item.Count] = new string[] { _langConfig.Lang, Count };
                 foreach (string key in _langConfig.Item.Type.Keys)
                 foreach (string key in _langConfig.Item.Type.Keys)
                 {
                 {
                     dict[_langConfig.Item.Type[key]] = new string[] { _langConfig.Lang, Summary, key };
                     dict[_langConfig.Item.Type[key]] = new string[] { _langConfig.Lang, Summary, key };
@@ -94,6 +95,7 @@ namespace HTEXLib.Translator
                 string pot = _TagConfig.Start + _langConfig.Item.Point + _TagConfig.End;
                 string pot = _TagConfig.Start + _langConfig.Item.Point + _TagConfig.End;
                 string scr = _TagConfig.Start + _langConfig.Item.Score + _TagConfig.End;
                 string scr = _TagConfig.Start + _langConfig.Item.Score + _TagConfig.End;
                 string lvl = _TagConfig.Start + _langConfig.Item.Level + _TagConfig.End;
                 string lvl = _TagConfig.Start + _langConfig.Item.Level + _TagConfig.End;
+                string cut = _TagConfig.Start + _langConfig.Item.Count + _TagConfig.End;
                 string[] Fileds = _langConfig.Item.Filed.Split('|');
                 string[] Fileds = _langConfig.Item.Filed.Split('|');
                 foreach (var filed in Fileds)
                 foreach (var filed in Fileds)
                 {
                 {
@@ -108,18 +110,21 @@ namespace HTEXLib.Translator
                 string[] potarry = pot.Select(s => s.ToString()).ToArray();
                 string[] potarry = pot.Select(s => s.ToString()).ToArray();
                 string[] scrarry = scr.Select(s => s.ToString()).ToArray();
                 string[] scrarry = scr.Select(s => s.ToString()).ToArray();
                 string[] lvlarry = lvl.Select(s => s.ToString()).ToArray();
                 string[] lvlarry = lvl.Select(s => s.ToString()).ToArray();
+                string[] cutarry = cut.Select(s => s.ToString()).ToArray();
                 string ansReg = string.Join("\\s*", ansarry);
                 string ansReg = string.Join("\\s*", ansarry);
                 string alsReg = string.Join("\\s*", alsarry);
                 string alsReg = string.Join("\\s*", alsarry);
                 string endReg = string.Join("\\s*", endarry);
                 string endReg = string.Join("\\s*", endarry);
                 string potReg = string.Join("\\s*", potarry);
                 string potReg = string.Join("\\s*", potarry);
                 string scrReg = string.Join("\\s*", scrarry);
                 string scrReg = string.Join("\\s*", scrarry);
                 string lvlReg = string.Join("\\s*", lvlarry);
                 string lvlReg = string.Join("\\s*", lvlarry);
+                string cutReg = string.Join("\\s*", cutarry);
                 html = Regex.Replace(html, ansReg, ans);
                 html = Regex.Replace(html, ansReg, ans);
                 html = Regex.Replace(html, alsReg, als);
                 html = Regex.Replace(html, alsReg, als);
                 html = Regex.Replace(html, endReg, end);
                 html = Regex.Replace(html, endReg, end);
                 html = Regex.Replace(html, potReg, pot);
                 html = Regex.Replace(html, potReg, pot);
                 html = Regex.Replace(html, scrReg, scr);
                 html = Regex.Replace(html, scrReg, scr);
                 html = Regex.Replace(html, lvlReg, lvl);
                 html = Regex.Replace(html, lvlReg, lvl);
+                html = Regex.Replace(html, cutReg, cut);
                 string blankReg = "\\s*";
                 string blankReg = "\\s*";
                 foreach (string value in _langConfig.Item.Type.Values)
                 foreach (string value in _langConfig.Item.Type.Values)
                 {
                 {