Parcourir la source

pref(ModComp):提高代码可读性

薄奚梦灵 il y a 1 an
Parent
commit
8dc1148ebc
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      Plain Craft Launcher 2/Modules/Minecraft/ModComp.vb

+ 2 - 2
Plain Craft Launcher 2/Modules/Minecraft/ModComp.vb

@@ -61,8 +61,8 @@
                     If SplitedLine.Count >= 2 Then
                         Entry.ChineseName = SplitedLine(1)
                         If Entry.ChineseName.Contains("*") Then '处理 *
-                            Entry.ChineseName = Entry.ChineseName.Replace("*", " (" &
-                                String.Join(" ", If(Entry.CurseForgeSlug, Entry.ModrinthSlug).Split("-").Select(Function(w) w.Substring(0, 1).ToUpper & w.Substring(1, w.Length - 1))) & ")")
+                            Entry.ChineseName = Entry.ChineseName.Replace("*",
+                            $"({If(Entry.CurseForgeSlug, Entry.ModrinthSlug).Replace("-"," ").Capitalize})"
                         End If
                     End If
                     _CompDatabase.Add(Entry)