From 410b9172c04622fd2cd2f95aa56db4cee587505b Mon Sep 17 00:00:00 2001 From: huiyadanli Date: Sat, 25 Jul 2020 12:44:30 +0800 Subject: [PATCH] =?UTF-8?q?[+]=20=E6=B7=BB=E5=8A=A0=E7=89=B9=E5=BE=81?= =?UTF-8?q?=E7=A0=81=E6=94=AF=E6=8C=81=E7=89=88=E6=9C=AC=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RevokeMsgPatcher/Model/App.cs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/RevokeMsgPatcher/Model/App.cs b/RevokeMsgPatcher/Model/App.cs index 151935e..4db423e 100644 --- a/RevokeMsgPatcher/Model/App.cs +++ b/RevokeMsgPatcher/Model/App.cs @@ -23,11 +23,27 @@ namespace RevokeMsgPatcher.Model { // 使用 HashSet 防重 HashSet versions = new HashSet(); - foreach (List modifyInfos in FileModifyInfos.Values) + // 精准 + if (FileModifyInfos != null) { - foreach (ModifyInfo modifyInfo in modifyInfos) + foreach (List modifyInfos in FileModifyInfos.Values) { - versions.Add(modifyInfo.Version); + foreach (ModifyInfo modifyInfo in modifyInfos) + { + versions.Add(modifyInfo.Version); + } + } + } + // 模糊 范围 + if (FileCommonModifyInfos != null) + { + foreach (List commonModifyInfos in FileCommonModifyInfos.Values) + { + foreach (CommonModifyInfo commonModifyInfo in commonModifyInfos) + { + string end = string.IsNullOrEmpty(commonModifyInfo.EndVersion) ? "最新版" : commonModifyInfo.EndVersion; + versions.Add(commonModifyInfo.StartVersion + "~" + end); + } } } return versions;