mirror of
https://github.com/huiyadanli/RevokeMsgPatcher.git
synced 2026-07-29 05:37:13 +08:00
[#] 完善了补丁更新机制
This commit is contained in:
@@ -13,5 +13,33 @@ namespace RevokeMsgPatcher.Model
|
||||
public Dictionary<string, TargetInfo> FileTargetInfos { get; set; }
|
||||
|
||||
public Dictionary<string, List<ModifyInfo>> FileModifyInfos { get; set; }
|
||||
|
||||
public HashSet<string> GetSupportVersions()
|
||||
{
|
||||
// 使用 HashSet 防重
|
||||
HashSet<string> versions = new HashSet<string>();
|
||||
foreach (List<ModifyInfo> modifyInfos in FileModifyInfos.Values)
|
||||
{
|
||||
foreach (ModifyInfo modifyInfo in modifyInfos)
|
||||
{
|
||||
versions.Add(modifyInfo.Version);
|
||||
}
|
||||
}
|
||||
return versions;
|
||||
}
|
||||
|
||||
public string GetSupportVersionStr()
|
||||
{
|
||||
string str = "";
|
||||
foreach (string v in GetSupportVersions())
|
||||
{
|
||||
str += v + "、";
|
||||
}
|
||||
if (str.Length > 1)
|
||||
{
|
||||
str = str.Substring(0, str.Length - 1);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user