Dim oldValues As String() = args(0).Split("|")
Dim newValues As String() = args(1).Split("|")
Dim msg As New StringBuilder()
Dim oldDict As New Dictionary(Of String, String)
Dim newDict As New Dictionary(Of String, String)
For Each s As String In oldValues
Dim parts As String() = s.Split(":")
oldDict(parts(0)) = String.Join(":", parts, 1, parts.Length - 1)
Next
For Each s As String In newValues
Dim parts As String() = s.Split(":")
newDict(parts(0)) = String.Join(":", parts, 1, parts.Length - 1)
Next
' Check for additions and modifications
For Each key As String In newDict.Keys
If oldDict.ContainsValue(newDict(key)) Then
Continue For
End If
If oldDict.ContainsKey(key) AndAlso Not oldDict(key).Equals(newDict(key)) AndAlso Not newDict(key).Contains("不支持") Then
msg.AppendFormat("【修改】【{0}:{1}】修改为【{0}:{2}】{3}", key, oldDict(key), newDict(key), vbCrLf)
Else
msg.AppendFormat("【新增】【{0}:{1}】{2}", key, newDict(key), vbCrLf)
End If
Next
' Check for deletions
For Each key As String In oldDict.Keys
If Not newDict.ContainsValue(oldDict(key)) AndAlso Not newDict.ContainsKey(key) Then
msg.AppendFormat("【删除】【{0}:{1}】{2}", key, oldDict(key), vbCrLf)
End If
Next