Merge branch 'main' into resourcepacks
This commit is contained in:
@@ -316,46 +316,6 @@ Public Module ModDownloadLib
|
||||
|
||||
#Region "OptiFine 下载"
|
||||
|
||||
Public Sub McDownloadOptiFine(DownloadInfo As DlOptiFineListEntry)
|
||||
Try
|
||||
Dim Id As String = DownloadInfo.NameVersion
|
||||
Dim VersionFolder As String = PathMcFolder & "versions\" & Id & "\"
|
||||
Dim IsNewVersion As Boolean = Val(DownloadInfo.Inherit.Split(".")(1)) >= 14
|
||||
Dim Target As String = If(IsNewVersion,
|
||||
PathTemp & "Cache\Code\" & DownloadInfo.NameVersion & "_" & GetUuid(),
|
||||
PathMcFolder & "libraries\optifine\OptiFine\" & DownloadInfo.NameFile.Replace("OptiFine_", "").Replace(".jar", "").Replace("preview_", "") & "\" & DownloadInfo.NameFile.Replace("OptiFine_", "OptiFine-").Replace("preview_", ""))
|
||||
|
||||
'重复任务检查
|
||||
SyncLock LoaderTaskbarLock
|
||||
For i = 0 To LoaderTaskbar.Count - 1
|
||||
If LoaderTaskbar(i).Name = "OptiFine " & DownloadInfo.NameDisplay & " 下载" Then
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End SyncLock
|
||||
|
||||
'已有版本检查
|
||||
If File.Exists(VersionFolder & Id & ".json") Then
|
||||
If MyMsgBox("版本 " & Id & " 已存在,是否重新下载?" & vbCrLf & "这会覆盖版本的 json 和 jar 文件,但不会影响版本隔离的文件。", "版本已存在", "继续", "取消") = 1 Then
|
||||
File.Delete(VersionFolder & Id & ".jar")
|
||||
File.Delete(VersionFolder & Id & ".json")
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'启动
|
||||
Dim Loader As New LoaderCombo(Of String)("OptiFine " & DownloadInfo.NameDisplay & " 下载", McDownloadOptiFineLoader(DownloadInfo)) With {.OnStateChanged = AddressOf McInstallState}
|
||||
Loader.Start(VersionFolder)
|
||||
LoaderTaskbarAdd(Loader)
|
||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||
FrmMain.BtnExtraDownload.Ribble()
|
||||
|
||||
Catch ex As Exception
|
||||
Log(ex, "开始 OptiFine 下载失败", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub McDownloadOptiFineSave(DownloadInfo As DlOptiFineListEntry)
|
||||
Try
|
||||
Dim Id As String = DownloadInfo.NameVersion
|
||||
@@ -1005,74 +965,13 @@ Retry:
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Forge 下载"
|
||||
#Region "Forgelike 下载"
|
||||
|
||||
Public Sub McDownloadForge(DownloadInfo As DlForgeVersionEntry)
|
||||
'老版本提示
|
||||
If DownloadInfo.Category = "client" Then
|
||||
If MyMsgBox("该 Forge 版本过于古老,PCL 暂不支持该版本的自动安装。" & vbCrLf &
|
||||
"若你仍然希望继续,PCL 将把安装程序下载到你指定的位置,但不会进行安装。",
|
||||
"版本过老", "继续", "取消") = 1 Then
|
||||
McDownloadForgeSave(DownloadInfo)
|
||||
End If
|
||||
Exit Sub
|
||||
End If
|
||||
If DownloadInfo.Category = "universal" OrElse DownloadInfo.Inherit.StartsWithF("1.5") Then '对该版本自动安装的支持将在之后加入
|
||||
If MyMsgBox("该 Forge 版本过于古老,PCL 暂不支持该版本的自动安装。" & vbCrLf &
|
||||
"若你仍然希望继续,PCL 将把安装程序下载到你指定的位置,但不会进行安装。",
|
||||
"版本过老", "继续", "取消") = 1 Then
|
||||
McDownloadForgeSave(DownloadInfo)
|
||||
End If
|
||||
Exit Sub
|
||||
End If
|
||||
'初始化参数
|
||||
Dim Id As String = DownloadInfo.Inherit & "-forge-" & DownloadInfo.Version
|
||||
Dim Target As String = PathTemp & "Cache\Code\ForgeInstall-" & DownloadInfo.Version & "_" & GetUuid() & "." & DownloadInfo.FileSuffix
|
||||
Dim VersionFolder As String = PathMcFolder & "versions\" & Id & "\"
|
||||
Dim DisplayName As String = "Forge " & DownloadInfo.Inherit & " - " & DownloadInfo.Version
|
||||
Public Sub McDownloadForgelikeSave(Info As DlForgelikeEntry)
|
||||
Try
|
||||
|
||||
'重复任务检查
|
||||
SyncLock LoaderTaskbarLock
|
||||
For i = 0 To LoaderTaskbar.Count - 1
|
||||
If LoaderTaskbar(i).Name = DisplayName & " 下载" Then
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End SyncLock
|
||||
|
||||
'已有版本检查
|
||||
If File.Exists(VersionFolder & Id & ".json") Then
|
||||
If MyMsgBox("版本 " & Id & " 已存在,是否重新下载?" & vbCrLf & "这会覆盖版本的 json 和 jar 文件,但不会影响版本隔离的文件。", "版本已存在", "继续", "取消") = 1 Then
|
||||
File.Delete(VersionFolder & Id & ".jar")
|
||||
File.Delete(VersionFolder & Id & ".json")
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'启动
|
||||
Dim Loader As New LoaderCombo(Of String)(DisplayName & " 下载", McDownloadForgeLoader(DownloadInfo.Version, DownloadInfo.Inherit, DownloadInfo)) With {.OnStateChanged = AddressOf McInstallState}
|
||||
Loader.Start(VersionFolder)
|
||||
LoaderTaskbarAdd(Loader)
|
||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||
FrmMain.BtnExtraDownload.Ribble()
|
||||
|
||||
Catch ex As Exception
|
||||
Log(ex, "开始 Forge 下载失败", LogLevel.Feedback)
|
||||
Finally
|
||||
'删除安装包
|
||||
Try
|
||||
If File.Exists(Target) Then File.Delete(Target)
|
||||
Catch
|
||||
End Try
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub McDownloadForgeSave(DownloadInfo As DlForgeVersionEntry)
|
||||
Try
|
||||
Dim Target As String = SelectAs("选择保存位置", DownloadInfo.FileName, "Forge 文件 (*." & DownloadInfo.FileSuffix & ")|*." & DownloadInfo.FileSuffix)
|
||||
Dim DisplayName As String = "Forge " & DownloadInfo.Inherit & " - " & DownloadInfo.Version
|
||||
Dim Target As String = SelectAs("选择保存位置", $"{Info.LoaderName}-{Info.Inherit}-{Info.VersionName}.{Info.FileExtension}",
|
||||
$"{Info.LoaderName} 安装器 (*.{Info.FileExtension})|*.{Info.FileExtension}")
|
||||
Dim DisplayName As String = $"{Info.LoaderName} {Info.Inherit} - {Info.VersionName}"
|
||||
If Not Target.Contains("\") Then Exit Sub
|
||||
|
||||
'重复任务检查
|
||||
@@ -1085,34 +984,41 @@ Retry:
|
||||
Next
|
||||
End SyncLock
|
||||
|
||||
'构造步骤加载器
|
||||
Dim Loaders As New List(Of LoaderBase)
|
||||
'获取下载地址
|
||||
Loaders.Add(New LoaderTask(Of DlForgeVersionEntry, List(Of NetFile))("获取下载地址",
|
||||
Sub(Task As LoaderTask(Of DlForgeVersionEntry, List(Of NetFile)))
|
||||
Dim Files As New List(Of NetFile)
|
||||
Dim Files As New List(Of NetFile)
|
||||
If Info.IsNeoForge Then
|
||||
'NeoForge
|
||||
Dim Neo As DlNeoForgeListEntry = Info
|
||||
Dim Url As String = Neo.UrlBase & "-installer.jar"
|
||||
Files.Add(New NetFile({
|
||||
"https://bmclapi2.bangbang93.com/maven/net/minecraftforge/forge/" & DownloadInfo.Inherit & "-" & DownloadInfo.FileVersion & "/" & DownloadInfo.FileName,
|
||||
"https://files.minecraftforge.net/maven/net/minecraftforge/forge/" & DownloadInfo.Inherit & "-" & DownloadInfo.FileVersion & "/" & DownloadInfo.FileName
|
||||
}, Target, New FileChecker(MinSize:=64 * 1024, Hash:=DownloadInfo.Hash)))
|
||||
Task.Output = Files
|
||||
End Sub) With {.ProgressWeight = 0.1, .Show = False})
|
||||
'下载
|
||||
Loaders.Add(New LoaderDownload("下载主文件", New List(Of NetFile)) With {.ProgressWeight = 6})
|
||||
Url.Replace("maven.neoforged.net/releases", "bmclapi2.bangbang93.com/maven"), Url
|
||||
}, Target, New FileChecker(MinSize:=64 * 1024)))
|
||||
Else
|
||||
'Forge
|
||||
Dim Forge As DlForgeVersionEntry = Info
|
||||
Files.Add(New NetFile({
|
||||
$"https://bmclapi2.bangbang93.com/maven/net/minecraftforge/forge/{Forge.Inherit}-{Forge.FileVersion}/forge-{Forge.Inherit}-{Forge.FileVersion}-{Forge.Category}.{Forge.FileExtension}",
|
||||
$"https://files.minecraftforge.net/maven/net/minecraftforge/forge/{Forge.Inherit}-{Forge.FileVersion}/forge-{Forge.Inherit}-{Forge.FileVersion}-{Forge.Category}.{Forge.FileExtension}"
|
||||
}, Target, New FileChecker(MinSize:=64 * 1024, Hash:=Forge.Hash)))
|
||||
End If
|
||||
|
||||
'构造加载器
|
||||
Dim Loaders As New List(Of LoaderBase)
|
||||
Loaders.Add(New LoaderDownload("下载主文件", Files) With {.ProgressWeight = 6})
|
||||
|
||||
'启动
|
||||
Dim Loader As New LoaderCombo(Of DlForgeVersionEntry)(DisplayName & " 下载", Loaders) With {.OnStateChanged = AddressOf DownloadStateSave}
|
||||
Loader.Start(DownloadInfo)
|
||||
Dim Loader = New LoaderCombo(Of DlForgelikeEntry)(DisplayName & " 下载", Loaders) With {.OnStateChanged = AddressOf DownloadStateSave}
|
||||
Loader.Start(Info)
|
||||
LoaderTaskbarAdd(Loader)
|
||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||
FrmMain.BtnExtraDownload.Ribble()
|
||||
|
||||
Catch ex As Exception
|
||||
Log(ex, "开始 Forge 下载失败", LogLevel.Feedback)
|
||||
Log(ex, $"开始 {Info.LoaderName} 安装器下载失败", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ForgeInjector(Target As String, Task As LoaderTask(Of Boolean, Boolean), McFolder As String, UseJavaWrapper As Boolean)
|
||||
Private Sub ForgelikeInjector(Target As String, Task As LoaderTask(Of Boolean, Boolean), McFolder As String, UseJavaWrapper As Boolean, IsNeoForge As Boolean)
|
||||
'选择 Java
|
||||
Dim Java As JavaEntry
|
||||
SyncLock JavaLock
|
||||
@@ -1153,7 +1059,8 @@ Retry:
|
||||
.RedirectStandardError = True,
|
||||
.RedirectStandardOutput = True
|
||||
}
|
||||
Log("[Download] 开始安装 Forge:" & Arguments)
|
||||
Dim LoaderName As String = If(IsNeoForge, "NeoForge", "Forge")
|
||||
Log($"[Download] 开始安装 {LoaderName}:" & Arguments)
|
||||
Dim process As New Process With {.StartInfo = Info}
|
||||
Dim LastResults As New Queue(Of String)
|
||||
Using outputWaitHandle As New AutoResetEvent(False)
|
||||
@@ -1166,15 +1073,15 @@ Retry:
|
||||
Else
|
||||
LastResults.Enqueue(e.Data)
|
||||
If LastResults.Count > 100 Then LastResults.Dequeue()
|
||||
ForgeInjectorLine(e.Data, Task)
|
||||
ForgelikeInjectorLine(e.Data, Task)
|
||||
End If
|
||||
Catch ex As ObjectDisposedException
|
||||
Catch ex As Exception
|
||||
Log(ex, "读取 Forge 安装器信息失败")
|
||||
Log(ex, $"读取 {LoaderName} 安装器信息失败")
|
||||
End Try
|
||||
Try
|
||||
If Task.State = LoadState.Aborted AndAlso Not process.HasExited Then
|
||||
Log("[Installer] 由于任务取消,已中止 Forge 安装")
|
||||
Log($"[Installer] 由于任务取消,已中止 {LoaderName} 安装")
|
||||
process.Kill()
|
||||
End If
|
||||
Catch
|
||||
@@ -1189,15 +1096,15 @@ Retry:
|
||||
Else
|
||||
LastResults.Enqueue(e.Data)
|
||||
If LastResults.Count > 100 Then LastResults.Dequeue()
|
||||
ForgeInjectorLine(e.Data, Task)
|
||||
ForgelikeInjectorLine(e.Data, Task)
|
||||
End If
|
||||
Catch ex As ObjectDisposedException
|
||||
Catch ex As Exception
|
||||
Log(ex, "读取 Forge 安装器错误信息失败")
|
||||
Log(ex, $"读取 {LoaderName} 安装器错误信息失败")
|
||||
End Try
|
||||
Try
|
||||
If Task.State = LoadState.Aborted AndAlso Not process.HasExited Then
|
||||
Log("[Installer] 由于任务取消,已中止 Forge 安装")
|
||||
Log($"[Installer] 由于任务取消,已中止 {LoaderName} 安装")
|
||||
process.Kill()
|
||||
End If
|
||||
Catch
|
||||
@@ -1222,116 +1129,135 @@ Retry:
|
||||
For i As Integer = Math.Max(0, LastResults.Count - 5) To LastResults.Count - 1 '最后 5 行
|
||||
LastLines &= vbCrLf & LastResults(i)
|
||||
Next
|
||||
Throw New Exception("Forge 安装器出错,日志结束部分为:" & LastLines)
|
||||
Throw New Exception($"{LoaderName} 安装器出错,日志结束部分为:" & LastLines)
|
||||
End Using
|
||||
End Using
|
||||
End SyncLock
|
||||
End Sub
|
||||
Private Sub ForgeInjectorLine(Content As String, Task As LoaderTask(Of Boolean, Boolean))
|
||||
If Content.StartsWithF(" Data") OrElse Content.StartsWithF(" Slim") Then
|
||||
If ModeDebug Then Log("[Installer] " & Content)
|
||||
ElseIf Content.StartsWithF(" Reading patch ") Then
|
||||
If ModeDebug Then Log("[Installer] " & Content)
|
||||
Task.Progress = 0.86
|
||||
Else
|
||||
Select Case Content
|
||||
Case "Extracting json"
|
||||
Log("[Installer] " & Content)
|
||||
Task.Progress = 0.07
|
||||
Case "Downloading libraries"
|
||||
Log("[Installer] " & Content)
|
||||
Task.Progress = 0.08
|
||||
Case " File exists: Checksum validated."
|
||||
If ModeDebug Then Log("[Installer] " & Content)
|
||||
Task.Progress += 0.003
|
||||
Case "Building Processors"
|
||||
Task.Progress = 0.38
|
||||
Case "Task: DOWNLOAD_MOJMAPS" 'B
|
||||
Task.Progress = 0.4
|
||||
Case "Task: MERGE_MAPPING" 'B
|
||||
Task.Progress = 0.6
|
||||
Case "Splitting: "
|
||||
Task.Progress = 0.62
|
||||
Case "Parameter Annotations" 'B
|
||||
Task.Progress = 0.66
|
||||
Case "Processing Complete" 'B
|
||||
Task.Progress = 0.7
|
||||
Case "Remapping final jar" 'A
|
||||
Task.Progress = 0.72
|
||||
Case "Remapping jar... 50%" 'A
|
||||
Task.Progress = 0.76
|
||||
Case "Remapping jar... 100%" 'A
|
||||
Task.Progress = 0.81
|
||||
Case "Injecting profile"
|
||||
Task.Progress = 0.91
|
||||
Case Else
|
||||
If ModeDebug Then Log("[Installer] " & Content)
|
||||
Exit Sub
|
||||
End Select
|
||||
Log("[Installer] " & Content)
|
||||
End If
|
||||
Private Sub ForgelikeInjectorLine(Content As String, Task As LoaderTask(Of Boolean, Boolean))
|
||||
Select Case Content
|
||||
Case "Extracting json"
|
||||
Log("[Installer] " & Content)
|
||||
Task.Progress = 0.07
|
||||
Case "Downloading libraries"
|
||||
Log("[Installer] " & Content)
|
||||
Task.Progress = 0.08
|
||||
Case " File exists: Checksum validated."
|
||||
If ModeDebug Then Log("[Installer] " & Content)
|
||||
Task.Progress += 0.003
|
||||
Case "Building Processors"
|
||||
Task.Progress = 0.18
|
||||
Case "Task: DOWNLOAD_MOJMAPS" 'B
|
||||
Task.Progress = 0.2
|
||||
Case "Task: MERGE_MAPPING" 'B
|
||||
Task.Progress = 0.3
|
||||
Case "Splitting: "
|
||||
Task.Progress = 0.35
|
||||
Case "Parameter Annotations" 'B
|
||||
Task.Progress = 0.4
|
||||
Case "Processing Complete" 'B
|
||||
Task.Progress = 0.5
|
||||
Case "log: null" 'new
|
||||
Task.Progress = 0.5
|
||||
Case "Sorting" 'new
|
||||
Task.Progress = 0.65
|
||||
Case "Remapping final jar" 'A
|
||||
Task.Progress = 0.72
|
||||
Case "Remapping jar... 50%" 'A
|
||||
Task.Progress = 0.76
|
||||
Case "Remapping jar... 100%" 'A
|
||||
Task.Progress = 0.81
|
||||
Case "Injecting profile"
|
||||
Task.Progress = 0.91
|
||||
Case Else
|
||||
If ModeDebug Then Log("[Installer] " & Content)
|
||||
Exit Sub
|
||||
End Select
|
||||
Log("[Installer] " & Content)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 获取下载某个 Forge 版本的加载器列表。
|
||||
''' 获取下载某个 Forgelike 版本的加载器列表。
|
||||
''' </summary>
|
||||
Private Function McDownloadForgeLoader(Version As String, Inherit As String, Optional DownloadInfo As DlForgeVersionEntry = Nothing, Optional McFolder As String = Nothing, Optional ClientDownloadLoader As LoaderCombo(Of String) = Nothing, Optional ClientFolder As String = Nothing, Optional FixLibrary As Boolean = True) As List(Of LoaderBase)
|
||||
Private Function McDownloadForgelikeLoader(IsNeoForge As Boolean, LoaderVersion As String, TargetVersion As String, Inherit As String, Optional Info As DlForgelikeEntry = Nothing, Optional McFolder As String = Nothing, Optional ClientDownloadLoader As LoaderCombo(Of String) = Nothing, Optional ClientFolder As String = Nothing) As List(Of LoaderBase)
|
||||
|
||||
'参数初始化
|
||||
McFolder = If(McFolder, PathMcFolder)
|
||||
If Version.StartsWithF("1.") AndAlso Version.Contains("-") Then
|
||||
'类似 1.19.3-41.2.8 格式,优先使用 Version 中要求的版本而非 Inherit(例如 1.19.3 却使用了 1.19 的 Forge)
|
||||
Inherit = Version.Before("-")
|
||||
Version = Version.After("-")
|
||||
If IsNeoForge AndAlso Info Is Nothing Then
|
||||
'需要传入 API Name,但整合包版本可能不以 1.20.1- 开头,所以需要进行特别处理
|
||||
If Inherit = "1.20.1" AndAlso Not LoaderVersion.StartsWithF("1.20.1-") Then
|
||||
Info = New DlNeoForgeListEntry("1.20.1-" & LoaderVersion)
|
||||
Else
|
||||
Info = New DlNeoForgeListEntry(LoaderVersion)
|
||||
End If
|
||||
End If
|
||||
If Not IsNeoForge AndAlso LoaderVersion.StartsWithF("1.") AndAlso LoaderVersion.Contains("-") Then
|
||||
'类似 1.19.3-41.2.8 格式,优先使用 Version 中要求的版本而非 Inherit(例如 1.19.3 却使用了 1.19 的 Forge)
|
||||
Inherit = LoaderVersion.Before("-")
|
||||
LoaderVersion = LoaderVersion.After("-")
|
||||
End If
|
||||
Dim LoaderName As String = If(IsNeoForge, "NeoForge", "Forge")
|
||||
Dim IsCustomFolder As Boolean = McFolder <> PathMcFolder
|
||||
Dim Id As String = Inherit & "-forge-" & Version
|
||||
Dim InstallerAddress As String = PathTemp & "Cache\Code\ForgeInstall-" & Version & "_" & RandomInteger(0, 100000)
|
||||
Dim VersionFolder As String = McFolder & "versions\" & Id & "\"
|
||||
Dim DisplayName As String = "Forge " & Inherit & " - " & Version
|
||||
Dim InstallerAddress As String = $"{PathTemp}Cache\Code\{LoaderName}Install-{LoaderVersion}_{RandomInteger(0, 100000)}"
|
||||
Dim VersionFolder As String = $"{McFolder}versions\{TargetVersion}\"
|
||||
Dim DisplayName As String = $"{LoaderName} {Inherit} - {LoaderVersion}"
|
||||
Dim Loaders As New List(Of LoaderBase)
|
||||
Dim LibVersionFolder As String = PathMcFolder & "versions\" & Id & "\" '作为 Lib 文件目标的版本文件夹
|
||||
Dim LibVersionFolder As String = $"{PathMcFolder}versions\{TargetVersion}\" '作为 Lib 文件目标的版本文件夹
|
||||
|
||||
'获取下载信息
|
||||
If DownloadInfo Is Nothing Then
|
||||
Loaders.Add(New LoaderTask(Of String, String)("获取 Mod 加载器详细信息",
|
||||
'获取 Forge 下载信息
|
||||
If Info Is Nothing Then
|
||||
Loaders.Add(New LoaderTask(Of String, String)($"获取 {LoaderName} 详细信息",
|
||||
Sub(Task As LoaderTask(Of String, String))
|
||||
'获取 Forge 版本列表
|
||||
'获取 Forge 对应 MC 版本列表
|
||||
Dim ForgeLoader = New LoaderTask(Of String, List(Of DlForgeVersionEntry))("McDownloadForgeLoader " & Inherit, AddressOf DlForgeVersionMain)
|
||||
ForgeLoader.WaitForExit(Inherit)
|
||||
Task.Progress = 0.8
|
||||
'查找对应版本
|
||||
For Each ForgeVersion In ForgeLoader.Output
|
||||
If ForgeVersion.Version = Version Then
|
||||
DownloadInfo = ForgeVersion
|
||||
If VersionSortInteger(ForgeVersion.Version.ToString, LoaderVersion) = 0 Then
|
||||
Info = ForgeVersion
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
Throw New Exception("未能找到 Forge " & Inherit & "-" & Version & " 的详细信息!")
|
||||
Throw New Exception($"未能找到 {LoaderName} " & Inherit & "-" & LoaderVersion & " 的详细信息!")
|
||||
End Sub) With {.ProgressWeight = 3})
|
||||
End If
|
||||
'下载 Forge 主文件
|
||||
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))("准备 Mod 加载器下载",
|
||||
Sub(Task As LoaderTask(Of String, List(Of NetFile)))
|
||||
'启动依赖版本的下载
|
||||
If ClientDownloadLoader Is Nothing Then
|
||||
If IsCustomFolder Then Throw New Exception("如果没有指定原版下载器,则不能指定 MC 安装文件夹")
|
||||
ClientDownloadLoader = McDownloadClient(NetPreDownloadBehaviour.ExitWhileExistsOrDownloading, Inherit)
|
||||
End If
|
||||
'添加主文件
|
||||
Dim Files As New List(Of NetFile) From {New NetFile({
|
||||
"https://bmclapi2.bangbang93.com/maven/net/minecraftforge/forge/" & Inherit & "-" & DownloadInfo.FileVersion & "/" & DownloadInfo.FileName,
|
||||
"https://files.minecraftforge.net/maven/net/minecraftforge/forge/" & Inherit & "-" & DownloadInfo.FileVersion & "/" & DownloadInfo.FileName
|
||||
}, InstallerAddress, New FileChecker(MinSize:=64 * 1024, Hash:=DownloadInfo.Hash))}
|
||||
Task.Output = Files
|
||||
End Sub) With {.ProgressWeight = 0.5, .Show = False})
|
||||
Loaders.Add(New LoaderDownload("下载 Mod 加载器主文件", New List(Of NetFile)) With {.ProgressWeight = 9})
|
||||
'下载 Forgelike 主文件
|
||||
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))($"准备下载 {LoaderName}",
|
||||
Sub(Task As LoaderTask(Of String, List(Of NetFile)))
|
||||
'启动依赖版本的下载
|
||||
If ClientDownloadLoader Is Nothing Then
|
||||
If IsCustomFolder Then Throw New Exception("如果没有指定原版下载器,则不能指定 MC 安装文件夹")
|
||||
ClientDownloadLoader = McDownloadClient(NetPreDownloadBehaviour.ExitWhileExistsOrDownloading, Inherit)
|
||||
End If
|
||||
'添加主文件下载
|
||||
Dim Files As New List(Of NetFile)
|
||||
If Info.IsNeoForge Then
|
||||
'NeoForge
|
||||
Dim Neo As DlNeoForgeListEntry = Info
|
||||
Dim Url As String = Neo.UrlBase & "-installer.jar"
|
||||
Files.Add(New NetFile({
|
||||
Url.Replace("maven.neoforged.net/releases", "bmclapi2.bangbang93.com/maven"), Url
|
||||
}, InstallerAddress, New FileChecker(MinSize:=64 * 1024)))
|
||||
Else
|
||||
'Forge
|
||||
Dim Forge As DlForgeVersionEntry = Info
|
||||
Dim FileName As String =
|
||||
$"{Forge.Inherit.Replace("-", "_")}-{Forge.FileVersion}/forge-{Forge.Inherit.Replace("-", "_")}-{Forge.FileVersion}-{Forge.Category}.{Forge.FileExtension}"
|
||||
Files.Add(New NetFile({
|
||||
$"https://bmclapi2.bangbang93.com/maven/net/minecraftforge/forge/{FileName}",
|
||||
$"https://files.minecraftforge.net/maven/net/minecraftforge/forge/{FileName}"
|
||||
}, InstallerAddress, New FileChecker(MinSize:=64 * 1024, Hash:=Forge.Hash)))
|
||||
End If
|
||||
Task.Output = Files
|
||||
End Sub) With {.ProgressWeight = 0.5, .Show = False})
|
||||
Loaders.Add(New LoaderDownload($"下载 {LoaderName} 主文件", New List(Of NetFile)) With {.ProgressWeight = 9})
|
||||
|
||||
'安装(仅在新版安装时需要原版 Jar)
|
||||
If Version.Before(".") >= 20 Then
|
||||
Log("[Download] 检测为新版 Forge:" & Version)
|
||||
If IsNeoForge OrElse LoaderVersion.Before(".") >= 20 Then
|
||||
Log($"[Download] 检测为{If(IsNeoForge, " Neo", "新版 ")}Forge:" & LoaderVersion)
|
||||
Dim Libs As List(Of McLibToken) = Nothing
|
||||
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))("分析 Mod 加载器支持库文件",
|
||||
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))($"分析 {LoaderName} 支持库文件",
|
||||
Sub(Task As LoaderTask(Of String, List(Of NetFile)))
|
||||
Task.Output = New List(Of NetFile)
|
||||
Dim Installer As ZipArchive = Nothing
|
||||
@@ -1357,27 +1283,27 @@ Retry:
|
||||
Log("[Download] 需要下载 Mappings:" & Address)
|
||||
End If
|
||||
Task.Progress = 0.8
|
||||
'去除其中的原始 Forge 项
|
||||
'去除其中的原始 Forgelike 项
|
||||
For i = 0 To Libs.Count - 1
|
||||
If Libs(i).LocalPath.EndsWithF("forge-" & Inherit & "-" & Version & ".jar") OrElse
|
||||
Libs(i).LocalPath.EndsWithF("forge-" & Inherit & "-" & Version & "-client.jar") Then
|
||||
Log("[Download] 已从待下载 Forge 支持库中移除:" & Libs(i).LocalPath, LogLevel.Debug)
|
||||
If Libs(i).LocalPath.EndsWithF($"{LoaderName.ToLower}-{Inherit}-{LoaderVersion}.jar") OrElse
|
||||
Libs(i).LocalPath.EndsWithF($"{LoaderName.ToLower}-{Inherit}-{LoaderVersion}-client.jar") Then
|
||||
Log($"[Download] 已从待下载 {LoaderName} 支持库中移除:" & Libs(i).LocalPath, LogLevel.Debug)
|
||||
Libs.RemoveAt(i)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Task.Output = McLibFixFromLibToken(Libs, PathMcFolder)
|
||||
Catch ex As Exception
|
||||
Throw New Exception("获取新版 Forge 支持库列表失败", ex)
|
||||
Throw New Exception($"获取{If(IsNeoForge, " Neo", "新版 ")}Forge 支持库列表失败", ex)
|
||||
Finally
|
||||
'释放文件
|
||||
If Installer IsNot Nothing Then Installer.Dispose()
|
||||
End Try
|
||||
End Sub) With {.ProgressWeight = 2})
|
||||
Loaders.Add(New LoaderDownload("下载 Mod 加载器支持库文件", New List(Of NetFile)) With {.ProgressWeight = 12})
|
||||
Loaders.Add(New LoaderTask(Of List(Of NetFile), Boolean)("获取 Mod 下载器支持库文件",
|
||||
Loaders.Add(New LoaderDownload($"下载 {LoaderName} 支持库文件", New List(Of NetFile)) With {.ProgressWeight = 12})
|
||||
Loaders.Add(New LoaderTask(Of List(Of NetFile), Boolean)($"获取 {LoaderName} 支持库文件",
|
||||
Sub(Task As LoaderTask(Of List(Of NetFile), Boolean))
|
||||
#Region "Forge 文件"
|
||||
#Region "Forgelike 文件"
|
||||
If IsCustomFolder Then
|
||||
For Each LibFile As McLibToken In Libs
|
||||
Dim RealPath As String = LibFile.LocalPath.Replace(PathMcFolder, McFolder)
|
||||
@@ -1385,7 +1311,7 @@ Retry:
|
||||
Directory.CreateDirectory(IO.Path.GetDirectoryName(RealPath))
|
||||
CopyFile(LibFile.LocalPath, RealPath)
|
||||
End If
|
||||
If ModeDebug Then Log("[Download] 复制的 Forge 支持库文件:" & LibFile.LocalPath)
|
||||
If ModeDebug Then Log($"[Download] 复制的 {LoaderName} 支持库文件:" & LibFile.LocalPath)
|
||||
Next
|
||||
End If
|
||||
#End Region
|
||||
@@ -1393,9 +1319,9 @@ Retry:
|
||||
'等待原版文件下载完成
|
||||
If ClientDownloadLoader Is Nothing Then Exit Sub
|
||||
Dim TargetLoaders As List(Of LoaderBase) =
|
||||
ClientDownloadLoader.GetLoaderList.Where(Function(l) l.Name = McDownloadClientLibName OrElse l.Name = McDownloadClientJsonName).
|
||||
Where(Function(l) l.State <> LoadState.Finished).ToList
|
||||
If TargetLoaders.Any Then Log("[Download] Forge 安装正在等待原版文件下载完成")
|
||||
ClientDownloadLoader.GetLoaderList.Where(Function(l) l.Name = McDownloadClientLibName OrElse l.Name = McDownloadClientJsonName).
|
||||
Where(Function(l) l.State <> LoadState.Finished).ToList()
|
||||
If TargetLoaders.Any Then Log($"[Download] {LoaderName} 安装正在等待原版文件下载完成")
|
||||
Do While TargetLoaders.Any AndAlso Not Task.IsAborted
|
||||
TargetLoaders = TargetLoaders.Where(Function(l) l.State <> LoadState.Finished).ToList
|
||||
Thread.Sleep(50)
|
||||
@@ -1415,14 +1341,13 @@ Retry:
|
||||
End SyncLock
|
||||
#End Region
|
||||
End Sub) With {.ProgressWeight = 0.1, .Show = False})
|
||||
Loaders.Add(New LoaderTask(Of Boolean, Boolean)("安装 Mod 加载器(方式 A)",
|
||||
Loaders.Add(New LoaderTask(Of Boolean, Boolean)(If(IsNeoForge, "安装 NeoForge", "安装 Forge(方式 A)"),
|
||||
Sub(Task As LoaderTask(Of Boolean, Boolean))
|
||||
Dim Installer As ZipArchive = Nothing
|
||||
Try
|
||||
Log("[Download] 开始进行新版方式 Forge 安装:" & InstallerAddress)
|
||||
Log($"[Download] 开始进行 Forgelike 安装:" & InstallerAddress)
|
||||
'记录当前文件夹列表(在新建目标文件夹之前)
|
||||
Dim OldList = New DirectoryInfo(McFolder & "versions\").EnumerateDirectories.
|
||||
Select(Function(i) i.FullName).ToList()
|
||||
Dim OldList = New DirectoryInfo(McFolder & "versions\").EnumerateDirectories.Select(Function(i) i.FullName).ToList()
|
||||
'解压并获取信息
|
||||
Installer = New ZipArchive(New FileStream(InstallerAddress, FileMode.Open))
|
||||
Dim Json As JObject = GetJson(ReadFile(Installer.GetEntry("install_profile.json").Open))
|
||||
@@ -1440,15 +1365,15 @@ Retry:
|
||||
WriteFile(PathTemp & "Cache\forge_installer.jar", GetResources("ForgeInstaller"))
|
||||
Task.Progress = 0.06
|
||||
'运行注入器
|
||||
ForgeInjector(InstallerAddress, Task, McFolder, UseJavaWrapper)
|
||||
ForgelikeInjector(InstallerAddress, Task, McFolder, UseJavaWrapper, IsNeoForge)
|
||||
Task.Progress = 0.97
|
||||
Catch ex As Exception
|
||||
If UseJavaWrapper Then
|
||||
Log(ex, "使用 JavaWrapper 安装 Forge 失败,将不使用 JavaWrapper 并重试")
|
||||
Log(ex, $"使用 JavaWrapper 安装 {LoaderName} 失败,将不使用 JavaWrapper 并重试")
|
||||
UseJavaWrapper = False
|
||||
GoTo Retry
|
||||
Else
|
||||
Throw New Exception("运行 Forge 安装器失败", ex)
|
||||
Throw New Exception($"运行 {LoaderName} 安装器失败", ex)
|
||||
End If
|
||||
End Try
|
||||
'拷贝新增的版本 Json
|
||||
@@ -1457,29 +1382,38 @@ Retry:
|
||||
If DeltaList.Count > 1 Then
|
||||
'它可能和 OptiFine 安装同时运行,导致增加的文件不止一个(这导致了 #151)
|
||||
'也可能是因为 Forge 安装器的 Bug,生成了一个名字错误的文件夹,所以需要检查文件夹是否为空
|
||||
DeltaList = DeltaList.Where(Function(l) l.Name.Contains("forge") AndAlso l.EnumerateFiles.Any).ToList
|
||||
DeltaList = DeltaList.Where(Function(l) l.Name.ContainsF("forge", True) AndAlso l.EnumerateFiles.Any).ToList
|
||||
End If
|
||||
If DeltaList.Count = 1 Then '如果没有新增文件夹,那么预测的文件夹名就是正确的
|
||||
If DeltaList.Count = 1 Then
|
||||
'如果没有新增文件夹,那么预测的文件夹名就是正确的
|
||||
'如果只新增 1 个文件夹,那么拷贝 json 文件
|
||||
Dim JsonFile As FileInfo = DeltaList(0).EnumerateFiles.First()
|
||||
WriteFile(VersionFolder & Id & ".json", ReadFile(JsonFile.FullName))
|
||||
WriteFile(VersionFolder & TargetVersion & ".json", ReadFile(JsonFile.FullName))
|
||||
Log($"[Download] 已拷贝新增的版本 JSON 文件:{JsonFile.FullName} -> {VersionFolder}{TargetVersion}.json")
|
||||
ElseIf DeltaList.Count > 1 Then
|
||||
'新增了多个文件夹
|
||||
Log($"[Download] 有多个疑似的新增版本,无法确定:{DeltaList.Select(Function(d) d.Name).Join(";")}")
|
||||
Else
|
||||
'没有新增文件夹
|
||||
Log("[Download] 未找到新增的版本文件夹")
|
||||
End If
|
||||
'新建 mods 文件夹
|
||||
Directory.CreateDirectory(New McVersion(VersionFolder).GetPathIndie(True) & "mods\")
|
||||
Catch ex As Exception
|
||||
Throw New Exception("安装新 Forge 版本失败", ex)
|
||||
Throw New Exception($"安装新 {LoaderName} 版本失败", ex)
|
||||
Finally
|
||||
'清理文件
|
||||
Try
|
||||
If Installer IsNot Nothing Then Installer.Dispose()
|
||||
If File.Exists(InstallerAddress) Then File.Delete(InstallerAddress)
|
||||
Catch ex As Exception
|
||||
Log(ex, "安装 Forge 清理文件时出错")
|
||||
Log(ex, $"安装 {LoaderName} 清理文件时出错")
|
||||
End Try
|
||||
End Try
|
||||
End Sub) With {.ProgressWeight = 10})
|
||||
Else
|
||||
Log("[Download] 检测为非新版 Forge:" & Version)
|
||||
Loaders.Add(New LoaderTask(Of List(Of NetFile), Boolean)("安装 Mod 加载器(方式 B)",
|
||||
Log("[Download] 检测为非新版 Forge:" & LoaderVersion)
|
||||
Loaders.Add(New LoaderTask(Of List(Of NetFile), Boolean)($"安装 {LoaderName}(方式 B)",
|
||||
Sub(Task As LoaderTask(Of List(Of NetFile), Boolean))
|
||||
Dim Installer As ZipArchive = Nothing
|
||||
Try
|
||||
@@ -1492,12 +1426,12 @@ Retry:
|
||||
Directory.CreateDirectory(VersionFolder)
|
||||
Task.Progress = 0.5
|
||||
If Json("install") Is Nothing Then
|
||||
'中版格式
|
||||
Log("[Download] 进行中版方式安装:" & InstallerAddress)
|
||||
'中版:Legacy 方式 1
|
||||
Log("[Download] 开始进行 Forge 安装,Legacy 方式 1:" & InstallerAddress)
|
||||
'建立 Json 文件
|
||||
Dim JsonVersion As JObject = GetJson(ReadFile(Installer.GetEntry(Json("json").ToString.TrimStart("/")).Open))
|
||||
JsonVersion("id") = Id
|
||||
WriteFile(VersionFolder & Id & ".json", JsonVersion.ToString)
|
||||
JsonVersion("id") = TargetVersion
|
||||
WriteFile(VersionFolder & TargetVersion & ".json", JsonVersion.ToString)
|
||||
Task.Progress = 0.6
|
||||
'解压支持库文件
|
||||
Installer.Dispose()
|
||||
@@ -1505,17 +1439,17 @@ Retry:
|
||||
CopyDirectory(InstallerAddress & "_unrar\maven\", McFolder & "libraries\")
|
||||
DeleteDirectory(InstallerAddress & "_unrar\")
|
||||
Else
|
||||
'旧版格式
|
||||
Log("[Download] 进行旧版方式安装:" & InstallerAddress)
|
||||
'旧版:Legacy 方式 2
|
||||
Log("[Download] 开始进行 Forge 安装,Legacy 方式 2:" & InstallerAddress)
|
||||
'解压 Jar 文件
|
||||
Dim JarAddress As String = McLibGet(Json("install")("path"), CustomMcFolder:=McFolder)
|
||||
If File.Exists(JarAddress) Then File.Delete(JarAddress)
|
||||
WriteFile(JarAddress, Installer.GetEntry(Json("install")("filePath")).Open)
|
||||
Task.Progress = 0.9
|
||||
'建立 Json 文件
|
||||
Json("versionInfo")("id") = Id
|
||||
Json("versionInfo")("id") = TargetVersion
|
||||
If Json("versionInfo")("inheritsFrom") Is Nothing Then CType(Json("versionInfo"), JObject).Add("inheritsFrom", Inherit)
|
||||
WriteFile(VersionFolder & Id & ".json", Json("versionInfo").ToString)
|
||||
WriteFile(VersionFolder & TargetVersion & ".json", Json("versionInfo").ToString)
|
||||
End If
|
||||
'新建 mods 文件夹
|
||||
Directory.CreateDirectory(New McVersion(VersionFolder).GetPathIndie(True) & "mods\")
|
||||
@@ -1532,11 +1466,6 @@ Retry:
|
||||
End Try
|
||||
End Try
|
||||
End Sub) With {.ProgressWeight = 1})
|
||||
If FixLibrary Then
|
||||
If IsCustomFolder Then Throw New Exception("若需要补全支持库,就不能自定义 MC 文件夹")
|
||||
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))("分析 Mod 加载器支持库文件", Sub(Task As LoaderTask(Of String, List(Of NetFile))) Task.Output = McLibFix(New McVersion(VersionFolder))) With {.ProgressWeight = 1, .Show = False})
|
||||
Loaders.Add(New LoaderDownload("下载 Mod 加载器支持库文件", New List(Of NetFile)) With {.ProgressWeight = 11})
|
||||
End If
|
||||
End If
|
||||
|
||||
Return Loaders
|
||||
@@ -1546,16 +1475,16 @@ Retry:
|
||||
|
||||
#Region "Forge 下载菜单"
|
||||
|
||||
Public Sub ForgeDownloadListItemPreload(Stack As StackPanel, Entrys As List(Of DlForgeVersionEntry), OnClick As MyListItem.ClickEventHandler, IsSaveOnly As Boolean)
|
||||
Public Sub ForgeDownloadListItemPreload(Stack As StackPanel, Entries As List(Of DlForgeVersionEntry), OnClick As MyListItem.ClickEventHandler, IsSaveOnly As Boolean)
|
||||
'获取推荐版本与最新版本
|
||||
Dim FreshVersion As DlForgeVersionEntry = Nothing
|
||||
If Entrys.Any Then
|
||||
FreshVersion = Entrys(0)
|
||||
If Entries.Any Then
|
||||
FreshVersion = Entries(0)
|
||||
Else
|
||||
Log("[System] 未找到可用的 Forge 版本", LogLevel.Debug)
|
||||
End If
|
||||
Dim RecommendedVersion As DlForgeVersionEntry = Nothing
|
||||
For Each Entry In Entrys
|
||||
For Each Entry In Entries
|
||||
If Entry.IsRecommended Then RecommendedVersion = Entry
|
||||
Next
|
||||
'若推荐版本与最新版本为同一版本,则仅显示推荐版本
|
||||
@@ -1572,15 +1501,14 @@ Retry:
|
||||
Stack.Children.Add(Fresh)
|
||||
End If
|
||||
'添加间隔
|
||||
Stack.Children.Add(New TextBlock With {.Text = "全部版本 (" & Entrys.Count & ")", .HorizontalAlignment = HorizontalAlignment.Left, .Margin = New Thickness(6, 13, 0, 4)})
|
||||
Stack.Children.Add(New TextBlock With {.Text = "全部版本 (" & Entries.Count & ")", .HorizontalAlignment = HorizontalAlignment.Left, .Margin = New Thickness(6, 13, 0, 4)})
|
||||
End Sub
|
||||
Public Function ForgeDownloadListItem(Entry As DlForgeVersionEntry, OnClick As MyListItem.ClickEventHandler, IsSaveOnly As Boolean) As MyListItem
|
||||
'建立控件
|
||||
Dim NewItem As New MyListItem With {
|
||||
.Title = Entry.Version, .SnapsToDevicePixels = True, .Height = 42, .Type = MyListItem.CheckType.Clickable, .Tag = Entry,
|
||||
.Info = If(Entry.ReleaseTime = "",
|
||||
If(ModeDebug, "种类:" & Entry.Category & If(Entry.Branch Is Nothing, "", ",开发分支:" & Entry.Branch), ""),
|
||||
"发布于 " & Entry.ReleaseTime & If(ModeDebug, ",种类:" & Entry.Category & If(Entry.Branch Is Nothing, "", ",开发分支:" & Entry.Branch), "")),
|
||||
.Title = Entry.VersionName, .SnapsToDevicePixels = True, .Height = 42, .Type = MyListItem.CheckType.Clickable, .Tag = Entry,
|
||||
.Info = {If(Entry.ReleaseTime = "", "", "发布于 " & Entry.ReleaseTime), If(ModeDebug, "种类:" & Entry.Category, "")}.
|
||||
Where(Function(d) d <> "").Join(","),
|
||||
.Logo = PathImage & "Blocks/Anvil.png"
|
||||
}
|
||||
AddHandler NewItem.Click, OnClick
|
||||
@@ -1623,7 +1551,7 @@ Retry:
|
||||
Else
|
||||
Version = sender.Parent.Parent.Tag
|
||||
End If
|
||||
OpenWebsite("https://files.minecraftforge.net/maven/net/minecraftforge/forge/" & Version.Inherit & "-" & Version.Version & "/forge-" & Version.Inherit & "-" & Version.Version & "-changelog.txt")
|
||||
OpenWebsite($"https://files.minecraftforge.net/maven/net/minecraftforge/forge/{Version.Inherit}-{Version.VersionName}/forge-{Version.Inherit}-{Version.VersionName}-changelog.txt")
|
||||
End Sub
|
||||
Public Sub ForgeSave_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim Version As DlForgeVersionEntry
|
||||
@@ -1634,7 +1562,7 @@ Retry:
|
||||
Else
|
||||
Version = sender.Parent.Parent.Tag
|
||||
End If
|
||||
McDownloadForgeSave(Version)
|
||||
McDownloadForgelikeSave(Version)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -1696,6 +1624,101 @@ Retry:
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "NeoForge 下载菜单"
|
||||
|
||||
Public Sub NeoForgeDownloadListItemPreload(Stack As StackPanel, Entries As List(Of DlNeoForgeListEntry), OnClick As MyListItem.ClickEventHandler, IsSaveOnly As Boolean)
|
||||
'获取最新稳定版和测试版
|
||||
Dim FreshStableVersion As DlNeoForgeListEntry = Nothing
|
||||
Dim FreshBetaVersion As DlNeoForgeListEntry = Nothing
|
||||
If Entries.Any() Then
|
||||
For Each Entry In Entries.ToList()
|
||||
If Entry.IsBeta Then
|
||||
If FreshBetaVersion Is Nothing Then FreshBetaVersion = Entry
|
||||
Else
|
||||
FreshStableVersion = Entry
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Log("[System] 未找到可用的 NeoForge 版本", LogLevel.Debug)
|
||||
End If
|
||||
'显示各个版本
|
||||
If FreshStableVersion IsNot Nothing Then
|
||||
Dim Fresh = NeoForgeDownloadListItem(FreshStableVersion, OnClick, IsSaveOnly)
|
||||
Fresh.Info = If(Fresh.Info = "", "最新稳定版", "最新" & Fresh.Info)
|
||||
Stack.Children.Add(Fresh)
|
||||
End If
|
||||
If FreshBetaVersion IsNot Nothing Then
|
||||
Dim Fresh = NeoForgeDownloadListItem(FreshBetaVersion, OnClick, IsSaveOnly)
|
||||
Fresh.Info = If(Fresh.Info = "", "最新测试版", "最新" & Fresh.Info)
|
||||
Stack.Children.Add(Fresh)
|
||||
End If
|
||||
'添加间隔
|
||||
Stack.Children.Add(New TextBlock With {.Text = "全部版本 (" & Entries.Count & ")", .HorizontalAlignment = HorizontalAlignment.Left, .Margin = New Thickness(6, 13, 0, 4)})
|
||||
End Sub
|
||||
Public Function NeoForgeDownloadListItem(Info As DlNeoForgeListEntry, OnClick As MyListItem.ClickEventHandler, IsSaveOnly As Boolean) As MyListItem
|
||||
'建立控件
|
||||
Dim NewItem As New MyListItem With {
|
||||
.Title = Info.VersionName, .SnapsToDevicePixels = True, .Height = 42, .Type = MyListItem.CheckType.Clickable, .Tag = Info,
|
||||
.Info = If(Info.IsBeta, "测试版", "稳定版"),
|
||||
.Logo = PathImage & "Blocks/NeoForge.png"
|
||||
}
|
||||
AddHandler NewItem.Click, OnClick
|
||||
'建立菜单
|
||||
If IsSaveOnly Then
|
||||
NewItem.ContentHandler = AddressOf NeoForgeSaveContMenuBuild
|
||||
Else
|
||||
NewItem.ContentHandler = AddressOf NeoForgeContMenuBuild
|
||||
End If
|
||||
'结束
|
||||
Return NewItem
|
||||
End Function
|
||||
Private Sub NeoForgeContMenuBuild(sender As MyListItem, e As EventArgs)
|
||||
Dim BtnSave As New MyIconButton With {.Logo = Logo.IconButtonSave, .ToolTip = "另存为"}
|
||||
ToolTipService.SetPlacement(BtnSave, Primitives.PlacementMode.Center)
|
||||
ToolTipService.SetVerticalOffset(BtnSave, 30)
|
||||
ToolTipService.SetHorizontalOffset(BtnSave, 2)
|
||||
AddHandler BtnSave.Click, AddressOf NeoForgeSave_Click
|
||||
Dim BtnInfo As New MyIconButton With {.LogoScale = 1.05, .Logo = Logo.IconButtonInfo, .ToolTip = "更新日志"}
|
||||
ToolTipService.SetPlacement(BtnInfo, Primitives.PlacementMode.Center)
|
||||
ToolTipService.SetVerticalOffset(BtnInfo, 30)
|
||||
ToolTipService.SetHorizontalOffset(BtnInfo, 2)
|
||||
AddHandler BtnInfo.Click, AddressOf NeoForgeLog_Click
|
||||
sender.Buttons = {BtnSave, BtnInfo}
|
||||
End Sub
|
||||
Private Sub NeoForgeSaveContMenuBuild(sender As MyListItem, e As EventArgs)
|
||||
Dim BtnInfo As New MyIconButton With {.LogoScale = 1.05, .Logo = Logo.IconButtonInfo, .ToolTip = "更新日志"}
|
||||
ToolTipService.SetPlacement(BtnInfo, Primitives.PlacementMode.Center)
|
||||
ToolTipService.SetVerticalOffset(BtnInfo, 30)
|
||||
ToolTipService.SetHorizontalOffset(BtnInfo, 2)
|
||||
AddHandler BtnInfo.Click, AddressOf NeoForgeLog_Click
|
||||
sender.Buttons = {BtnInfo}
|
||||
End Sub
|
||||
Private Sub NeoForgeLog_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim Info As DlNeoForgeListEntry
|
||||
If sender.Tag IsNot Nothing Then
|
||||
Info = sender.Tag
|
||||
ElseIf sender.Parent.Tag IsNot Nothing Then
|
||||
Info = sender.Parent.Tag
|
||||
Else
|
||||
Info = sender.Parent.Parent.Tag
|
||||
End If
|
||||
OpenWebsite(Info.UrlBase & "-changelog.txt")
|
||||
End Sub
|
||||
Public Sub NeoForgeSave_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim Info As DlNeoForgeListEntry
|
||||
If sender.Tag IsNot Nothing Then
|
||||
Info = sender.Tag
|
||||
ElseIf sender.Parent.Tag IsNot Nothing Then
|
||||
Info = sender.Parent.Tag
|
||||
Else
|
||||
Info = sender.Parent.Parent.Tag
|
||||
End If
|
||||
McDownloadForgelikeSave(Info)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Fabric 下载"
|
||||
|
||||
Public Sub McDownloadFabricLoaderSave(DownloadInfo As JObject)
|
||||
@@ -1861,6 +1884,16 @@ Retry:
|
||||
''' </summary>
|
||||
Public ForgeEntry As DlForgeVersionEntry = Nothing
|
||||
|
||||
'若要下载 NeoForge,则需要在下面两项中完成至少一项
|
||||
''' <summary>
|
||||
''' 欲下载的 NeoForge 版本名。
|
||||
''' </summary>
|
||||
Public NeoForgeVersion As String = Nothing
|
||||
''' <summary>
|
||||
''' 欲下载的 NeoForge。
|
||||
''' </summary>
|
||||
Public NeoForgeEntry As DlNeoForgeListEntry = Nothing
|
||||
|
||||
''' <summary>
|
||||
''' 欲下载的 Fabric Loader 版本名。
|
||||
''' </summary>
|
||||
@@ -1961,7 +1994,7 @@ Retry:
|
||||
Public Function McInstallLoader(Request As McInstallRequest, Optional DontFixLibraries As Boolean = False) As List(Of LoaderBase)
|
||||
'获取缓存目录
|
||||
Dim PathInstallTemp As String
|
||||
If PathTemp.Contains(" ") AndAlso Request.ForgeEntry IsNot Nothing Then
|
||||
If PathTemp.Contains(" ") AndAlso (Request.OptiFineEntry IsNot Nothing OrElse Request.ForgeEntry IsNot Nothing OrElse Request.NeoForgeEntry IsNot Nothing) Then
|
||||
PathInstallTemp = OsDrive & "ProgramData\PCL\Install\"
|
||||
Else
|
||||
PathInstallTemp = PathTemp & "Install\"
|
||||
@@ -1996,8 +2029,11 @@ Retry:
|
||||
End If
|
||||
If Request.OptiFineEntry IsNot Nothing Then OptiFineFolder = TempMcFolder & "versions\" & Request.OptiFineEntry.NameVersion
|
||||
Dim ForgeFolder As String = Nothing
|
||||
If Request.ForgeEntry IsNot Nothing Then Request.ForgeVersion = If(Request.ForgeVersion, Request.ForgeEntry.Version)
|
||||
If Request.ForgeVersion IsNot Nothing Then ForgeFolder = TempMcFolder & "versions\" & Request.MinecraftName & "-forge-" & Request.ForgeVersion
|
||||
If Request.ForgeEntry IsNot Nothing Then Request.ForgeVersion = If(Request.ForgeVersion, Request.ForgeEntry.VersionName)
|
||||
If Request.ForgeVersion IsNot Nothing Then ForgeFolder = TempMcFolder & "versions\forge-" & Request.ForgeVersion
|
||||
Dim NeoForgeFolder As String = Nothing
|
||||
If Request.NeoForgeEntry IsNot Nothing Then Request.NeoForgeVersion = If(Request.NeoForgeVersion, Request.NeoForgeEntry.VersionName)
|
||||
If Request.NeoForgeVersion IsNot Nothing Then NeoForgeFolder = TempMcFolder & "versions\neoforge-" & Request.NeoForgeVersion
|
||||
Dim FabricFolder As String = Nothing
|
||||
If Request.FabricVersion IsNot Nothing Then FabricFolder = TempMcFolder & "versions\fabric-loader-" & Request.FabricVersion & "-" & Request.MinecraftName
|
||||
Dim LiteLoaderFolder As String = Nothing
|
||||
@@ -2014,6 +2050,7 @@ Retry:
|
||||
'记录日志
|
||||
If OptiFineFolder IsNot Nothing Then Log("[Download] OptiFine 缓存:" & OptiFineFolder)
|
||||
If ForgeFolder IsNot Nothing Then Log("[Download] Forge 缓存:" & ForgeFolder)
|
||||
If NeoForgeFolder IsNot Nothing Then Log("[Download] NeoForge 缓存:" & NeoForgeFolder)
|
||||
If FabricFolder IsNot Nothing Then Log("[Download] Fabric 缓存:" & FabricFolder)
|
||||
If LiteLoaderFolder IsNot Nothing Then Log("[Download] LiteLoader 缓存:" & LiteLoaderFolder)
|
||||
Log("[Download] 对应的原版版本:" & Request.MinecraftName)
|
||||
@@ -2048,7 +2085,11 @@ Retry:
|
||||
End If
|
||||
'Forge
|
||||
If Request.ForgeVersion IsNot Nothing Then
|
||||
LoaderList.Add(New LoaderCombo(Of String)("下载 Forge " & Request.ForgeVersion, McDownloadForgeLoader(Request.ForgeVersion, Request.MinecraftName, Request.ForgeEntry, TempMcFolder, ClientLoader, Request.TargetVersionFolder, False)) With {.Show = False, .ProgressWeight = 25, .Block = Request.FabricVersion Is Nothing AndAlso Request.LiteLoaderEntry Is Nothing})
|
||||
LoaderList.Add(New LoaderCombo(Of String)("下载 Forge " & Request.ForgeVersion, McDownloadForgelikeLoader(False, Request.ForgeVersion, "forge-" & Request.ForgeVersion, Request.MinecraftName, Request.ForgeEntry, TempMcFolder, ClientLoader, Request.TargetVersionFolder)) With {.Show = False, .ProgressWeight = 25, .Block = Request.FabricVersion Is Nothing AndAlso Request.LiteLoaderEntry Is Nothing AndAlso Request.NeoForgeEntry Is Nothing})
|
||||
End If
|
||||
'NeoForge
|
||||
If Request.NeoForgeVersion IsNot Nothing Then
|
||||
LoaderList.Add(New LoaderCombo(Of String)("下载 NeoForge " & Request.NeoForgeVersion, McDownloadForgelikeLoader(True, Request.NeoForgeVersion, "neoforge-" & Request.NeoForgeVersion, Request.MinecraftName, Request.NeoForgeEntry, TempMcFolder, ClientLoader, Request.TargetVersionFolder)) With {.Show = False, .ProgressWeight = 25, .Block = Request.ForgeEntry Is Nothing AndAlso Request.FabricVersion Is Nothing AndAlso Request.LiteLoaderEntry Is Nothing})
|
||||
End If
|
||||
'LiteLoader
|
||||
If Request.LiteLoaderEntry IsNot Nothing Then
|
||||
@@ -2061,14 +2102,14 @@ Retry:
|
||||
'合并安装
|
||||
LoaderList.Add(New LoaderTask(Of String, String)("安装游戏",
|
||||
Sub(Task As LoaderTask(Of String, String))
|
||||
InstallMerge(OutputFolder, OutputFolder, OptiFineFolder, OptiFineAsMod, ForgeFolder, Request.ForgeVersion, FabricFolder, LiteLoaderFolder)
|
||||
InstallMerge(OutputFolder, OutputFolder, OptiFineFolder, OptiFineAsMod, ForgeFolder, Request.ForgeVersion, NeoForgeFolder, Request.NeoForgeVersion, FabricFolder, LiteLoaderFolder)
|
||||
Task.Progress = 0.3
|
||||
If Directory.Exists(TempMcFolder & "libraries") Then CopyDirectory(TempMcFolder & "libraries", PathMcFolder & "libraries")
|
||||
If Directory.Exists(TempMcFolder & "mods") Then CopyDirectory(TempMcFolder & "mods", PathMcFolder & "mods")
|
||||
End Sub) With {.ProgressWeight = 2, .Block = True})
|
||||
'补全文件
|
||||
If Not DontFixLibraries AndAlso
|
||||
(Request.OptiFineEntry IsNot Nothing OrElse (Request.ForgeVersion IsNot Nothing AndAlso Request.ForgeVersion.Before(".") >= 20) OrElse Request.FabricVersion IsNot Nothing OrElse Request.LiteLoaderEntry IsNot Nothing) Then
|
||||
(Request.OptiFineEntry IsNot Nothing OrElse (Request.ForgeVersion IsNot Nothing AndAlso Request.ForgeVersion.Before(".") >= 20) OrElse Request.NeoForgeVersion IsNot Nothing OrElse Request.FabricVersion IsNot Nothing OrElse Request.LiteLoaderEntry IsNot Nothing) Then
|
||||
Dim LoadersLib As New List(Of LoaderBase)
|
||||
LoadersLib.Add(New LoaderTask(Of String, List(Of NetFile))("分析游戏支持库文件(副加载器)", Sub(Task As LoaderTask(Of String, List(Of NetFile))) Task.Output = McLibFix(New McVersion(OutputFolder))) With {.ProgressWeight = 1, .Show = False})
|
||||
LoadersLib.Add(New LoaderDownload("下载游戏支持库文件(副加载器)", New List(Of NetFile)) With {.ProgressWeight = 7, .Show = False})
|
||||
@@ -2084,17 +2125,18 @@ Retry:
|
||||
''' <summary>
|
||||
''' 将多个版本 Json 进行合并,如果目标已存在则直接覆盖。失败会抛出异常。
|
||||
''' </summary>
|
||||
Private Sub InstallMerge(OutputFolder As String, MinecraftFolder As String, Optional OptiFineFolder As String = Nothing, Optional OptiFineAsMod As Boolean = False, Optional ForgeFolder As String = Nothing, Optional ForgeVersion As String = Nothing, Optional FabricFolder As String = Nothing, Optional LiteLoaderFolder As String = Nothing)
|
||||
Private Sub InstallMerge(OutputFolder As String, MinecraftFolder As String, Optional OptiFineFolder As String = Nothing, Optional OptiFineAsMod As Boolean = False, Optional ForgeFolder As String = Nothing, Optional ForgeVersion As String = Nothing, Optional NeoForgeFolder As String = Nothing, Optional NeoForgeVersion As String = Nothing, Optional FabricFolder As String = Nothing, Optional LiteLoaderFolder As String = Nothing)
|
||||
Log("[Download] 开始进行版本合并,输出:" & OutputFolder & ",Minecraft:" & MinecraftFolder &
|
||||
If(OptiFineFolder IsNot Nothing, ",OptiFine:" & OptiFineFolder, "") &
|
||||
If(ForgeFolder IsNot Nothing, ",Forge:" & ForgeFolder, "") &
|
||||
If(NeoForgeFolder IsNot Nothing, ",NeoForge:" & NeoForgeFolder, "") &
|
||||
If(LiteLoaderFolder IsNot Nothing, ",LiteLoader:" & LiteLoaderFolder, "") &
|
||||
If(FabricFolder IsNot Nothing, ",Fabric:" & FabricFolder, ""))
|
||||
Directory.CreateDirectory(OutputFolder)
|
||||
|
||||
Dim HasOptiFine As Boolean = OptiFineFolder IsNot Nothing AndAlso Not OptiFineAsMod, HasForge As Boolean = ForgeFolder IsNot Nothing, HasLiteLoader As Boolean = LiteLoaderFolder IsNot Nothing, HasFabric As Boolean = FabricFolder IsNot Nothing
|
||||
Dim OutputName As String, MinecraftName As String, OptiFineName As String, ForgeName As String, LiteLoaderName As String, FabricName As String
|
||||
Dim OutputJsonPath As String, MinecraftJsonPath As String, OptiFineJsonPath As String = Nothing, ForgeJsonPath As String = Nothing, LiteLoaderJsonPath As String = Nothing, FabricJsonPath As String = Nothing
|
||||
Dim HasOptiFine As Boolean = OptiFineFolder IsNot Nothing AndAlso Not OptiFineAsMod, HasForge As Boolean = ForgeFolder IsNot Nothing, HasNeoForge As Boolean = NeoForgeFolder IsNot Nothing, HasLiteLoader As Boolean = LiteLoaderFolder IsNot Nothing, HasFabric As Boolean = FabricFolder IsNot Nothing
|
||||
Dim OutputName As String, MinecraftName As String, OptiFineName As String, ForgeName As String, NeoForgeName As String, LiteLoaderName As String, FabricName As String
|
||||
Dim OutputJsonPath As String, MinecraftJsonPath As String, OptiFineJsonPath As String = Nothing, ForgeJsonPath As String = Nothing, NeoForgeJsonPath As String = Nothing, LiteLoaderJsonPath As String = Nothing, FabricJsonPath As String = Nothing
|
||||
Dim OutputJar As String, MinecraftJar As String
|
||||
#Region "初始化路径信息"
|
||||
If Not OutputFolder.EndsWithF("\") Then OutputFolder += "\"
|
||||
@@ -2119,6 +2161,12 @@ Retry:
|
||||
ForgeJsonPath = ForgeFolder & ForgeName & ".json"
|
||||
End If
|
||||
|
||||
If HasNeoForge Then
|
||||
If Not NeoForgeFolder.EndsWithF("\") Then NeoForgeFolder += "\"
|
||||
NeoForgeName = GetFolderNameFromPath(NeoForgeFolder)
|
||||
NeoForgeJsonPath = NeoForgeFolder & NeoForgeName & ".json"
|
||||
End If
|
||||
|
||||
If HasLiteLoader Then
|
||||
If Not LiteLoaderFolder.EndsWithF("\") Then LiteLoaderFolder += "\"
|
||||
LiteLoaderName = GetFolderNameFromPath(LiteLoaderFolder)
|
||||
@@ -2132,7 +2180,7 @@ Retry:
|
||||
End If
|
||||
#End Region
|
||||
|
||||
Dim OutputJson As JObject, MinecraftJson As JObject, OptiFineJson As JObject = Nothing, ForgeJson As JObject = Nothing, LiteLoaderJson As JObject = Nothing, FabricJson As JObject = Nothing
|
||||
Dim OutputJson As JObject, MinecraftJson As JObject, OptiFineJson As JObject = Nothing, ForgeJson As JObject = Nothing, NeoForgeJson As JObject = Nothing, LiteLoaderJson As JObject = Nothing, FabricJson As JObject = Nothing
|
||||
#Region "读取文件并检查文件是否合规"
|
||||
Dim MinecraftJsonText As String = ReadFile(MinecraftJsonPath)
|
||||
If Not MinecraftJsonText.StartsWithF("{") Then Throw New Exception("Minecraft json 有误,地址:" & MinecraftJsonPath & ",前段内容:" & MinecraftJsonText.Substring(0, Math.Min(MinecraftJsonText.Length, 1000)))
|
||||
@@ -2150,6 +2198,12 @@ Retry:
|
||||
ForgeJson = GetJson(ForgeJsonText)
|
||||
End If
|
||||
|
||||
If HasNeoForge Then
|
||||
Dim NeoForgeJsonText As String = ReadFile(NeoForgeJsonPath)
|
||||
If Not NeoForgeJsonText.StartsWithF("{") Then Throw New Exception("NeoForge json 有误,地址:" & NeoForgeJsonPath & ",前段内容:" & NeoForgeJsonText.Substring(0, Math.Min(NeoForgeJsonText.Length, 1000)))
|
||||
NeoForgeJson = GetJson(NeoForgeJsonText)
|
||||
End If
|
||||
|
||||
If HasLiteLoader Then
|
||||
Dim LiteLoaderJsonText As String = ReadFile(LiteLoaderJsonPath)
|
||||
If Not LiteLoaderJsonText.StartsWithF("{") Then Throw New Exception("LiteLoader json 有误,地址:" & LiteLoaderJsonPath & ",前段内容:" & LiteLoaderJsonText.Substring(0, Math.Min(LiteLoaderJsonText.Length, 1000)))
|
||||
@@ -2163,12 +2217,13 @@ Retry:
|
||||
End If
|
||||
#End Region
|
||||
|
||||
#Region "处理 Json 文件"
|
||||
#Region "处理 JSON 文件"
|
||||
'获取 minecraftArguments
|
||||
Dim AllArguments As String =
|
||||
If(MinecraftJson("minecraftArguments"), " ").ToString & " " &
|
||||
If(OptiFineJson IsNot Nothing, If(OptiFineJson("minecraftArguments"), " ").ToString, " ") & " " &
|
||||
If(ForgeJson IsNot Nothing, If(ForgeJson("minecraftArguments"), " ").ToString, " ") & " " &
|
||||
If(NeoForgeJson IsNot Nothing, If(NeoForgeJson("minecraftArguments"), " ").ToString, " ") & " " &
|
||||
If(LiteLoaderJson IsNot Nothing, If(LiteLoaderJson("minecraftArguments"), " ").ToString, " ")
|
||||
'分割参数字符串
|
||||
Dim RawArguments As List(Of String) = AllArguments.Split(" ").Where(Function(l) l <> "").Select(Function(l) l.Trim).ToList
|
||||
@@ -2198,6 +2253,12 @@ Retry:
|
||||
ForgeJson.Remove("time")
|
||||
OutputJson.Merge(ForgeJson)
|
||||
End If
|
||||
If HasNeoForge Then
|
||||
'合并 NeoForge
|
||||
NeoForgeJson.Remove("releaseTime")
|
||||
NeoForgeJson.Remove("time")
|
||||
OutputJson.Merge(NeoForgeJson)
|
||||
End If
|
||||
If HasLiteLoader Then
|
||||
'合并 LiteLoader
|
||||
LiteLoaderJson.Remove("releaseTime")
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Log(ex, "可视化版本列表出错", LogLevel.Feedback)
|
||||
Log(ex, "可视化 MC 版本列表出错", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -177,17 +177,18 @@
|
||||
End Sub) With {.ProgressWeight = 0.1})
|
||||
|
||||
'启动
|
||||
Dim Loader As New LoaderCombo(Of String)(LoaderName, Loaders) With {.OnStateChanged = Sub(MyLoader)
|
||||
Select Case MyLoader.State
|
||||
Case LoadState.Failed
|
||||
Hint(MyLoader.Name & "失败:" & GetExceptionSummary(MyLoader.Error), HintType.Critical)
|
||||
Case LoadState.Aborted
|
||||
Hint(MyLoader.Name & "已取消!", HintType.Info)
|
||||
Case LoadState.Loading
|
||||
Exit Sub '不重新加载版本列表
|
||||
End Select
|
||||
McInstallFailedClearFolder(MyLoader)
|
||||
End Sub}
|
||||
Dim Loader As New LoaderCombo(Of String)(LoaderName, Loaders) With {.OnStateChanged =
|
||||
Sub(MyLoader)
|
||||
Select Case MyLoader.State
|
||||
Case LoadState.Failed
|
||||
Hint(MyLoader.Name & "失败:" & GetExceptionSummary(MyLoader.Error), HintType.Critical)
|
||||
Case LoadState.Aborted
|
||||
Hint(MyLoader.Name & "已取消!", HintType.Info)
|
||||
Case LoadState.Loading
|
||||
Exit Sub '不重新加载版本列表
|
||||
End Select
|
||||
McInstallFailedClearFolder(MyLoader)
|
||||
End Sub}
|
||||
Loader.Start(PathMcFolder & "versions\" & VersionName & "\")
|
||||
LoaderTaskbarAdd(Loader)
|
||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||
@@ -197,7 +198,7 @@
|
||||
Log(ex, "下载资源整合包失败", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
'Mod 下载;整合包另存为
|
||||
'Mod、资源包下载;整合包另存为
|
||||
Public Shared CachedFolder As String = Nothing '仅在本次缓存的下载文件夹
|
||||
Public Sub Save_Click(sender As Object, e As EventArgs)
|
||||
Dim File As CompFile = If(TypeOf sender Is MyListItem, sender, sender.Parent).Tag
|
||||
@@ -211,10 +212,10 @@
|
||||
'获取 Mod 所需的加载器种类
|
||||
Dim AllowForge As Boolean? = Nothing, AllowFabric As Boolean? = Nothing
|
||||
If File.ModLoaders.Any Then '从文件中获取
|
||||
AllowForge = File.ModLoaders.Contains(CompModLoaderType.Forge)
|
||||
AllowForge = File.ModLoaders.Contains(CompModLoaderType.Forge) OrElse File.ModLoaders.Contains(CompModLoaderType.NeoForge)
|
||||
AllowFabric = File.ModLoaders.Contains(CompModLoaderType.Fabric)
|
||||
ElseIf Project.ModLoaders.Any Then '从工程中获取
|
||||
AllowForge = Project.ModLoaders.Contains(CompModLoaderType.Forge)
|
||||
AllowForge = Project.ModLoaders.Contains(CompModLoaderType.Forge) OrElse File.ModLoaders.Contains(CompModLoaderType.NeoForge)
|
||||
AllowFabric = Project.ModLoaders.Contains(CompModLoaderType.Fabric)
|
||||
End If
|
||||
If AllowForge IsNot Nothing AndAlso Not AllowForge AndAlso
|
||||
@@ -230,7 +231,7 @@
|
||||
If File.GameVersions.Any(Function(v) v.Contains(".")) AndAlso
|
||||
Not File.GameVersions.Any(Function(v) v.Contains(".") AndAlso v.Split(".")(1) = Version.Version.McCodeMain.ToString) Then Return False
|
||||
If AllowForge Is Nothing OrElse AllowFabric Is Nothing Then Return True
|
||||
If AllowForge AndAlso Version.Version.HasForge Then Return True
|
||||
If AllowForge AndAlso (Version.Version.HasForge OrElse Version.Version.HasNeoForge) Then Return True
|
||||
If AllowFabric AndAlso Version.Version.HasFabric Then Return True
|
||||
Return False
|
||||
End Function
|
||||
@@ -260,10 +261,11 @@
|
||||
Log("[Comp] 由于当前版本不兼容,使用当前的 MC 文件夹作为默认下载位置")
|
||||
End If
|
||||
Else '选择 Mod 数量最多的版本
|
||||
Dim SelectedVersion = SuitableVersions.OrderBy(Function(v)
|
||||
Dim Info As New DirectoryInfo(v.PathIndie & "mods\")
|
||||
Return If(Info.Exists, Info.GetFiles().Length, -1)
|
||||
End Function).LastOrDefault()
|
||||
Dim SelectedVersion = SuitableVersions.OrderBy(
|
||||
Function(v)
|
||||
Dim Info As New DirectoryInfo(v.PathIndie & "mods\")
|
||||
Return If(Info.Exists, Info.GetFiles().Length, -1)
|
||||
End Function).LastOrDefault()
|
||||
DefaultFolder = SelectedVersion.PathIndie & "mods\"
|
||||
Directory.CreateDirectory(DefaultFolder)
|
||||
Log("[Comp] 使用适合的游戏版本作为默认下载位置(" & SelectedVersion.Name & ")")
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
' PanMain.Children.Insert(0, CardWarn)
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
Log(ex, "可视化版本列表出错", LogLevel.Feedback)
|
||||
Log(ex, "可视化 Forge 版本列表出错", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
Card.StackInstall()
|
||||
End Sub
|
||||
|
||||
Public Sub DownloadStart(sender As MyListItem, e As Object)
|
||||
McDownloadForge(sender.Tag)
|
||||
End Sub
|
||||
|
||||
'介绍栏
|
||||
Private Sub BtnWeb_Click(sender As Object, e As EventArgs) Handles BtnWeb.Click
|
||||
OpenWebsite("https://files.minecraftforge.net")
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<StackPanel Margin="25,37,25,15">
|
||||
<local:MyHint Text="你尚未选择安装 Fabric API,这会导致大多数 Mod 无法使用!" Margin="0,1,0,7" x:Name="HintFabricAPI" IsWarn="True" />
|
||||
<local:MyHint Text="你尚未选择安装 OptiFabric,这会导致 OptiFine 无法使用!" Margin="0,1,0,7" x:Name="HintOptiFabric" IsWarn="True" />
|
||||
<local:MyHint Text="安装结束后,请在 Mod 下载中搜索 OptiFabric Origins 并下载,否则 OptiFine 会无法使用!" Margin="0,1,0,7" x:Name="HintOptiFabricOld" IsWarn="False" />
|
||||
<local:MyHint Text="OptiFine 与一部分 Mod 的兼容性不佳,请谨慎安装。" Margin="0,1,0,7" x:Name="HintModOptiFine" IsWarn="False" />
|
||||
<Grid Margin="0,0,0,11">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -79,6 +80,24 @@
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="NeoForge" Height="40" Margin="0,15,0,0" x:Name="CardNeoForge" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanNeoForge" />
|
||||
<Grid x:Name="PanNeoForgeInfo" Height="18" Margin="175,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
<Grid.RenderTransform>
|
||||
<TranslateTransform />
|
||||
</Grid.RenderTransform>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image x:Name="ImgNeoForge" Margin="0,0,7,0" SnapsToDevicePixels="True" Height="18" RenderOptions.BitmapScalingMode="Linear" Source="pack://application:,,,/images/Blocks/NeoForge.png" />
|
||||
<TextBlock x:Name="LabNeoForge" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Grid.Column="1" />
|
||||
</Grid>
|
||||
<Grid x:Name="BtnNeoForgeClear" Height="30" Width="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,32,0" Background="{StaticResource ColorBrushSemiTransparent}">
|
||||
<Path x:Name="BtnNeoForgeClearInner" Height="10" Width="10" Stretch="Uniform" Fill="{StaticResource ColorBrushGray1}" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="Fabric" Height="40" Margin="0,15,0,0" x:Name="CardFabric" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanFabric" />
|
||||
<Grid x:Name="PanFabricInfo" Height="18" Margin="175,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
@@ -178,6 +197,7 @@
|
||||
<local:MyLoading Text="正在获取版本列表" Margin="20,20,20,17" x:Name="LoadMinecraft" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<local:MyLoading Visibility="Collapsed" x:Name="LoadOptiFine" HasAnimation="False" />
|
||||
<local:MyLoading Visibility="Collapsed" x:Name="LoadForge" HasAnimation="False" />
|
||||
<local:MyLoading Visibility="Collapsed" x:Name="LoadNeoForge" HasAnimation="False" />
|
||||
<local:MyLoading Visibility="Collapsed" x:Name="LoadLiteLoader" HasAnimation="False" />
|
||||
<local:MyLoading Visibility="Collapsed" x:Name="LoadFabric" HasAnimation="False" />
|
||||
<local:MyLoading Visibility="Collapsed" x:Name="LoadFabricApi" HasAnimation="False" />
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
DlOptiFineListLoader.Start()
|
||||
DlLiteLoaderListLoader.Start()
|
||||
DlFabricListLoader.Start()
|
||||
DlNeoForgeListLoader.Start()
|
||||
|
||||
'重载预览
|
||||
TextSelectName.ValidateRules = New ObjectModel.Collection(Of Validate) From {New ValidateFolderName(PathMcFolder & "versions")}
|
||||
@@ -26,6 +27,7 @@
|
||||
LoadLiteLoader.State = DlLiteLoaderListLoader
|
||||
LoadFabric.State = DlFabricListLoader
|
||||
LoadFabricApi.State = DlFabricApiLoader
|
||||
LoadNeoForge.State = DlNeoForgeListLoader
|
||||
LoadOptiFabric.State = DlOptiFabricLoader
|
||||
End Sub
|
||||
|
||||
@@ -51,6 +53,7 @@
|
||||
CardOptiFine.IsSwaped = True
|
||||
CardLiteLoader.IsSwaped = True
|
||||
CardForge.IsSwaped = True
|
||||
CardNeoForge.IsSwaped = True
|
||||
CardFabric.IsSwaped = True
|
||||
CardFabricApi.IsSwaped = True
|
||||
CardOptiFabric.IsSwaped = True
|
||||
@@ -80,32 +83,36 @@
|
||||
AniStart({
|
||||
AaOpacity(PanMinecraft, -PanMinecraft.Opacity, 100, 10),
|
||||
AaTranslateX(PanMinecraft, -50 - CType(PanMinecraft.RenderTransform, TranslateTransform).X, 110, 10),
|
||||
AaCode(Sub()
|
||||
PanBack.ScrollToHome()
|
||||
TextSelectName.Validate()
|
||||
OptiFine_Loaded()
|
||||
LiteLoader_Loaded()
|
||||
Forge_Loaded()
|
||||
Fabric_Loaded()
|
||||
FabricApi_Loaded()
|
||||
OptiFabric_Loaded()
|
||||
SelectReload()
|
||||
End Sub, After:=True),
|
||||
AaCode(
|
||||
Sub()
|
||||
PanBack.ScrollToHome()
|
||||
TextSelectName.Validate()
|
||||
OptiFine_Loaded()
|
||||
LiteLoader_Loaded()
|
||||
Forge_Loaded()
|
||||
NeoForge_Loaded()
|
||||
Fabric_Loaded()
|
||||
FabricApi_Loaded()
|
||||
OptiFabric_Loaded()
|
||||
SelectReload()
|
||||
End Sub, After:=True),
|
||||
AaOpacity(PanSelect, 1 - PanSelect.Opacity, 250, 150),
|
||||
AaTranslateX(PanSelect, -CType(PanSelect.RenderTransform, TranslateTransform).X, 500, 150, Ease:=New AniEaseOutBack(AniEasePower.Weak)),
|
||||
AaCode(Sub()
|
||||
PanMinecraft.Visibility = Visibility.Collapsed
|
||||
PanBack.IsHitTestVisible = True
|
||||
'初始化 Binding
|
||||
If IsFirstLoaded Then Exit Sub
|
||||
IsFirstLoaded = True
|
||||
BtnOptiFineClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardOptiFine.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnLiteLoaderClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardLiteLoader.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnForgeClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardForge.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnFabricClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardFabric.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnFabricApiClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardFabricApi.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnOptiFabricClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardOptiFabric.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
End Sub,, True)
|
||||
AaCode(
|
||||
Sub()
|
||||
PanMinecraft.Visibility = Visibility.Collapsed
|
||||
PanBack.IsHitTestVisible = True
|
||||
'初始化 Binding
|
||||
If IsFirstLoaded Then Exit Sub
|
||||
IsFirstLoaded = True
|
||||
BtnOptiFineClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardOptiFine.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnLiteLoaderClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardLiteLoader.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnForgeClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardForge.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnNeoForgeClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardNeoForge.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnFabricClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardFabric.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnFabricApiClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardFabricApi.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnOptiFabricClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardOptiFabric.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
End Sub,, True)
|
||||
}, "FrmDownloadInstall SelectPageSwitch", True)
|
||||
End Sub
|
||||
Public Sub ExitSelectPage()
|
||||
@@ -213,6 +220,26 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'NeoForge
|
||||
Private SelectedNeoForge As DlNeoForgeListEntry = Nothing
|
||||
Private Sub SetNeoForgeInfoShow(IsShow As String)
|
||||
If PanNeoForgeInfo.Tag = IsShow Then Exit Sub
|
||||
PanNeoForgeInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanNeoForgeInfo, -CType(PanNeoForgeInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanNeoForgeInfo, 1 - PanNeoForgeInfo.Opacity, 100, 90)
|
||||
}, "SetNeoForgeInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanNeoForgeInfo, 6 - CType(PanNeoForgeInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanNeoForgeInfo, -PanNeoForgeInfo.Opacity, 100)
|
||||
}, "SetNeoForgeInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Fabric
|
||||
Private SelectedFabric As String = Nothing
|
||||
Private Sub SetFabricInfoShow(IsShow As String)
|
||||
@@ -277,7 +304,7 @@
|
||||
''' <summary>
|
||||
''' 重载已选择的项目的显示。
|
||||
''' </summary>
|
||||
Private Sub SelectReload() Handles CardOptiFine.Swap, LoadOptiFine.StateChanged, CardForge.Swap, LoadForge.StateChanged, CardFabric.Swap, LoadFabric.StateChanged, CardFabricApi.Swap, LoadFabricApi.StateChanged, CardOptiFabric.Swap, LoadOptiFabric.StateChanged, CardLiteLoader.Swap, LoadLiteLoader.StateChanged
|
||||
Private Sub SelectReload() Handles CardOptiFine.Swap, LoadOptiFine.StateChanged, CardForge.Swap, LoadForge.StateChanged, CardNeoForge.Swap, LoadNeoForge.StateChanged, CardFabric.Swap, LoadFabric.StateChanged, CardFabricApi.Swap, LoadFabricApi.StateChanged, CardOptiFabric.Swap, LoadOptiFabric.StateChanged, CardLiteLoader.Swap, LoadLiteLoader.StateChanged
|
||||
If SelectedMinecraftId Is Nothing OrElse IsReloading Then Exit Sub
|
||||
IsReloading = True
|
||||
'主预览
|
||||
@@ -338,9 +365,30 @@
|
||||
Else
|
||||
BtnForgeClear.Visibility = Visibility.Visible
|
||||
ImgForge.Visibility = Visibility.Visible
|
||||
LabForge.Text = SelectedForge.Version
|
||||
LabForge.Text = SelectedForge.VersionName
|
||||
LabForge.Foreground = ColorGray1
|
||||
End If
|
||||
'NeoForge
|
||||
If Not SelectedMinecraftId.Contains("1.") OrElse Val(SelectedMinecraftId.Split(".")(1)) <= 19 Then
|
||||
CardNeoForge.Visibility = Visibility.Collapsed
|
||||
Else
|
||||
CardNeoForge.Visibility = Visibility.Visible
|
||||
Dim NeoForgeError As String = LoadNeoForgeGetError()
|
||||
CardNeoForge.MainSwap.Visibility = If(NeoForgeError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If NeoForgeError IsNot Nothing Then CardNeoForge.IsSwaped = True
|
||||
SetNeoForgeInfoShow(CardNeoForge.IsSwaped)
|
||||
If SelectedNeoForge Is Nothing Then
|
||||
BtnNeoForgeClear.Visibility = Visibility.Collapsed
|
||||
ImgNeoForge.Visibility = Visibility.Collapsed
|
||||
LabNeoForge.Text = If(NeoForgeError, "点击选择")
|
||||
LabNeoForge.Foreground = ColorGray4
|
||||
Else
|
||||
BtnNeoForgeClear.Visibility = Visibility.Visible
|
||||
ImgNeoForge.Visibility = Visibility.Visible
|
||||
LabNeoForge.Text = SelectedNeoForge.VersionName
|
||||
LabNeoForge.Foreground = ColorGray1
|
||||
End If
|
||||
End If
|
||||
'Fabric
|
||||
If SelectedMinecraftId.Contains("1.") AndAlso Val(SelectedMinecraftId.Split(".")(1)) <= 13 Then
|
||||
CardFabric.Visibility = Visibility.Collapsed
|
||||
@@ -411,9 +459,16 @@
|
||||
HintFabricAPI.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
If SelectedFabric IsNot Nothing AndAlso SelectedOptiFine IsNot Nothing AndAlso SelectedOptiFabric Is Nothing Then
|
||||
HintOptiFabric.Visibility = Visibility.Visible
|
||||
If SelectedMinecraftId.StartsWith("1.14") OrElse SelectedMinecraftId.StartsWith("1.15") Then
|
||||
HintOptiFabric.Visibility = Visibility.Collapsed
|
||||
HintOptiFabricOld.Visibility = Visibility.Visible
|
||||
Else
|
||||
HintOptiFabric.Visibility = Visibility.Visible
|
||||
HintOptiFabricOld.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
Else
|
||||
HintOptiFabric.Visibility = Visibility.Collapsed
|
||||
HintOptiFabricOld.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
If SelectedMinecraftId.Contains("1.") AndAlso Val(SelectedMinecraftId.Split(".")(1)) >= 16 AndAlso SelectedOptiFine IsNot Nothing AndAlso
|
||||
(SelectedForge IsNot Nothing OrElse SelectedFabric IsNot Nothing) Then
|
||||
@@ -434,6 +489,7 @@
|
||||
SelectedOptiFine = Nothing
|
||||
SelectedLiteLoader = Nothing
|
||||
SelectedForge = Nothing
|
||||
SelectedNeoForge = Nothing
|
||||
SelectedFabric = Nothing
|
||||
SelectedFabricApi = Nothing
|
||||
SelectedOptiFabric = Nothing
|
||||
@@ -449,7 +505,10 @@
|
||||
Name += "-Fabric " & SelectedFabric.Replace("+build", "")
|
||||
End If
|
||||
If SelectedForge IsNot Nothing Then
|
||||
Name += "-Forge_" & SelectedForge.Version
|
||||
Name += "-Forge_" & SelectedForge.VersionName
|
||||
End If
|
||||
If SelectedNeoForge IsNot Nothing Then
|
||||
Name += "-NeoForge_" & SelectedNeoForge.VersionName
|
||||
End If
|
||||
If SelectedLiteLoader IsNot Nothing Then
|
||||
Name += "-LiteLoader"
|
||||
@@ -468,7 +527,10 @@
|
||||
Info += ", Fabric " & SelectedFabric.Replace("+build", "")
|
||||
End If
|
||||
If SelectedForge IsNot Nothing Then
|
||||
Info += ", Forge " & SelectedForge.Version
|
||||
Info += ", Forge " & SelectedForge.VersionName
|
||||
End If
|
||||
If SelectedNeoForge IsNot Nothing Then
|
||||
Info += ", NeoForge " & SelectedNeoForge.VersionName
|
||||
End If
|
||||
If SelectedLiteLoader IsNot Nothing Then
|
||||
Info += ", LiteLoader"
|
||||
@@ -487,6 +549,8 @@
|
||||
Return "pack://application:,,,/images/Blocks/Fabric.png"
|
||||
ElseIf SelectedForge IsNot Nothing Then
|
||||
Return "pack://application:,,,/images/Blocks/Anvil.png"
|
||||
ElseIf SelectedNeoForge IsNot Nothing Then
|
||||
Return "pack://application:,,,/images/Blocks/NeoForge.png"
|
||||
ElseIf SelectedLiteLoader IsNot Nothing Then
|
||||
Return "pack://application:,,,/images/Blocks/Egg.png"
|
||||
ElseIf SelectedOptiFine IsNot Nothing Then
|
||||
@@ -624,6 +688,7 @@
|
||||
''' 获取 OptiFine 的加载异常信息。若正常则返回 Nothing。
|
||||
''' </summary>
|
||||
Private Function LoadOptiFineGetError() As String
|
||||
If SelectedNeoForge IsNot Nothing Then Return "与 NeoForge 不兼容"
|
||||
If LoadOptiFine Is Nothing OrElse LoadOptiFine.State.LoadingState = MyLoading.MyLoadingState.Run Then Return "正在获取版本列表……"
|
||||
If LoadOptiFine.State.LoadingState = MyLoading.MyLoadingState.Error Then Return "获取版本列表失败:" & CType(LoadOptiFine.State, Object).Error.Message
|
||||
'检查 Forge 1.13 - 1.14.3:全部不兼容
|
||||
@@ -659,10 +724,12 @@
|
||||
Private Function IsOptiFineSuitForForge(OptiFine As DlOptiFineListEntry, Forge As DlForgeVersionEntry)
|
||||
If Forge.Inherit <> OptiFine.Inherit Then Return False '不是同一个大版本
|
||||
If OptiFine.RequiredForgeVersion Is Nothing Then Return False '不兼容 Forge
|
||||
Return (OptiFine.RequiredForgeVersion.Contains(".") AndAlso 'XX.X.XXX
|
||||
VersionSortInteger(Forge.Version, OptiFine.RequiredForgeVersion) >= 0) OrElse
|
||||
(Not OptiFine.RequiredForgeVersion.Contains(".") AndAlso '#XXXX
|
||||
Forge.Version.After(".") >= OptiFine.RequiredForgeVersion)
|
||||
If String.IsNullOrWhiteSpace(OptiFine.RequiredForgeVersion) Then Return True '#4183
|
||||
If OptiFine.RequiredForgeVersion.Contains(".") Then 'XX.X.XXX
|
||||
Return VersionSortInteger(Forge.Version.ToString, OptiFine.RequiredForgeVersion) >= 0
|
||||
Else 'XXXX
|
||||
Return Forge.Version.Revision >= OptiFine.RequiredForgeVersion
|
||||
End If
|
||||
End Function
|
||||
|
||||
'限制展开
|
||||
@@ -685,11 +752,12 @@
|
||||
Next
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
'排序
|
||||
Versions = Sort(Versions, Function(Left As DlOptiFineListEntry, Right As DlOptiFineListEntry) As Boolean
|
||||
If Not Left.IsPreview AndAlso Right.IsPreview Then Return True
|
||||
If Left.IsPreview AndAlso Not Right.IsPreview Then Return False
|
||||
Return VersionSortBoolean(Left.NameDisplay, Right.NameDisplay)
|
||||
End Function)
|
||||
Versions = Sort(Versions,
|
||||
Function(Left As DlOptiFineListEntry, Right As DlOptiFineListEntry) As Boolean
|
||||
If Not Left.IsPreview AndAlso Right.IsPreview Then Return True
|
||||
If Left.IsPreview AndAlso Not Right.IsPreview Then Return False
|
||||
Return VersionSortBoolean(Left.NameDisplay, Right.NameDisplay)
|
||||
End Function)
|
||||
'可视化
|
||||
PanOptiFine.Children.Clear()
|
||||
For Each Version In Versions
|
||||
@@ -706,6 +774,7 @@
|
||||
If SelectedForge IsNot Nothing AndAlso Not IsOptiFineSuitForForge(SelectedOptiFine, SelectedForge) Then SelectedForge = Nothing
|
||||
OptiFabric_Loaded()
|
||||
Forge_Loaded()
|
||||
NeoForge_Loaded()
|
||||
CardOptiFine.IsSwaped = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
@@ -715,6 +784,7 @@
|
||||
CardOptiFine.IsSwaped = True
|
||||
e.Handled = True
|
||||
Forge_Loaded()
|
||||
NeoForge_Loaded()
|
||||
SelectReload()
|
||||
End Sub
|
||||
|
||||
@@ -800,6 +870,7 @@
|
||||
Dim NotSuitForOptiFine As Boolean = False
|
||||
For Each Version In Loader.Output
|
||||
If Version.Category = "universal" OrElse Version.Category = "client" Then Continue For '跳过无法自动安装的版本
|
||||
If SelectedNeoForge IsNot Nothing Then Return "与 NeoForge 不兼容"
|
||||
If SelectedFabric IsNot Nothing Then Return "与 Fabric 不兼容"
|
||||
If SelectedOptiFine IsNot Nothing AndAlso
|
||||
VersionSortInteger(SelectedMinecraftId, "1.13") >= 0 AndAlso VersionSortInteger("1.14.3", SelectedMinecraftId) >= 0 Then
|
||||
@@ -829,16 +900,15 @@
|
||||
If SelectedMinecraftId <> Loader.Input Then Exit Sub
|
||||
If Loader.State <> LoadState.Finished Then Exit Sub
|
||||
'获取要显示的版本
|
||||
Dim Versions As New List(Of DlForgeVersionEntry)
|
||||
Versions.AddRange(Loader.Output) '复制数组,以免 Output 在实例化后变空
|
||||
Dim Versions = Loader.Output.ToList '复制数组,以免 Output 在实例化后变空
|
||||
If Not Loader.Output.Any() Then Exit Sub
|
||||
PanForge.Children.Clear()
|
||||
Versions = Sort(Versions, Function(a, b) New Version(a.Version) > New Version(b.Version)).
|
||||
Where(Function(v)
|
||||
If v.Category = "universal" OrElse v.Category = "client" Then Return False '跳过无法自动安装的版本
|
||||
If SelectedOptiFine IsNot Nothing AndAlso Not IsOptiFineSuitForForge(SelectedOptiFine, v) Then Return False
|
||||
Return True
|
||||
End Function).ToList
|
||||
Versions = Sort(Versions, Function(a, b) a.Version > b.Version).Where(
|
||||
Function(v)
|
||||
If v.Category = "universal" OrElse v.Category = "client" Then Return False '跳过无法自动安装的版本
|
||||
If SelectedOptiFine IsNot Nothing AndAlso Not IsOptiFineSuitForForge(SelectedOptiFine, v) Then Return False
|
||||
Return True
|
||||
End Function).ToList()
|
||||
ForgeDownloadListItemPreload(PanForge, Versions, AddressOf Forge_Selected, False)
|
||||
For Each Version In Versions
|
||||
PanForge.Children.Add(ForgeDownloadListItem(Version, AddressOf Forge_Selected, False))
|
||||
@@ -866,6 +936,67 @@
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "NeoForge 列表"
|
||||
|
||||
''' <summary>
|
||||
''' 获取 NeoForge 的加载异常信息。若正常则返回 Nothing。
|
||||
''' </summary>
|
||||
Private Function LoadNeoForgeGetError() As String
|
||||
If Not SelectedMinecraftId.StartsWith("1.") Then Return "没有可用版本"
|
||||
If SelectedOptiFine IsNot Nothing Then Return "与 OptiFine 不兼容"
|
||||
If SelectedForge IsNot Nothing Then Return "与 Forge 不兼容"
|
||||
If SelectedFabric IsNot Nothing Then Return "与 Fabric 不兼容"
|
||||
If LoadNeoForge Is Nothing OrElse LoadNeoForge.State.LoadingState = MyLoading.MyLoadingState.Run Then Return "正在获取版本列表……"
|
||||
If LoadNeoForge.State.LoadingState = MyLoading.MyLoadingState.Error Then Return "获取版本列表失败:" & CType(LoadNeoForge.State, Object).Error.Message
|
||||
If DlNeoForgeListLoader.Output.Value.Any(Function(v) v.Inherit = SelectedMinecraftId) Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return "没有可用版本"
|
||||
End If
|
||||
End Function
|
||||
|
||||
'限制展开
|
||||
Private Sub CardNeoForge_PreviewSwap(sender As Object, e As RouteEventArgs) Handles CardNeoForge.PreviewSwap
|
||||
If LoadNeoForgeGetError() IsNot Nothing Then e.Handled = True
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 尝试重新可视化 NeoForge 版本列表。
|
||||
''' </summary>
|
||||
Private Sub NeoForge_Loaded() Handles LoadNeoForge.StateChanged
|
||||
Try
|
||||
'获取版本列表
|
||||
If DlNeoForgeListLoader.State <> LoadState.Finished Then Exit Sub
|
||||
Dim Versions = DlNeoForgeListLoader.Output.Value.Where(Function(v) v.Inherit = SelectedMinecraftId).ToList
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
'可视化
|
||||
PanNeoForge.Children.Clear()
|
||||
NeoForgeDownloadListItemPreload(PanNeoForge, Versions, AddressOf NeoForge_Selected, False)
|
||||
For Each Version In Versions
|
||||
PanNeoForge.Children.Add(NeoForgeDownloadListItem(Version, AddressOf NeoForge_Selected, False))
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Log(ex, "可视化 NeoForge 安装版本列表出错", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'选择与清除
|
||||
Private Sub NeoForge_Selected(sender As MyListItem, e As EventArgs)
|
||||
SelectedNeoForge = sender.Tag
|
||||
CardNeoForge.IsSwaped = True
|
||||
OptiFine_Loaded()
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub NeoForge_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnNeoForgeClear.MouseLeftButtonUp
|
||||
SelectedNeoForge = Nothing
|
||||
CardNeoForge.IsSwaped = True
|
||||
e.Handled = True
|
||||
OptiFine_Loaded()
|
||||
SelectReload()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Fabric 列表"
|
||||
|
||||
''' <summary>
|
||||
@@ -877,7 +1008,7 @@
|
||||
For Each Version As JObject In DlFabricListLoader.Output.Value("game")
|
||||
If Version("version").ToString = SelectedMinecraftId.Replace("∞", "infinite").Replace("Combat Test 7c", "1.16_combat-3") Then
|
||||
If SelectedForge IsNot Nothing Then Return "与 Forge 不兼容"
|
||||
'If SelectedOptiFine IsNot Nothing Then Return "与 OptiFine 不兼容"
|
||||
If SelectedNeoForge IsNot Nothing Then Return "与 NeoForge 不兼容"
|
||||
Return Nothing
|
||||
End If
|
||||
Next
|
||||
@@ -1064,6 +1195,7 @@
|
||||
''' 获取 OptiFabric 的加载异常信息。若正常则返回 Nothing。
|
||||
''' </summary>
|
||||
Private Function LoadOptiFabricGetError() As String
|
||||
If SelectedMinecraftId.StartsWith("1.14") OrElse SelectedMinecraftId.StartsWith("1.15") Then Return "不兼容老版本 Fabric,请手动下载 OptiFabric Origins"
|
||||
If LoadOptiFabric Is Nothing OrElse LoadOptiFabric.State.LoadingState = MyLoading.MyLoadingState.Run Then Return "正在获取版本列表……"
|
||||
If LoadOptiFabric.State.LoadingState = MyLoading.MyLoadingState.Error Then Return "获取版本列表失败:" & CType(LoadOptiFabric.State, Object).Error.Message
|
||||
If DlOptiFabricLoader.Output Is Nothing Then
|
||||
@@ -1109,7 +1241,8 @@
|
||||
PanOptiFabric.Children.Add(OptiFabricDownloadListItem(Version, AddressOf OptiFabric_Selected))
|
||||
Next
|
||||
'自动选择 OptiFabric
|
||||
If Not AutoSelectedOptiFabric Then
|
||||
If Not AutoSelectedOptiFabric AndAlso
|
||||
Not (SelectedMinecraftId.StartsWith("1.14") OrElse SelectedMinecraftId.StartsWith("1.15")) Then '1.14~15 不自动选择
|
||||
AutoSelectedOptiFabric = True
|
||||
Log($"[Download] 已自动选择 OptiFabric:{CType(PanOptiFabric.Children(0), MyListItem).Title}")
|
||||
OptiFabric_Selected(PanOptiFabric.Children(0), Nothing)
|
||||
@@ -1141,7 +1274,7 @@
|
||||
End Sub
|
||||
Private Sub BtnSelectStart_Click() Handles BtnSelectStart.Click
|
||||
'确认版本隔离
|
||||
If (SelectedForge IsNot Nothing OrElse SelectedFabric IsNot Nothing) AndAlso
|
||||
If (SelectedForge IsNot Nothing OrElse SelectedNeoForge IsNot Nothing OrElse SelectedFabric IsNot Nothing) AndAlso
|
||||
(Setup.Get("LaunchArgumentIndie") = 0 OrElse Setup.Get("LaunchArgumentIndie") = 2) Then
|
||||
If MyMsgBox("你尚未开启版本隔离,这会导致多个 MC 共用同一个 Mod 文件夹。" & vbCrLf &
|
||||
"因此在切换 MC 版本时,MC 会因为读取到与当前版本不符的 Mod 而崩溃。" & vbCrLf &
|
||||
@@ -1157,6 +1290,7 @@
|
||||
.MinecraftName = SelectedMinecraftId,
|
||||
.OptiFineEntry = SelectedOptiFine,
|
||||
.ForgeEntry = SelectedForge,
|
||||
.NeoForgeEntry = SelectedNeoForge,
|
||||
.FabricVersion = SelectedFabric,
|
||||
.FabricApi = SelectedFabricApi,
|
||||
.OptiFabric = SelectedOptiFabric,
|
||||
|
||||
@@ -43,47 +43,55 @@
|
||||
</x:Array>
|
||||
</local:MyListItem.Buttons>
|
||||
</local:MyListItem>
|
||||
<local:MyListItem x:Name="ItemFabric" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="7" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Fabric"
|
||||
LogoScale="1.02" Logo="M826.453333 170.666667c-100.266667-93.866667-248.96-76.373333-256-75.52a31.786667 31.786667 0 0 0-26.666666 22.613333c-1.066667 3.2-101.546667 330.666667-426.666667 445.013333a29.013333 29.013333 0 0 0-7.893333 4.48l-1.493334 1.066667a29.44 29.44 0 0 0-5.973333 6.613333 31.786667 31.786667 0 0 0-3.626667 7.68 5.333333 5.333333 0 0 1 0 1.493334 30.506667 30.506667 0 0 0 0 8.96c7.466667 116.266667 45.013333 204.586667 112 262.826666a303.36 303.36 0 0 0 194.773334 71.466667h11.52a32.426667 32.426667 0 0 0 27.093333-19.626667 694.186667 694.186667 0 0 1 159.36-234.666666l-7.68 55.466666A31.786667 31.786667 0 0 0 621.44 768h4.48a32.213333 32.213333 0 0 0 31.786667-27.733333l15.573333-112.426667 112.426667 8.32a32 32 0 1 0 4.693333-64l-56.96-4.266667c36.48-25.813333 74.026667-50.56 112-75.52l51.626667-34.133333a31.573333 31.573333 0 0 0 14.08-24.746667c6.186667-115.2-21.76-203.306667-84.693334-262.826666zM620.8 573.013333l-1.706667 1.493334a219.093333 219.093333 0 0 0-87.466666-116.693334 222.933333 222.933333 0 0 0-95.146667-33.28c18.986667-21.333333 36.266667-42.666667 51.626667-64a198.613333 198.613333 0 0 1 202.453333 158.08c-20.053333 14.506667-39.893333 29.44-59.52 45.226667a29.866667 29.866667 0 0 0-10.24 9.173333z m-228.693333 292.266667a238.72 238.72 0 0 1-141.44-55.893333 213.333333 213.333333 0 0 1-34.986667-39.466667 123.946667 123.946667 0 0 0 44.373333 8.106667 168.533333 168.533333 0 0 0 69.12-16.213334 29.44 29.44 0 0 0 7.04-4.266666l106.666667-85.333334a32 32 0 1 0-39.893333-49.92L298.666667 704a78.293333 78.293333 0 0 1-69.546667 1.706667c-32.426667-17.066667-52.693333-61.653333-62.506667-93.44a709.333333 709.333333 0 0 0 202.453334-123.733334 187.52 187.52 0 0 1 128 21.333334 171.946667 171.946667 0 0 1 68.906666 109.653333 756.48 756.48 0 0 0-173.866666 245.76zM810.666667 438.4l-64 42.666667A256 256 0 0 0 529.706667 298.666667a810.666667 810.666667 0 0 0 69.12-140.8c37.973333-1.066667 123.946667 4.053333 183.68 59.946666 45.866667 42.666667 67.84 108.8 65.493333 195.84z">
|
||||
<local:MyListItem x:Name="ItemNeoForge" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="7" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="NeoForge"
|
||||
LogoScale="0.95" Logo="M544.6 921.2l-23.7 32.6c14.1 10.2 33.3 10.2 47.5 0l-23.7-32.6zM114.6 608.5l-23.9 32.5 0.2 0.1 23.6-32.6z m-12.0-38.0l38.3 12.7v-0.2l-38.3-12.4z m49.2-152.6l-38.4-12.4 38.4 12.4zM250.2 114.4l-37.6-14.6a40.2 40.2 0 0 0-0.7 2.1l38.4 12.4z m4.3-6.4l27.0 29.9 0.2-0.2-27.2-29.7z m11.7-4.5V63.0v40.4z m11.7 4.5l28.0-29.0a40.5 40.5 0 0 0-0.8-0.8l-27.2 29.8z m4.4 7.3l-38.6 11.7a40.5 40.5 0 0 0 0.2 0.7l38.3-12.4zM381.0 417.7l-38.4 12.5a40.3 40.3 0 0 0 38.4 27.8v-40.3z m327.0 0v40.3c17.5 0 32.9-11.2 38.4-27.8L708.1 417.7z m98.5-303.3l-37.6-14.6a38.4 38.4 0 0 0-0.7 2.1l38.4 12.4z m4.3-6.4l27.1 29.9 0.1-0.2-27.2-29.7z m11.7-4.5v0z m11.7 4.5l28.0-29.0a38.4 38.4 0 0 0-0.8-0.8l-27.2 29.8z m4.3 7.3l-38.6 11.7a47.5 47.5 0 0 0 0.2 0.7l38.4-12.4z m98.5 303.3l-38.4 12.4 0.1 0.5 38.2-12.9z m51.2 151.9l38.7-11.3a34.5 34.5 0 0 0-0.5-1.6l-38.1 12.9z m-37.8 5.2l-430.0 312.6 47.5 65.3 429.9-312.6-47.5-65.3z m-382.5 312.6L138.3 575.8l-47.5 65.3L520.9 953.9l47.3-65.3zM138.5 576a6.4 6.4 0 0 1 2.3 3.2l-76.9 24.5c4.7 14.9 14.1 28.0 26.7 37.3l47.8-65.0z m2.3 3.2a6.4 6.4 0 0 1 0 4.0L64.1 557.9a74.3 74.3 0 0 0-0.2 45.8l76.9-24.5z m0 3.7l49.2-152.6-76.8-24.8L64.0 558.2l76.8 24.8z m49.2-152.5l98.5-303.3-76.8-25.0L113.3 405.3l76.8 25.0z m97.7-301.3a23.4 23.4 0 0 1-6.1 8.9L227.6 78.0a57.3 57.3 0 0 0-15.0 21.8l75.3 29.1z m-5.9 8.7a23.0 23.0 0 0 1-15.5 6.0V63.0a57.7 57.7 0 0 0-38.9 15.1l54.4 59.6z m-15.5 6.0a23.0 23.0 0 0 1-15.5-6.0l54.4-59.6A57.7 57.7 0 0 0 266.4 63.0v80.8z m-16.3-6.8a23.4 23.4 0 0 1-6.1-10.0l77.3-23.4a57.3 57.3 0 0 0-15.0-24.5l-56.1 58.0z m-5.8-9.2l98.4 302.5 76.8-25.0-98.5-302.5-76.8 25.0z m136.8 330.4H708.1V377.5H381.2v80.7z m365.4-27.8l98.5-303.3-76.8-25.0L669.6 405.3l76.8 25.0z m97.7-301.3a23.4 23.4 0 0 1-6.1 8.9l-54.1-59.9a57.3 57.3 0 0 0-15.0 21.8l75.3 29.1z m-5.9 8.7a23.0 23.0 0 0 1-15.5 6.0V63.0a57.7 57.7 0 0 0-38.9 15.1l54.4 59.6z m-15.5 6.0a23.0 23.0 0 0 1-15.5-6.0l54.4-59.6a57.7 57.7 0 0 0-38.9-15.1v80.8z m-16.3-6.8a23.4 23.4 0 0 1-6.1-10.0l77.3-23.4a57.4 57.4 0 0 0-14.9-24.5l-56.1 58.0z m-5.8-9.2l98.5 303.3 76.8-25.0-98.5-303.3-76.8 25.0z m98.6 303.8l51.2 151.9 76.5-25.8-51.2-151.9-76.5 25.8z m50.7 150.2a6.5 6.5 0 0 1 0.1-4.0l75.6 28.1c5.5-14.9 6.2-31.3 1.6-46.7l-77.5 22.6z m0.1-4.0a6.4 6.4 0 0 1 2.4-3.2l43.8 67.8c13.4-8.7 23.6-21.5 29.2-36.4l-75.6-28.1z">
|
||||
<local:MyListItem.Buttons>
|
||||
<x:Array Type="{x:Type local:MyIconButton}">
|
||||
<local:MyIconButton Tag="7" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" Logo="M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z" />
|
||||
</x:Array>
|
||||
</local:MyListItem.Buttons>
|
||||
</local:MyListItem>
|
||||
<local:MyListItem x:Name="ItemLiteLoader" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="8" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="LiteLoader"
|
||||
LogoScale="1.06" Logo="M517.41 186.99l22.45 83.78h-55.04l-18.76-70.02c-2.85-10.63-13.78-16.95-24.42-14.1-10.63 2.85-16.95 13.78-14.1 24.42l16 59.71H388.5l-12.31-45.95c-10.45-38.99 12.69-79.08 51.69-89.52s79.08 12.68 89.53 51.68z M538.58 98c40.37 0 73.1 32.73 73.1 73.1v79.74h-53.16V171.1c0-11.01-8.93-19.94-19.94-19.94-11.01 0-19.94 8.93-19.94 19.94v79.74h-53.16V171.1c0-40.37 32.73-73.1 73.1-73.1z M512 224.26c191.58 0 346.88 155.3 346.88 346.88v61.8c0 28.85 3.33 59.94 9.98 93.27l1.29 6.28c12.43 59.1-21.15 118.2-78.28 137.78C691.18 904.75 597.9 922 512 922c-83.94 0-174.95-16.47-273.01-49.41l-6.85-2.32c-56.4-19.32-89.85-77.16-78.74-135.5l0.46-2.27c7.51-35.71 11.27-68.89 11.27-99.55v-61.8c0-189.66 152.21-343.77 341.14-346.83l5.73-0.06z m-4.64 66.49c-151.21 2.45-273.32 124.58-275.75 275.8l-0.04 4.59v61.8l-0.04 5.93c-0.45 33.74-4.7 69.49-12.65 107.3-5.53 26.27 9.4 52.53 34.79 61.23 94.08 32.23 180.19 48.15 258.32 48.15s164.25-15.92 258.32-48.15c25.39-8.7 40.32-34.97 34.79-61.23-7.95-37.81-12.2-73.56-12.65-107.3l-0.04-5.93v-61.8c0-153.33-123.05-277.91-275.79-280.39l-4.64-0.04-4.62 0.04z M500.66 717.38l-53.28-87.19c-3.83-6.26-1.85-14.44 4.41-18.27 0.76-0.46 1.56-0.85 2.39-1.15L512 589.74l57.82 21.03c6.9 2.51 10.46 10.13 7.95 17.03-0.3 0.83-0.69 1.63-1.15 2.39l-53.28 87.19c-3.83 6.26-12.01 8.24-18.27 4.41-1.8-1.1-3.31-2.61-4.41-4.41z M684.77 689.42m-46.52 0a46.52 46.52 0 1 0 93.04 0 46.52 46.52 0 1 0-93.04 0Z M339.23 689.42m-46.52 0a46.52 46.52 0 1 0 93.04 0 46.52 46.52 0 1 0-93.04 0Z">
|
||||
<local:MyListItem x:Name="ItemFabric" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="8" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Fabric"
|
||||
LogoScale="1.02" Logo="M826.453333 170.666667c-100.266667-93.866667-248.96-76.373333-256-75.52a31.786667 31.786667 0 0 0-26.666666 22.613333c-1.066667 3.2-101.546667 330.666667-426.666667 445.013333a29.013333 29.013333 0 0 0-7.893333 4.48l-1.493334 1.066667a29.44 29.44 0 0 0-5.973333 6.613333 31.786667 31.786667 0 0 0-3.626667 7.68 5.333333 5.333333 0 0 1 0 1.493334 30.506667 30.506667 0 0 0 0 8.96c7.466667 116.266667 45.013333 204.586667 112 262.826666a303.36 303.36 0 0 0 194.773334 71.466667h11.52a32.426667 32.426667 0 0 0 27.093333-19.626667 694.186667 694.186667 0 0 1 159.36-234.666666l-7.68 55.466666A31.786667 31.786667 0 0 0 621.44 768h4.48a32.213333 32.213333 0 0 0 31.786667-27.733333l15.573333-112.426667 112.426667 8.32a32 32 0 1 0 4.693333-64l-56.96-4.266667c36.48-25.813333 74.026667-50.56 112-75.52l51.626667-34.133333a31.573333 31.573333 0 0 0 14.08-24.746667c6.186667-115.2-21.76-203.306667-84.693334-262.826666zM620.8 573.013333l-1.706667 1.493334a219.093333 219.093333 0 0 0-87.466666-116.693334 222.933333 222.933333 0 0 0-95.146667-33.28c18.986667-21.333333 36.266667-42.666667 51.626667-64a198.613333 198.613333 0 0 1 202.453333 158.08c-20.053333 14.506667-39.893333 29.44-59.52 45.226667a29.866667 29.866667 0 0 0-10.24 9.173333z m-228.693333 292.266667a238.72 238.72 0 0 1-141.44-55.893333 213.333333 213.333333 0 0 1-34.986667-39.466667 123.946667 123.946667 0 0 0 44.373333 8.106667 168.533333 168.533333 0 0 0 69.12-16.213334 29.44 29.44 0 0 0 7.04-4.266666l106.666667-85.333334a32 32 0 1 0-39.893333-49.92L298.666667 704a78.293333 78.293333 0 0 1-69.546667 1.706667c-32.426667-17.066667-52.693333-61.653333-62.506667-93.44a709.333333 709.333333 0 0 0 202.453334-123.733334 187.52 187.52 0 0 1 128 21.333334 171.946667 171.946667 0 0 1 68.906666 109.653333 756.48 756.48 0 0 0-173.866666 245.76zM810.666667 438.4l-64 42.666667A256 256 0 0 0 529.706667 298.666667a810.666667 810.666667 0 0 0 69.12-140.8c37.973333-1.066667 123.946667 4.053333 183.68 59.946666 45.866667 42.666667 67.84 108.8 65.493333 195.84z">
|
||||
<local:MyListItem.Buttons>
|
||||
<x:Array Type="{x:Type local:MyIconButton}">
|
||||
<local:MyIconButton Tag="8" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" Logo="M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z" />
|
||||
</x:Array>
|
||||
</local:MyListItem.Buttons>
|
||||
</local:MyListItem>
|
||||
<TextBlock Text="资源" Margin="13,18,5,4" Opacity="0.6" FontSize="12" />
|
||||
<local:MyListItem x:Name="ItemMod" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="10" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Mod"
|
||||
LogoScale="0.97" Logo="M789.504 912.896h-195.072a35.328 35.328 0 0 1-34.816-35.328v-77.312a39.936 39.936 0 0 0-40.448-39.936H481.28a40.448 40.448 0 0 0-40.448 39.936v77.312a34.816 34.816 0 0 1-34.816 35.328H204.8a41.984 41.984 0 0 1-40.448-42.496v-200.192a35.328 35.328 0 0 1 35.328-35.328h72.704a39.936 39.936 0 0 0 39.936-39.936v-37.888a39.936 39.936 0 0 0-39.936-40.448H199.68a35.328 35.328 0 0 1-35.328-35.328V287.744A41.984 41.984 0 0 1 204.8 245.76h176.64v-32.768a102.4 102.4 0 0 1 102.4-102.4h33.792a102.4 102.4 0 0 1 102.4 102.4v32.768h170.496a41.984 41.984 0 0 1 41.984 41.984V460.8h28.672a102.4 102.4 0 0 1 102.4 102.4v33.792a102.4 102.4 0 0 1-102.4 102.4h-28.672V870.4a41.984 41.984 0 0 1-43.008 42.496z m-159.744-70.144h131.584V665.6a34.304 34.304 0 0 1 34.816-34.816h64a31.744 31.744 0 0 0 31.744-31.744V563.2a31.744 31.744 0 0 0-31.744-31.744h-64a34.816 34.816 0 0 1-34.816-35.328V316.416h-177.152a35.328 35.328 0 0 1-35.328-35.328V212.992a31.744 31.744 0 0 0-31.744-31.744h-33.792a31.744 31.744 0 0 0-31.744 31.744v68.096a35.328 35.328 0 0 1-34.816 35.328H234.496v130.048h37.888a110.592 110.592 0 0 1 110.08 110.592v37.888a110.592 110.592 0 0 1-110.08 110.592h-37.888v137.216h136.192v-42.496a110.592 110.592 0 0 1 110.592-110.08h37.888a110.592 110.592 0 0 1 110.592 110.08z">
|
||||
<local:MyListItem x:Name="ItemLiteLoader" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="9" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="LiteLoader"
|
||||
LogoScale="1.06" Logo="M517.41 186.99l22.45 83.78h-55.04l-18.76-70.02c-2.85-10.63-13.78-16.95-24.42-14.1-10.63 2.85-16.95 13.78-14.1 24.42l16 59.71H388.5l-12.31-45.95c-10.45-38.99 12.69-79.08 51.69-89.52s79.08 12.68 89.53 51.68z M538.58 98c40.37 0 73.1 32.73 73.1 73.1v79.74h-53.16V171.1c0-11.01-8.93-19.94-19.94-19.94-11.01 0-19.94 8.93-19.94 19.94v79.74h-53.16V171.1c0-40.37 32.73-73.1 73.1-73.1z M512 224.26c191.58 0 346.88 155.3 346.88 346.88v61.8c0 28.85 3.33 59.94 9.98 93.27l1.29 6.28c12.43 59.1-21.15 118.2-78.28 137.78C691.18 904.75 597.9 922 512 922c-83.94 0-174.95-16.47-273.01-49.41l-6.85-2.32c-56.4-19.32-89.85-77.16-78.74-135.5l0.46-2.27c7.51-35.71 11.27-68.89 11.27-99.55v-61.8c0-189.66 152.21-343.77 341.14-346.83l5.73-0.06z m-4.64 66.49c-151.21 2.45-273.32 124.58-275.75 275.8l-0.04 4.59v61.8l-0.04 5.93c-0.45 33.74-4.7 69.49-12.65 107.3-5.53 26.27 9.4 52.53 34.79 61.23 94.08 32.23 180.19 48.15 258.32 48.15s164.25-15.92 258.32-48.15c25.39-8.7 40.32-34.97 34.79-61.23-7.95-37.81-12.2-73.56-12.65-107.3l-0.04-5.93v-61.8c0-153.33-123.05-277.91-275.79-280.39l-4.64-0.04-4.62 0.04z M500.66 717.38l-53.28-87.19c-3.83-6.26-1.85-14.44 4.41-18.27 0.76-0.46 1.56-0.85 2.39-1.15L512 589.74l57.82 21.03c6.9 2.51 10.46 10.13 7.95 17.03-0.3 0.83-0.69 1.63-1.15 2.39l-53.28 87.19c-3.83 6.26-12.01 8.24-18.27 4.41-1.8-1.1-3.31-2.61-4.41-4.41z M684.77 689.42m-46.52 0a46.52 46.52 0 1 0 93.04 0 46.52 46.52 0 1 0-93.04 0Z M339.23 689.42m-46.52 0a46.52 46.52 0 1 0 93.04 0 46.52 46.52 0 1 0-93.04 0Z">
|
||||
<local:MyListItem.Buttons>
|
||||
<x:Array Type="{x:Type local:MyIconButton}">
|
||||
<local:MyIconButton Tag="10" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" Logo="M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z" />
|
||||
<local:MyIconButton Tag="9" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" Logo="M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z" />
|
||||
</x:Array>
|
||||
</local:MyListItem.Buttons>
|
||||
</local:MyListItem>
|
||||
<local:MyListItem x:Name="ItemPack" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="11" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="整合包"
|
||||
LogoScale="0.98" Logo="M511.488 995.328a128.654222 128.654222 0 0 1-57.116444-13.112889L70.769778 791.808a126.833778 126.833778 0 0 1-70.769778-113.777778V311.608889a126.179556 126.179556 0 0 1 15.36-60.103111V248.604444c1.479111-2.901333 3.356444-5.603556 5.518222-8.021333a127.630222 127.630222 0 0 1 49.891556-42.325333L454.371556 13.368889a128.739556 128.739556 0 0 1 112.981333 0l383.601778 190.407111a126.862222 126.862222 0 0 1 72.049777 113.379556v360.874666a126.805333 126.805333 0 0 1-70.769777 115.939556L568.604444 984.32c-17.92 7.964444-37.461333 11.747556-57.116444 11.008z m42.638222-470.897778v370.204445l360.192-178.545778c14.449778-7.253333 23.552-21.987556 23.438222-38.087111v-335.928889L554.097778 524.430222zM85.248 330.666667v347.335111a42.268444 42.268444 0 0 0 23.438222 38.087111l360.192 178.545778V523.576889L85.248 330.666667zM135.537778 260.835556l375.950222 189.952 137.671111-65.564445L286.435556 188.074667 135.537778 260.864z m245.105778-118.471112l363.576888 197.973334 150.897778-71.480889-365.283555-180.224a42.922667 42.922667 0 0 0-37.518223 0l-111.672888 53.731555z">
|
||||
<TextBlock Text="资源" Margin="13,18,5,4" Opacity="0.6" FontSize="12" />
|
||||
<local:MyListItem x:Name="ItemMod" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="11" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Mod"
|
||||
LogoScale="0.97" Logo="M789.504 912.896h-195.072a35.328 35.328 0 0 1-34.816-35.328v-77.312a39.936 39.936 0 0 0-40.448-39.936H481.28a40.448 40.448 0 0 0-40.448 39.936v77.312a34.816 34.816 0 0 1-34.816 35.328H204.8a41.984 41.984 0 0 1-40.448-42.496v-200.192a35.328 35.328 0 0 1 35.328-35.328h72.704a39.936 39.936 0 0 0 39.936-39.936v-37.888a39.936 39.936 0 0 0-39.936-40.448H199.68a35.328 35.328 0 0 1-35.328-35.328V287.744A41.984 41.984 0 0 1 204.8 245.76h176.64v-32.768a102.4 102.4 0 0 1 102.4-102.4h33.792a102.4 102.4 0 0 1 102.4 102.4v32.768h170.496a41.984 41.984 0 0 1 41.984 41.984V460.8h28.672a102.4 102.4 0 0 1 102.4 102.4v33.792a102.4 102.4 0 0 1-102.4 102.4h-28.672V870.4a41.984 41.984 0 0 1-43.008 42.496z m-159.744-70.144h131.584V665.6a34.304 34.304 0 0 1 34.816-34.816h64a31.744 31.744 0 0 0 31.744-31.744V563.2a31.744 31.744 0 0 0-31.744-31.744h-64a34.816 34.816 0 0 1-34.816-35.328V316.416h-177.152a35.328 35.328 0 0 1-35.328-35.328V212.992a31.744 31.744 0 0 0-31.744-31.744h-33.792a31.744 31.744 0 0 0-31.744 31.744v68.096a35.328 35.328 0 0 1-34.816 35.328H234.496v130.048h37.888a110.592 110.592 0 0 1 110.08 110.592v37.888a110.592 110.592 0 0 1-110.08 110.592h-37.888v137.216h136.192v-42.496a110.592 110.592 0 0 1 110.592-110.08h37.888a110.592 110.592 0 0 1 110.592 110.08z">
|
||||
<local:MyListItem.Buttons>
|
||||
<x:Array Type="{x:Type local:MyIconButton}">
|
||||
<local:MyIconButton Tag="11" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" Logo="M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z" />
|
||||
</x:Array>
|
||||
</local:MyListItem.Buttons>
|
||||
</local:MyListItem>
|
||||
<local:MyListItem x:Name="ItemResourcePack" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="12" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="资源包"
|
||||
LogoScale="0.98" Logo="M511.488 995.328a128.654222 128.654222 0 0 1-57.116444-13.112889L70.769778 791.808a126.833778 126.833778 0 0 1-70.769778-113.777778V311.608889a126.179556 126.179556 0 0 1 15.36-60.103111V248.604444c1.479111-2.901333 3.356444-5.603556 5.518222-8.021333a127.630222 127.630222 0 0 1 49.891556-42.325333L454.371556 13.368889a128.739556 128.739556 0 0 1 112.981333 0l383.601778 190.407111a126.862222 126.862222 0 0 1 72.049777 113.379556v360.874666a126.805333 126.805333 0 0 1-70.769777 115.939556L568.604444 984.32c-17.92 7.964444-37.461333 11.747556-57.116444 11.008z m42.638222-470.897778v370.204445l360.192-178.545778c14.449778-7.253333 23.552-21.987556 23.438222-38.087111v-335.928889L554.097778 524.430222zM85.248 330.666667v347.335111a42.268444 42.268444 0 0 0 23.438222 38.087111l360.192 178.545778V523.576889L85.248 330.666667zM135.537778 260.835556l375.950222 189.952 137.671111-65.564445L286.435556 188.074667 135.537778 260.864z m245.105778-118.471112l363.576888 197.973334 150.897778-71.480889-365.283555-180.224a42.922667 42.922667 0 0 0-37.518223 0l-111.672888 53.731555z">
|
||||
<local:MyListItem x:Name="ItemPack" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="12" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="整合包"
|
||||
LogoScale="0.98" Logo="M511.488 995.328a128.654222 128.654222 0 0 1-57.116444-13.112889L70.769778 791.808a126.833778 126.833778 0 0 1-70.769778-113.777778V311.608889a126.179556 126.179556 0 0 1 15.36-60.103111V248.604444c1.479111-2.901333 3.356444-5.603556 5.518222-8.021333a127.630222 127.630222 0 0 1 49.891556-42.325333L454.371556 13.368889a128.739556 128.739556 0 0 1 112.981333 0l383.601778 190.407111a126.862222 126.862222 0 0 1 72.049777 113.379556v360.874666a126.805333 126.805333 0 0 1-70.769777 115.939556L568.604444 984.32c-17.92 7.964444-37.461333 11.747556-57.116444 11.008z m42.638222-470.897778v370.204445l360.192-178.545778c14.449778-7.253333 23.552-21.987556 23.438222-38.087111v-335.928889L554.097778 524.430222zM85.248 330.666667v347.335111a42.268444 42.268444 0 0 0 23.438222 38.087111l360.192 178.545778V523.576889L85.248 330.666667zM135.537778 260.835556l375.950222 189.952 137.671111-65.564445L286.435556 188.074667 135.537778 260.864z m245.105778-118.471112l363.576888 197.973334 150.897778-71.480889-365.283555-180.224a42.922667 42.922667 0 0 0-37.518223 0l-111.672888 53.731555z">
|
||||
<local:MyListItem.Buttons>
|
||||
<x:Array Type="{x:Type local:MyIconButton}">
|
||||
<local:MyIconButton Tag="12" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" Logo="M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z" />
|
||||
</x:Array>
|
||||
</local:MyListItem.Buttons>
|
||||
</local:MyListItem>
|
||||
<local:MyListItem x:Name="ItemResourcePack" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="13" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="资源包"
|
||||
LogoScale="0.98" Logo="M511.488 995.328a128.654222 128.654222 0 0 1-57.116444-13.112889L70.769778 791.808a126.833778 126.833778 0 0 1-70.769778-113.777778V311.608889a126.179556 126.179556 0 0 1 15.36-60.103111V248.604444c1.479111-2.901333 3.356444-5.603556 5.518222-8.021333a127.630222 127.630222 0 0 1 49.891556-42.325333L454.371556 13.368889a128.739556 128.739556 0 0 1 112.981333 0l383.601778 190.407111a126.862222 126.862222 0 0 1 72.049777 113.379556v360.874666a126.805333 126.805333 0 0 1-70.769777 115.939556L568.604444 984.32c-17.92 7.964444-37.461333 11.747556-57.116444 11.008z m42.638222-470.897778v370.204445l360.192-178.545778c14.449778-7.253333 23.552-21.987556 23.438222-38.087111v-335.928889L554.097778 524.430222zM85.248 330.666667v347.335111a42.268444 42.268444 0 0 0 23.438222 38.087111l360.192 178.545778V523.576889L85.248 330.666667zM135.537778 260.835556l375.950222 189.952 137.671111-65.564445L286.435556 188.074667 135.537778 260.864z m245.105778-118.471112l363.576888 197.973334 150.897778-71.480889-365.283555-180.224a42.922667 42.922667 0 0 0-37.518223 0l-111.672888 53.731555z">
|
||||
<local:MyListItem.Buttons>
|
||||
<x:Array Type="{x:Type local:MyIconButton}">
|
||||
<local:MyIconButton Tag="13" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" Logo="M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z" />
|
||||
</x:Array>
|
||||
</local:MyListItem.Buttons>
|
||||
</local:MyListItem>
|
||||
|
||||
</StackPanel>
|
||||
</local:MyPageLeft>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
''' <summary>
|
||||
''' 勾选事件改变页面。
|
||||
''' </summary>
|
||||
Private Sub PageCheck(sender As MyListItem, e As RouteEventArgs) Handles ItemInstall.Check, ItemClient.Check, ItemOptiFine.Check, ItemForge.Check, ItemLiteLoader.Check, ItemMod.Check, ItemFabric.Check, ItemPack.Check, ItemResourcePack.Check
|
||||
Private Sub PageCheck(sender As MyListItem, e As RouteEventArgs) Handles ItemInstall.Check, ItemClient.Check, ItemOptiFine.Check, ItemForge.Check, ItemNeoForge.Check, ItemLiteLoader.Check, ItemMod.Check, ItemFabric.Check, ItemPack.Check, ItemResourcePack.Check
|
||||
'尚未初始化控件属性时,sender.Tag 为 Nothing,会导致切换到页面 0
|
||||
'若使用 IsLoaded,则会导致模拟点击不被执行(模拟点击切换页面时,控件的 IsLoaded 为 False)
|
||||
If sender.Tag IsNot Nothing Then PageChange(Val(sender.Tag))
|
||||
@@ -31,6 +31,9 @@
|
||||
Case FormMain.PageSubType.DownloadForge
|
||||
If FrmDownloadForge Is Nothing Then FrmDownloadForge = New PageDownloadForge
|
||||
Return FrmDownloadForge
|
||||
Case FormMain.PageSubType.DownloadNeoForge
|
||||
If FrmDownloadNeoForge Is Nothing Then FrmDownloadNeoForge = New PageDownloadNeoForge
|
||||
Return FrmDownloadNeoForge
|
||||
Case FormMain.PageSubType.DownloadLiteLoader
|
||||
If FrmDownloadLiteLoader Is Nothing Then FrmDownloadLiteLoader = New PageDownloadLiteLoader
|
||||
Return FrmDownloadLiteLoader
|
||||
@@ -72,17 +75,19 @@
|
||||
FrmMain.PageRight = Target
|
||||
CType(FrmMain.PanMainRight.Child, MyPageRight).PageOnExit()
|
||||
AniStart({
|
||||
AaCode(Sub()
|
||||
CType(FrmMain.PanMainRight.Child, MyPageRight).PageOnForceExit()
|
||||
FrmMain.PanMainRight.Child = FrmMain.PageRight
|
||||
FrmMain.PageRight.Opacity = 0
|
||||
End Sub, 130),
|
||||
AaCode(Sub()
|
||||
'延迟触发页面通用动画,以使得在 Loaded 事件中加载的控件得以处理
|
||||
FrmMain.PageRight.Opacity = 1
|
||||
FrmMain.PageRight.PageOnEnter()
|
||||
End Sub, 30, True)
|
||||
}, "PageLeft PageChange")
|
||||
AaCode(
|
||||
Sub()
|
||||
CType(FrmMain.PanMainRight.Child, MyPageRight).PageOnForceExit()
|
||||
FrmMain.PanMainRight.Child = FrmMain.PageRight
|
||||
FrmMain.PageRight.Opacity = 0
|
||||
End Sub, 130),
|
||||
AaCode(
|
||||
Sub()
|
||||
'延迟触发页面通用动画,以使得在 Loaded 事件中加载的控件得以处理
|
||||
FrmMain.PageRight.Opacity = 1
|
||||
FrmMain.PageRight.PageOnEnter()
|
||||
End Sub, 30, True)
|
||||
}, "PageLeft PageChange")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -94,6 +99,7 @@
|
||||
DlClientListLoader.Start(IsForceRestart:=True)
|
||||
DlOptiFineListLoader.Start(IsForceRestart:=True)
|
||||
DlForgeListLoader.Start(IsForceRestart:=True)
|
||||
DlNeoForgeListLoader.Start(IsForceRestart:=True)
|
||||
DlLiteLoaderListLoader.Start(IsForceRestart:=True)
|
||||
DlFabricListLoader.Start(IsForceRestart:=True)
|
||||
DlFabricApiLoader.Start(IsForceRestart:=True)
|
||||
@@ -126,6 +132,9 @@
|
||||
Case FormMain.PageSubType.DownloadForge
|
||||
DlForgeListLoader.Start(IsForceRestart:=True)
|
||||
ItemForge.Checked = True
|
||||
Case FormMain.PageSubType.DownloadNeoForge
|
||||
DlNeoForgeListLoader.Start(IsForceRestart:=True)
|
||||
ItemNeoForge.Checked = True
|
||||
Case FormMain.PageSubType.DownloadLiteLoader
|
||||
DlLiteLoaderListLoader.Start(IsForceRestart:=True)
|
||||
ItemLiteLoader.Checked = True
|
||||
@@ -163,12 +172,14 @@
|
||||
ItemOptiFine.Visibility = Visibility.Visible
|
||||
ItemFabric.Visibility = Visibility.Visible
|
||||
ItemForge.Visibility = Visibility.Visible
|
||||
ItemNeoForge.Visibility = Visibility.Visible
|
||||
ItemLiteLoader.Visibility = Visibility.Visible
|
||||
RunInThread(Sub()
|
||||
Thread.Sleep(20)
|
||||
RunInUiWait(Sub() ItemClient.SetChecked(True, True, True))
|
||||
AniControlEnabled -= 1
|
||||
End Sub)
|
||||
RunInThread(
|
||||
Sub()
|
||||
Thread.Sleep(20)
|
||||
RunInUiWait(Sub() ItemClient.SetChecked(True, True, True))
|
||||
AniControlEnabled -= 1
|
||||
End Sub)
|
||||
End Sub
|
||||
'折叠手动安装
|
||||
Private Sub LabHand_Click(sender As Object, e As MouseButtonEventArgs) Handles LabHand.MouseLeftButtonUp
|
||||
@@ -179,14 +190,16 @@
|
||||
LabHand.Visibility = Visibility.Collapsed
|
||||
ItemClient.Visibility = Visibility.Collapsed
|
||||
ItemOptiFine.Visibility = Visibility.Collapsed
|
||||
ItemNeoForge.Visibility = Visibility.Collapsed
|
||||
ItemFabric.Visibility = Visibility.Collapsed
|
||||
ItemForge.Visibility = Visibility.Collapsed
|
||||
ItemLiteLoader.Visibility = Visibility.Collapsed
|
||||
RunInThread(Sub()
|
||||
Thread.Sleep(20)
|
||||
RunInUiWait(Sub() ItemInstall.SetChecked(True, True, True))
|
||||
AniControlEnabled -= 1
|
||||
End Sub)
|
||||
RunInThread(
|
||||
Sub()
|
||||
Thread.Sleep(20)
|
||||
RunInUiWait(Sub() ItemInstall.SetChecked(True, True, True))
|
||||
AniControlEnabled -= 1
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Log(ex, "可视化版本列表出错", LogLevel.Feedback)
|
||||
Log(ex, "可视化 LiteLoader 版本列表出错", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="版本" Margin="0,0,18,0" />
|
||||
<local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" IsEditable="True" MaxDropDownHeight="320">
|
||||
<local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" />
|
||||
<local:MyComboBoxItem Content="1.21" />
|
||||
<local:MyComboBoxItem Content="1.20.6" />
|
||||
<local:MyComboBoxItem Content="1.20.4" />
|
||||
<local:MyComboBoxItem Content="1.20.1" />
|
||||
|
||||
@@ -40,12 +40,14 @@
|
||||
Visibility.Visible, Visibility.Collapsed)
|
||||
LabPage.Text = Page + 1
|
||||
BtnPageFirst.IsEnabled = Page > 1
|
||||
BtnPageFirst.Opacity = If(BtnPageFirst.IsEnabled, 1, 0.2)
|
||||
BtnPageFirst.Opacity = If(Page > 1, 1, 0.2)
|
||||
BtnPageLeft.IsEnabled = Page > 0
|
||||
BtnPageLeft.Opacity = If(BtnPageLeft.IsEnabled, 1, 0.2)
|
||||
BtnPageRight.IsEnabled = Storage.Results.Count > PageSize * (Page + 1) OrElse
|
||||
Storage.CurseForgeOffset < Storage.CurseForgeTotal OrElse Storage.ModrinthOffset < Storage.ModrinthTotal
|
||||
BtnPageRight.Opacity = If(BtnPageRight.IsEnabled, 1, 0.2)
|
||||
BtnPageLeft.Opacity = If(Page > 0, 1, 0.2)
|
||||
Dim IsRightEnabled As Boolean = '由于 WPF 的未知 bug,读取到的 IsEnabled 可能是错误的值(#3319)
|
||||
Storage.Results.Count > PageSize * (Page + 1) OrElse
|
||||
Storage.CurseForgeOffset < Storage.CurseForgeTotal OrElse Storage.ModrinthOffset < Storage.ModrinthTotal
|
||||
BtnPageRight.IsEnabled = IsRightEnabled
|
||||
BtnPageRight.Opacity = If(IsRightEnabled, 1, 0.2)
|
||||
'错误信息
|
||||
If Storage.ErrorMessage Is Nothing Then
|
||||
HintError.Visibility = Visibility.Collapsed
|
||||
@@ -89,11 +91,12 @@
|
||||
Page = NewPage
|
||||
FrmMain.BackToTop()
|
||||
Log($"[Download] Mod 切换到第 {Page + 1} 页")
|
||||
RunInThread(Sub()
|
||||
Thread.Sleep(100) '等待向上滚的动画结束
|
||||
RunInUi(Sub() CardPages.IsEnabled = True)
|
||||
Loader.Start()
|
||||
End Sub)
|
||||
RunInThread(
|
||||
Sub()
|
||||
Thread.Sleep(100) '等待向上滚的动画结束
|
||||
RunInUi(Sub() CardPages.IsEnabled = True)
|
||||
Loader.Start()
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
#Region "搜索"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<local:MyPageRight
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:PCL" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" x:Class="PageDownloadNeoForge"
|
||||
PanScroll="{Binding ElementName=PanBack}">
|
||||
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
|
||||
<StackPanel Orientation="Vertical" Margin="5">
|
||||
<local:MyCard Margin="20,20,20,0" Grid.IsSharedSizeScope="True" Title="NeoForge 简介" x:Name="CardTip">
|
||||
<StackPanel Margin="25,40,15,20">
|
||||
<TextBlock Margin="0,0,0,11" Text="NeoForge 是 Minecraft 1.19+ 的 Mod 加载器,你需要先安装它才能安装各种 NeoForge 模组。
本页面提供 NeoForge 安装器下载,在下载后你需要手动打开安装器进行安装。" TextWrapping="Wrap" />
|
||||
<Grid Height="35">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:MyButton x:Name="BtnWeb" Grid.Column="0" MinWidth="140" Text="打开官网" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" ColorType="Highlight"
|
||||
EventType="打开网页" EventData="https://neoforged.net/" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<StackPanel Name="PanMain" Margin="20,15,20,5" Grid.IsSharedSizeScope="True" />
|
||||
<local:MyCard HorizontalAlignment="Center" SnapsToDevicePixels="True" x:Name="PanLoad" UseAnimation="False" Margin="40,50">
|
||||
<local:MyLoading Text="正在获取 NeoForge 列表" Margin="20,20,20,17" x:Name="Load" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</local:MyCard>
|
||||
</StackPanel>
|
||||
</local:MyScrollViewer>
|
||||
</local:MyPageRight>
|
||||
@@ -0,0 +1,34 @@
|
||||
Public Class PageDownloadNeoForge
|
||||
|
||||
Private Sub LoaderInit() Handles Me.Initialized
|
||||
PageLoaderInit(Load, PanLoad, PanMain, CardTip, DlNeoForgeListLoader, AddressOf Load_OnFinish)
|
||||
End Sub
|
||||
Private Sub Init() Handles Me.Loaded
|
||||
PanBack.ScrollToHome()
|
||||
End Sub
|
||||
|
||||
Private Sub Load_OnFinish()
|
||||
'结果数据化
|
||||
Try
|
||||
'归类
|
||||
Dim Dict = DlNeoForgeListLoader.Output.Value.GroupBy(Function(d) d.Inherit).OrderByDescending(Function(g) g.Key).
|
||||
ToDictionary(Function(g) g.Key, Function(g) g.ToList())
|
||||
'清空当前
|
||||
PanMain.Children.Clear()
|
||||
'转化为 UI
|
||||
For Each Pair As KeyValuePair(Of String, List(Of DlNeoForgeListEntry)) In Dict
|
||||
If Not Pair.Value.Any() Then Continue For
|
||||
'增加卡片
|
||||
Dim NewCard As New MyCard With {.Title = Pair.Key & " (" & Pair.Value.Count & ")", .Margin = New Thickness(0, 0, 0, 15), .SwapType = 13}
|
||||
Dim NewStack As New StackPanel With {.Margin = New Thickness(20, MyCard.SwapedHeight, 18, 0), .VerticalAlignment = VerticalAlignment.Top, .RenderTransform = New TranslateTransform(0, 0), .Tag = Pair.Value}
|
||||
NewCard.Children.Add(NewStack)
|
||||
NewCard.SwapControl = NewStack
|
||||
NewCard.IsSwaped = True
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Log(ex, "可视化 NeoForge 版本列表出错", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -13,7 +13,7 @@
|
||||
'归类
|
||||
Dim Dict As New Dictionary(Of String, List(Of DlOptiFineListEntry))
|
||||
Dict.Add("快照版本", New List(Of DlOptiFineListEntry))
|
||||
For VersionCode As Integer = 30 To 0 Step -1
|
||||
For VersionCode As Integer = 50 To 0 Step -1
|
||||
Dict.Add("1." & VersionCode, New List(Of DlOptiFineListEntry))
|
||||
Next
|
||||
For Each Version As DlOptiFineListEntry In DlOptiFineListLoader.Output.Value
|
||||
@@ -42,14 +42,10 @@
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Log(ex, "可视化版本列表出错", LogLevel.Feedback)
|
||||
Log(ex, "可视化 OptiFine 版本列表出错", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub DownloadStart(sender As MyListItem, e As Object)
|
||||
McDownloadOptiFine(sender.Tag)
|
||||
End Sub
|
||||
|
||||
Private Sub BtnWeb_Click(sender As Object, e As EventArgs) Handles BtnWeb.Click
|
||||
OpenWebsite("https://www.optifine.net/")
|
||||
End Sub
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="版本" Margin="0,0,18,0" />
|
||||
<local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" IsEditable="True" MaxDropDownHeight="320">
|
||||
<local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" />
|
||||
<local:MyComboBoxItem Content="1.21" />
|
||||
<local:MyComboBoxItem Content="1.20.6" />
|
||||
<local:MyComboBoxItem Content="1.20.4" />
|
||||
<local:MyComboBoxItem Content="1.20.1" />
|
||||
|
||||
@@ -39,12 +39,14 @@
|
||||
Visibility.Visible, Visibility.Collapsed)
|
||||
LabPage.Text = Page + 1
|
||||
BtnPageFirst.IsEnabled = Page > 1
|
||||
BtnPageFirst.Opacity = If(BtnPageFirst.IsEnabled, 1, 0.2)
|
||||
BtnPageFirst.Opacity = If(Page > 1, 1, 0.2)
|
||||
BtnPageLeft.IsEnabled = Page > 0
|
||||
BtnPageLeft.Opacity = If(BtnPageLeft.IsEnabled, 1, 0.2)
|
||||
BtnPageRight.IsEnabled = Storage.Results.Count > PageSize * (Page + 1) OrElse
|
||||
Storage.CurseForgeOffset < Storage.CurseForgeTotal OrElse Storage.ModrinthOffset < Storage.ModrinthTotal
|
||||
BtnPageRight.Opacity = If(BtnPageRight.IsEnabled, 1, 0.2)
|
||||
BtnPageLeft.Opacity = If(Page > 0, 1, 0.2)
|
||||
Dim IsRightEnabled As Boolean = '由于 WPF 的未知 bug,读取到的 IsEnabled 可能是错误的值(#3319)
|
||||
Storage.Results.Count > PageSize * (Page + 1) OrElse
|
||||
Storage.CurseForgeOffset < Storage.CurseForgeTotal OrElse Storage.ModrinthOffset < Storage.ModrinthTotal
|
||||
BtnPageRight.IsEnabled = IsRightEnabled
|
||||
BtnPageRight.Opacity = If(IsRightEnabled, 1, 0.2)
|
||||
'错误信息
|
||||
If Storage.ErrorMessage Is Nothing Then
|
||||
HintError.Visibility = Visibility.Collapsed
|
||||
|
||||
@@ -241,7 +241,7 @@ Retry:
|
||||
{"Translator-Chinese", "Crowdin 中文翻译者披风"}, {"Translator", "Crowdin 翻译者披风"}, {"Cobalt", "Cobalt 披风"},
|
||||
{"Vanilla", "原版披风"}, {"Minecon2011", "Minecon 2011 参与者披风"}, {"Minecon2012", "Minecon 2012 参与者披风"},
|
||||
{"Minecon2013", "Minecon 2013 参与者披风"}, {"Minecon2015", "Minecon 2015 参与者披风"}, {"Minecon2016", "Minecon 2016 参与者披风"},
|
||||
{"Cherry Blossom", "樱花披风"}, {"15th Anniversary", "15 周年纪念披风"}, {"Purple Heart", "紫色心形披风"}
|
||||
{"Cherry Blossom", "樱花披风"}, {"15th Anniversary", "15 周年纪念披风"}, {"Purple Heart", "紫色心形披风"}, {"Follower's", "追随者披风"}
|
||||
}
|
||||
Dim SelectionControl As New List(Of IMyRadio) From {New MyRadioBox With {.Text = "无披风"}}
|
||||
For Each Cape In SkinData("capes")
|
||||
|
||||
@@ -21,6 +21,19 @@
|
||||
'加载版本
|
||||
RunInNewThread(
|
||||
Sub()
|
||||
''自动整合包安装:准备
|
||||
'Dim PackInstallPath As String = Nothing
|
||||
'If File.Exists(Path & "modpack.zip") Then PackInstallPath = Path & "modpack.zip"
|
||||
'If File.Exists(Path & "modpack.mrpack") Then PackInstallPath = Path & "modpack.mrpack"
|
||||
'If PackInstallPath IsNot Nothing Then
|
||||
' Log("[Launch] 需自动安装整合包:" & PackInstallPath, LogLevel.Debug)
|
||||
' If Not Directory.Exists(Path & ".minecraft\") Then
|
||||
' Directory.CreateDirectory(Path & ".minecraft\")
|
||||
' Directory.CreateDirectory(Path & ".minecraft\versions\")
|
||||
' McFolderLauncherProfilesJsonCreate(Path & ".minecraft\")
|
||||
' End If
|
||||
' Setup.Set("LaunchFolderSelect", "$.minecraft\")
|
||||
'End If
|
||||
'确认 Minecraft 文件夹存在
|
||||
PathMcFolder = Setup.Get("LaunchFolderSelect").ToString.Replace("$", Path)
|
||||
If PathMcFolder = "" OrElse Not Directory.Exists(PathMcFolder) Then
|
||||
@@ -35,17 +48,21 @@
|
||||
End If
|
||||
Log("[Launch] Minecraft 文件夹:" & PathMcFolder)
|
||||
If Setup.Get("SystemDebugDelay") Then Thread.Sleep(RandomInteger(500, 3000))
|
||||
''自动整合包安装
|
||||
'If PackInstallPath IsNot Nothing Then
|
||||
' If ModpackInstall(PackInstallPath) Then
|
||||
' Log("[Launch] 自动安装整合包成功:" & PackInstallPath)
|
||||
' File.Delete(PackInstallPath)
|
||||
' Else
|
||||
' Log("[Launch] 自动安装整合包失败:" & PackInstallPath)
|
||||
' End If
|
||||
'End If
|
||||
'确认 Minecraft 版本存在
|
||||
Dim Selection As String = Setup.Get("LaunchVersionSelect")
|
||||
Dim Version As McVersion
|
||||
If Selection = "" Then
|
||||
Version = Nothing
|
||||
Else
|
||||
Version = New McVersion(Selection)
|
||||
End If
|
||||
If IsNothing(Version) OrElse Not (Version.Path.StartsWith(PathMcFolder) AndAlso Version.Check) Then
|
||||
Dim Version As McVersion = If(Selection = "", Nothing, New McVersion(Selection))
|
||||
If Version Is Nothing OrElse Not (Version.Path.StartsWith(PathMcFolder) AndAlso Version.Check) Then
|
||||
'无效的版本
|
||||
Log("[Launch] Minecraft 版本无效" & If(IsNothing(Version), ",没有有效版本", ":" & Version.Path), If(IsNothing(Version), LogLevel.Normal, LogLevel.Debug))
|
||||
Log("[Launch] Minecraft 版本无效" & If(Version Is Nothing, ",没有有效版本", ":" & Version.Path), If(IsNothing(Version), LogLevel.Normal, LogLevel.Debug))
|
||||
If Not McVersionListLoader.State = LoadState.Finished Then LoaderFolderRun(McVersionListLoader, PathMcFolder, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\", WaitForExit:=True)
|
||||
If Not McVersionList.Any() OrElse McVersionList.First.Value(0).Logo.Contains("RedstoneBlock") Then
|
||||
Version = Nothing
|
||||
@@ -619,7 +636,7 @@ Finish:
|
||||
Log("[Minecraft] 启动按钮:正在加载 Minecraft 版本")
|
||||
FrmLaunchLeft.BtnLaunch.Text = "正在加载"
|
||||
FrmLaunchLeft.BtnLaunch.IsEnabled = False
|
||||
FrmLaunchLeft.LabVersion.Text = "正在加载版本列表,请稍候"
|
||||
FrmLaunchLeft.LabVersion.Text = "正在加载中,请稍候"
|
||||
FrmLaunchLeft.BtnVersion.IsEnabled = False
|
||||
FrmLaunchLeft.BtnMore.Visibility = Visibility.Collapsed
|
||||
Case 1
|
||||
|
||||
@@ -27,15 +27,16 @@
|
||||
''' 刷新自定义主页。
|
||||
''' </summary>
|
||||
Private Sub Refresh() Handles Me.Loaded
|
||||
RunInNewThread(Sub()
|
||||
Try
|
||||
SyncLock RefreshLock
|
||||
RefreshReal()
|
||||
End SyncLock
|
||||
Catch ex As Exception
|
||||
Log(ex, "加载 PCL 主页自定义信息失败", LogLevel.Msgbox)
|
||||
End Try
|
||||
End Sub, $"刷新自定义主页 #{GetUuid()}")
|
||||
RunInNewThread(
|
||||
Sub()
|
||||
Try
|
||||
SyncLock RefreshLock
|
||||
RefreshReal()
|
||||
End SyncLock
|
||||
Catch ex As Exception
|
||||
Log(ex, "加载 PCL 主页自定义信息失败", LogLevel.Msgbox)
|
||||
End Try
|
||||
End Sub, $"刷新自定义主页 #{GetUuid()}")
|
||||
End Sub
|
||||
Private Sub RefreshReal()
|
||||
Dim Content As String = ""
|
||||
@@ -155,7 +156,6 @@ Download:
|
||||
Else
|
||||
Log(ex, $"联网下载自定义主页失败({Address})")
|
||||
End If
|
||||
Address = ""
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -204,7 +204,7 @@ Download:
|
||||
End If
|
||||
Content = "<StackPanel xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"" xmlns:local=""clr-namespace:PCL;assembly=Plain Craft Launcher 2"">" & Content & "</StackPanel>"
|
||||
Content = HelpArgumentReplace(Content)
|
||||
Log($"[Page] 实例化:加载自定义主页 UI,最终内容长度:{Content.Count}")
|
||||
Log($"[Page] 实例化:加载自定义主页 UI 开始,最终内容长度:{Content.Count}")
|
||||
Try
|
||||
PanCustom.Children.Add(GetObjectFromXML(Content))
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
End Sub
|
||||
Private Sub Btn_Click(sender As Object, e As EventArgs) Handles BtnLink.Click
|
||||
If BtnLink.Content = "注册账号" Then
|
||||
OpenWebsite(If(McVersionCurrent Is Nothing, Setup.Get("VersionServerAuthRegister", Version:=McVersionCurrent), Setup.Get("CacheAuthServerRegister")))
|
||||
OpenWebsite(If(McVersionCurrent IsNot Nothing, Setup.Get("VersionServerAuthRegister", Version:=McVersionCurrent), Setup.Get("CacheAuthServerRegister")))
|
||||
Else
|
||||
Dim Website As String = If(McVersionCurrent Is Nothing, Setup.Get("VersionServerAuthRegister", Version:=McVersionCurrent), Setup.Get("CacheAuthServerRegister"))
|
||||
Dim Website As String = If(McVersionCurrent IsNot Nothing, Setup.Get("VersionServerAuthRegister", Version:=McVersionCurrent), Setup.Get("CacheAuthServerRegister"))
|
||||
OpenWebsite(Website.Replace("/auth/register", "/auth/forgot"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -39,14 +39,15 @@
|
||||
Public Shared Function GetLoginData() As McLoginMs
|
||||
If FrmLoginMs Is Nothing Then Return New McLoginMs With {.OAuthRefreshToken = Setup.Get("CacheMsOAuthRefresh"), .UserName = Setup.Get("CacheMsName")}
|
||||
Dim Result As McLoginMs = Nothing
|
||||
RunInUiWait(Sub()
|
||||
If FrmLoginMs.ComboAccounts.SelectedIndex = 0 Then
|
||||
Result = New McLoginMs
|
||||
Else
|
||||
Dim Item As MyListItem = FrmLoginMs.ComboAccounts.SelectedItem
|
||||
Result = New McLoginMs With {.OAuthRefreshToken = Item.Tag, .UserName = Item.Title}
|
||||
End If
|
||||
End Sub)
|
||||
RunInUiWait(
|
||||
Sub()
|
||||
If FrmLoginMs.ComboAccounts.SelectedIndex = 0 Then
|
||||
Result = New McLoginMs
|
||||
Else
|
||||
Dim Item As MyListItem = FrmLoginMs.ComboAccounts.SelectedItem
|
||||
Result = New McLoginMs With {.OAuthRefreshToken = Item.Tag, .UserName = Item.Title}
|
||||
End If
|
||||
End Sub)
|
||||
Return Result
|
||||
End Function
|
||||
''' <summary>
|
||||
|
||||
@@ -104,139 +104,312 @@
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="赞助者">
|
||||
<StackPanel Margin="25,40,10,20">
|
||||
<TextBlock HorizontalAlignment="Left" Text="以下是 2024 年 4 月的高级赞助者们!感谢各位对 PCL 和伟大的咕咕咕事业的支持!" Margin="0,0,25,5.5" TextTrimming="None" TextWrapping="WrapWithOverflow" />
|
||||
<TextBlock HorizontalAlignment="Left" Text="以下是 2024 年 5~6 月的高级赞助者们!感谢各位对 PCL 和伟大的咕咕咕事业的支持!" Margin="0,0,25,5.5" TextTrimming="None" TextWrapping="WrapWithOverflow" />
|
||||
<WrapPanel Margin="0,0,0,10">
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="道士师傅" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="狗群主群狗" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Alioth陳" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="shyzysa" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="死んだライオン" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="mc沙漠之狐隆帅" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="123456胡杨" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="香蕉风味" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="毛哥" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="leon" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="clnb" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="123" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="lihaoran0313" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="贵友" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="蒸福啦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="狐狸涩" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="皓垣Faraway" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="冷月溪影" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="狮青椒" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="多金的爸爸" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="陈师傅" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="王舒心" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Akn123" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Dfkeit" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="CloudLonngLee" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="别再错过月亮了" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="特别周冠宇" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="哈哈哈哈哈" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="江户川柯南" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="loner..?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="野比大豆" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="无心之举" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="林禊" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="??!" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Petrichor" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="一只可爱的frisk啊" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="luvFwt" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="厨师长" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="星輝月下゛" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="密早宪综籽" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="黑云月稀" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="星月球" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ADerAQi" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="van" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Eterfrusa" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="kpocc07" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="觉莫" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我是DGHSFG" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="lhw0616" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="2DGIRL" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="雨猫霖" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Grazie" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="鲲鹏roc" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="皮皮苏" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="哆啦哆啦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="serendipity" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="W-Qi" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="tenneidp" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="叢沄" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="jian_ke" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ZHypocrite" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="浑荀" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="yoo-ovo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="洛梓风anemo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="胡桃的狗" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="落灯花" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="涩图来一份" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="FSAH217" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="炽绪" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="JUBEYsl" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="阿祺27" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="江上数峰青" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ECHO" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="路易斯" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="别曹曹了" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Szy" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="长安常安" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="鲨鲨" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="对白拼拼凑凑" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="月下吃米糖" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小雨要" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="臻榛搸殝" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="GT" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="夜也" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="is步行街" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="狮心人面人" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小刀李" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="空染" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="歪歪的示波器" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="SYF" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="帝王尬笑" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="DarkKCat" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我将如闪电般归来" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TSLOLY" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="JackX" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="挽安" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="花衔镜" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="玄言" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="硫酸梅" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ムーの小雨" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="潘某" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="颐葭" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Vaincre_VV" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小明爱睡觉" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="YHLin" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="翁yy" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="午睡不爱睡觉" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="tanglin" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Quittskii" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="W2erty" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Chris_Dream" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="sanrenxin" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="BBK" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="京北的洋" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="喵木仔" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="abstudio" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="洛惜惜缘" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="熊心万花镜" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="tianguaren" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="bitlogi" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="彬彬爆" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="超爱小辣椒" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Kkigoo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="于书墨" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="御坂1354号" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="t7fihb8" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="44.5GB" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="寰宇第一激推希儿" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="拳打羽酱脚踢军师" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="戌亥ピカ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="乔巴诺" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LING-DIAN" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="你太迷人" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="夏目龙羽" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小烨爱吃尖椒鸡" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="七色的魔法死" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="沫世" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我的神a啊" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="转角" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="做强做盛.步步升高" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="火箭空降" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="嚯嚯嚯哈哈哈哈" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="醉梦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="zzyd" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="御影" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Xephyrs" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Sovtheia" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="CRANK" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="本太子的作业满天飞" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="超级无敌旋风小猪猪" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="泽希尔·S+" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="erliang_ya" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="明酱酱" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="玐煲粥" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="The_follow" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="王八" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="joker" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="north-cool" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="JJ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小石" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="XiaomQ928" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Fly with You!!" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="海上乘鲸客" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="miku" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小雯" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="woainad" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="wqaycm" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="白豆" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Alex" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="大地风暴" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="曾and田某人" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="栀玖夕夏" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小卌丯" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="旧言" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="?的不行 ?的难受" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ElliottZChan" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="沐子冷落" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="_Blessing" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="友酒歌" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="鲸以歌" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="花好月圆" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="n3v3r" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="七星灯" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Theia" />
|
||||
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="王富贵" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="久久" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="嗯哼?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="木沐" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="永久里" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小白狐" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Z." />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="芝惑鱼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MegnaAegwynn " />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="DJLD" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="曦月" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TylerDeng" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="1899年的提拉米苏" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="bzwm" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="GhaMZz" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="雪游" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="奇怪的大土豆" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Moonlight-池绾" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="fusocietyck" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="爬爬鸡" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="山千海千" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="氿离Yoi" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="如风沐烟" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="一条博子" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="m1679" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="snow" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="3瓶奶茶" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Elkanah_" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="孤默少言" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="也要拿出真本事" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="武彩鱼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="雷霆兴哥" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="EnsoNani" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Ann.Midnight" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="郁子恒是FW" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ZIHE_kk" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="文八" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="寂月星落" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Writer_DaMao" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="gwd233" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Sutvh" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="崔东山" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Botaiii" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="凛仙子D-" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MooFaH" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="嘿哈吼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="下山吃肉的兔子" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="warship" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="木落微雨" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="杨阳baby" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="白茶" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="路过一下的尘垒" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="counterea" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="雨中盛开的花朵" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="珊瑚宫心海" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="luner" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="时崎王罪丶" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Nicht" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="冰薇" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Archetto" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="蓝冰之刃" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Baguette" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="KenshenLove" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="风见翎" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="雷霆" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="[擦汗]" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="远东雪橇猫" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="安夏洛克" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="acac" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="瑞风" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="xiankeQAQ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="BDUCK" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="fuaglove" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="prprprrrpop" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="YOCE" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="忹." />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="夜青" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="橘糸侑You" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="薇克波顿" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="夂冬螽" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Colitary" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Harm_b10ck" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="乆月" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Kaoukala" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="墨染★希" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="松菀" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="疾驰火车" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="疾影烬" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Awfrlu+" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Lava_drop_" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="? *???* ?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Gwynsur" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="许淼淼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="waneng0807" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="安anLa" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MQDCB" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我dnmd" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="猫舍旁边有恶犬" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="yk" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Cik-z" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="胡桃不是桃丫" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="陌白" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="C418" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="醉梦仙露" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="Re.从零开始跟猪鲨鲨恋爱" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="玄?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="olwlm" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="XiaoLe_SH" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="龙大炮" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="陆阿藏" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="lo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="七夜英理" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="lizi" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="范德Fa" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="云自无心" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="尚可" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="回转命运" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="恶搞的人格" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="安安生生" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="蛋仔派对-小冷" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="间铃" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="瀧柳" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="IRasciblebh" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="15183318101" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LALALA" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="大香蕉" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Another0" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="丢天帝" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="魔法喵酱" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="wshilaoliu" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="PangDaHusky" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="qi_lu" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LetvGodyan" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Amo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="liang" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="baijillys" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="栗悟飯とカメハメ波" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="姜路扬" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LuluPipi" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Atuo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="泳圈鼬用攀瀑" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="EWD" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="孟然君" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="num61" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Elysia_mc" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Wehrmacht" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="野生的小乐子" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="星韵林" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="剁椒鱼头" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Jking" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="抖音搜索:清凉夏日一只瓜" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="HEARLEY" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="woaini_awa" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="龙天行" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="亦羽君" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="言十七" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="zzc" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="w?z?r?y" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="havoc" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="一条咸鱼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="大鸡翅膀" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="月语" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="BBQ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="糖糖" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="七月一" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="独角受" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="10000cituitui" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Television" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="......" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LONG11" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="OP仙人" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="陌音依矢—笠风" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="kinno_mc" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Avid" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="brimobe" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Momoki" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="徐小疯" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我爱龙猫!!!" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="233" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="礼尚往来" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="会吐槽的毛熊" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="耶梦加得" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="pumpkin" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Solaray3" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="m1a0w0" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="懿轩" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="圆圆xyz" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="EchoLong" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="光与影的对白" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="AptS:1547" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="中转站" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="情猫" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="胡桃Mahero" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Ew_o" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="叽里呱啦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MHNIO" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小洺" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="龙儿" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ccll48" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Ling7844" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="不会写网名的屑" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Aresposeidon1124" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="钻石Daiyamondo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="七月无风" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="YuTian" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="csleep" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小天使" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="墨水" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="阿耀" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="青绵kipilu" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="IWI_Margarita" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小林カンナ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TD-Clotys" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="哈先生" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="老潘" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="绝少" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="咸鱼汤鱼咸" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Celery" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="简称FV" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="飞翔的PUMA" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="123456。?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="heitong_shu" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Lan" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="sanjuou" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="芙芙" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="zyc11230170" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TOUHOULUO" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="在下雾切" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="exusiai2357" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="???" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="润煌Ricardo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="无风" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="缘花乐" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Willian" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="墨尘烟雨" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="加五九九五" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="白裘峪" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="加载中..." />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Стразар" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="夜语霖" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Wolfgang_233" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小螺浩" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="rtoe332" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="lliiooll" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="QFwushang" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="竹翼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="没差" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="用户13223" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="猫羽喵" />
|
||||
</WrapPanel>
|
||||
<Grid Height="35">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
Public Shared Sub CopyUniqueAddress() Handles BtnDonateCopy.Click
|
||||
ClipboardSet(UniqueAddress)
|
||||
End Sub
|
||||
Private Sub DonateCodeInput() Handles BtnDonateInput.Click
|
||||
Private Sub BtnDonateCodeInput_Click() Handles BtnDonateInput.Click
|
||||
DonateCodeInput()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -38,17 +38,21 @@
|
||||
CardName = "常规版本"
|
||||
Case McVersionCardType.API
|
||||
Dim IsForgeExists As Boolean = False
|
||||
Dim IsNeoForgeExists As Boolean = False
|
||||
Dim IsFabricExists As Boolean = False
|
||||
Dim IsLiteExists As Boolean = False
|
||||
For Each Version As McVersion In Card.Value
|
||||
If Version.Version.HasFabric Then IsFabricExists = True
|
||||
If Version.Version.HasLiteLoader Then IsLiteExists = True
|
||||
If Version.Version.HasForge Then IsForgeExists = True
|
||||
If Version.Version.HasNeoForge Then IsNeoForgeExists = True
|
||||
Next
|
||||
If If(IsLiteExists, 1, 0) + If(IsForgeExists, 1, 0) + If(IsFabricExists, 1, 0) > 1 Then
|
||||
If If(IsLiteExists, 1, 0) + If(IsForgeExists, 1, 0) + If(IsFabricExists, 1, 0) + If(IsNeoForgeExists, 1, 0) > 1 Then
|
||||
CardName = "可安装 Mod"
|
||||
ElseIf IsForgeExists Then
|
||||
CardName = "Forge 版本"
|
||||
ElseIf IsNeoForgeExists Then
|
||||
CardName = "NeoForge 版本"
|
||||
ElseIf IsLiteExists Then
|
||||
CardName = "LiteLoader 版本"
|
||||
Else
|
||||
@@ -210,8 +214,8 @@
|
||||
FrmMain.PageChange(FormMain.PageType.Download, FormMain.PageSubType.DownloadInstall)
|
||||
End Sub
|
||||
|
||||
'修改此代码时,同时修改 PageVersionOverall 中的代码
|
||||
Public Shared Sub DeleteVersion(Item As MyListItem, Version As McVersion)
|
||||
'修改此代码时,同时修改 PageVersionOverall 中的代码
|
||||
Try
|
||||
Dim IsShiftPressed As Boolean = My.Computer.Keyboard.ShiftKeyDown
|
||||
Dim IsHintIndie As Boolean = Version.State <> McVersionState.Error AndAlso Version.PathIndie <> PathMcFolder
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
{"VersionAdvanceRunWait", New SetupEntry(True, Source:=SetupSource.Version)},
|
||||
{"VersionRamType", New SetupEntry(2, Source:=SetupSource.Version)},
|
||||
{"VersionRamCustom", New SetupEntry(15, Source:=SetupSource.Version)},
|
||||
{"VersionRamOptimize", New SetupEntry(0, Source:=SetupSource.Version)},
|
||||
{"VersionArgumentTitle", New SetupEntry("", Source:=SetupSource.Version)},
|
||||
{"VersionArgumentInfo", New SetupEntry("", Source:=SetupSource.Version)},
|
||||
{"VersionArgumentIndie", New SetupEntry(-1, Source:=SetupSource.Version)},
|
||||
|
||||
@@ -206,10 +206,8 @@
|
||||
SliderRamCustom.MaxValue = Math.Floor((RamTotal - 1.5) / 0.5) + 12
|
||||
ElseIf RamTotal <= 16 Then
|
||||
SliderRamCustom.MaxValue = Math.Floor((RamTotal - 8) / 1) + 25
|
||||
ElseIf RamTotal <= 32 Then
|
||||
SliderRamCustom.MaxValue = Math.Floor((RamTotal - 16) / 2) + 33
|
||||
Else
|
||||
SliderRamCustom.MaxValue = Math.Min(Math.Floor((RamTotal - 32) / 4) + 41, 49)
|
||||
SliderRamCustom.MaxValue = Math.Min(Math.Floor((RamTotal - 16) / 2) + 33, 41)
|
||||
End If
|
||||
'设置文本
|
||||
LabRamGame.Text = If(RamGame = Math.Floor(RamGame), RamGame & ".0", RamGame) & " GB" &
|
||||
@@ -259,7 +257,6 @@
|
||||
End If
|
||||
If RamTextLeft <> Left Then
|
||||
RamTextLeft = Left
|
||||
'If AniControlEnabled = 0 Then
|
||||
Select Case Left
|
||||
Case 0
|
||||
AniStart({
|
||||
@@ -280,22 +277,6 @@
|
||||
AaOpacity(LabRamUsedTitle, 0.7 - LabRamUsedTitle.Opacity, 100)
|
||||
}, "SetupLaunch Ram TextLeft")
|
||||
End Select
|
||||
'Else
|
||||
' Select Case Left
|
||||
' Case 0
|
||||
' LabRamUsed.Opacity = 0
|
||||
' LabRamTotal.Opacity = 0
|
||||
' LabRamUsedTitle.Opacity = 0
|
||||
' Case 1
|
||||
' LabRamUsed.Opacity = 1
|
||||
' LabRamTotal.Opacity = 0
|
||||
' LabRamUsedTitle.Opacity = 0.7
|
||||
' Case 2
|
||||
' LabRamUsed.Opacity = 1
|
||||
' LabRamTotal.Opacity = 1
|
||||
' LabRamUsedTitle.Opacity = 0.7
|
||||
' End Select
|
||||
'End If
|
||||
End If
|
||||
'右侧
|
||||
Dim Right As Integer
|
||||
@@ -404,15 +385,14 @@ PreFin:
|
||||
RamGive = (Value - 12) * 0.5 + 1.5
|
||||
ElseIf Value <= 33 Then
|
||||
RamGive = (Value - 25) * 1 + 8
|
||||
ElseIf Value <= 41 Then
|
||||
RamGive = (Value - 33) * 2 + 16
|
||||
Else
|
||||
RamGive = (Value - 41) * 4 + 32
|
||||
RamGive = (Value - 33) * 2 + 16
|
||||
End If
|
||||
End If
|
||||
'若使用 32 位 Java,则限制为 1G
|
||||
If If(Is32BitJava, Not JavaIs64Bit(If(UseVersionJavaSetup, Version, Nothing))) Then RamGive = Math.Min(1, RamGive)
|
||||
Return RamGive
|
||||
'封顶 32G
|
||||
Return Math.Min(32, RamGive)
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
@@ -557,8 +537,8 @@ PreFin:
|
||||
Private Sub CheckArgumentRam_Change() Handles CheckArgumentRam.Change
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If Not CheckArgumentRam.Checked Then Return
|
||||
If MyMsgBox("内存优化耗时较长,这会拖慢游戏的启动过程,建议仅在电脑内存不充裕时开启此选项。" & vbCrLf &
|
||||
"如果你在使用机械硬盘,这还可能会导致一小段时间的严重卡顿。" &
|
||||
If MyMsgBox("内存优化会显著延长启动耗时,建议仅在内存不足时开启。" & vbCrLf &
|
||||
"如果你在使用机械硬盘,这还可能导致一小段时间的严重卡顿。" &
|
||||
If(IsAdmin(), "", $"{vbCrLf}{vbCrLf}每次启动游戏,PCL 都需要申请管理员权限以进行内存优化。{vbCrLf}若想自动授予权限,可以右键 PCL,打开 属性 → 兼容性 → 以管理员身份运行此程序。"),
|
||||
"提醒", "确定", "取消") = 2 Then
|
||||
CheckArgumentRam.Checked = False
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
'设置解锁
|
||||
If Not RadioLauncherTheme8.IsEnabled Then LabLauncherTheme8Copy.ToolTip = "累积赞助达到 ¥23.33 后,在爱发电私信发送【解锁码】以解锁。" & vbCrLf & "右键打开赞助页面,如果觉得 PCL 做得还不错就支持一下吧 =w=!"
|
||||
RadioLauncherTheme8.ToolTip = "累积赞助达到 ¥23.33 后,在爱发电私信发送【解锁码】以解锁"
|
||||
If Not RadioLauncherTheme9.IsEnabled Then LabLauncherTheme9Copy.ToolTip = "· 反馈一个 Bug,在 Issue 标记为 [已完成] 后回复 Issue 要求解锁(右键打开反馈页面)" & vbCrLf & "· 向帮助库提交 Pull Request,在龙猫合并后解锁"
|
||||
RadioLauncherTheme9.ToolTip = "· 反馈一个 Bug,在反馈标记为 [完成] 后回复 Issue 要求解锁" & vbCrLf & "· 向帮助库提交 Pull Request,在龙猫合并后解锁"
|
||||
If Not RadioLauncherTheme9.IsEnabled Then LabLauncherTheme9Copy.ToolTip = "· 反馈一个 Bug,在标记为 [完成] 后回复识别码要求解锁(右键打开反馈页面)" & vbCrLf & "· 提交一个 Pull Request,在合并后回复识别码要求解锁"
|
||||
RadioLauncherTheme9.ToolTip = "· 反馈一个 Bug,在标记为 [完成] 后回复识别码要求解锁" & vbCrLf & "· 提交一个 Pull Request,在合并后回复识别码要求解锁"
|
||||
'极客蓝的处理在 ThemeCheck 中
|
||||
|
||||
End Sub
|
||||
@@ -83,7 +83,11 @@
|
||||
MusicRefreshUI()
|
||||
|
||||
'主页
|
||||
ComboCustomPreset.SelectedIndex = Setup.Get("UiCustomPreset")
|
||||
Try
|
||||
ComboCustomPreset.SelectedIndex = Setup.Get("UiCustomPreset")
|
||||
Catch
|
||||
Setup.Reset("UiCustomPreset")
|
||||
End Try
|
||||
CType(FindName("RadioCustomType" & Setup.Load("UiCustomType")), MyRadioBox).Checked = True
|
||||
TextCustomNet.Text = Setup.Get("UiCustomNet")
|
||||
|
||||
@@ -360,27 +364,28 @@ Refresh:
|
||||
End Sub
|
||||
Private Sub BtnMusicClear_Click(sender As Object, e As EventArgs) Handles BtnMusicClear.Click
|
||||
If MyMsgBox("即将删除背景音乐文件夹中的所有文件。" & vbCrLf & "此操作不可撤销,是否确定?", "警告",, "取消", IsWarn:=True) = 1 Then
|
||||
RunInThread(Sub()
|
||||
Hint("正在删除背景音乐……")
|
||||
'停止播放音乐
|
||||
MusicNAudio = Nothing
|
||||
MusicWaitingList = New List(Of String)
|
||||
MusicAllList = New List(Of String)
|
||||
Thread.Sleep(200)
|
||||
'删除文件
|
||||
Try
|
||||
DeleteDirectory(Path & "PCL\Musics")
|
||||
Hint("背景音乐已删除!", HintType.Finish)
|
||||
Catch ex As Exception
|
||||
Log(ex, "删除背景音乐失败", LogLevel.Msgbox)
|
||||
End Try
|
||||
Try
|
||||
Directory.CreateDirectory(Path & "PCL\Musics")
|
||||
RunInUi(Sub() MusicRefreshPlay(False))
|
||||
Catch ex As Exception
|
||||
Log(ex, "重建背景音乐文件夹失败", LogLevel.Msgbox)
|
||||
End Try
|
||||
End Sub)
|
||||
RunInThread(
|
||||
Sub()
|
||||
Hint("正在删除背景音乐……")
|
||||
'停止播放音乐
|
||||
MusicNAudio = Nothing
|
||||
MusicWaitingList = New List(Of String)
|
||||
MusicAllList = New List(Of String)
|
||||
Thread.Sleep(200)
|
||||
'删除文件
|
||||
Try
|
||||
DeleteDirectory(Path & "PCL\Musics")
|
||||
Hint("背景音乐已删除!", HintType.Finish)
|
||||
Catch ex As Exception
|
||||
Log(ex, "删除背景音乐失败", LogLevel.Msgbox)
|
||||
End Try
|
||||
Try
|
||||
Directory.CreateDirectory(Path & "PCL\Musics")
|
||||
RunInUi(Sub() MusicRefreshPlay(False))
|
||||
Catch ex As Exception
|
||||
Log(ex, "重建背景音乐文件夹失败", LogLevel.Msgbox)
|
||||
End Try
|
||||
End Sub)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CheckMusicStart_Change() Handles CheckMusicStart.Change
|
||||
@@ -423,9 +428,9 @@ Refresh:
|
||||
RadioLauncherTheme5Gray.Opacity -= 0.23
|
||||
RadioLauncherTheme5.Opacity += 0.23
|
||||
AniStart({
|
||||
AaOpacity(RadioLauncherTheme5Gray, 1, 1000),
|
||||
AaOpacity(RadioLauncherTheme5, -1, 1000)
|
||||
}, "ThemeUnlock")
|
||||
AaOpacity(RadioLauncherTheme5Gray, 1, 1000),
|
||||
AaOpacity(RadioLauncherTheme5, -1, 1000)
|
||||
}, "ThemeUnlock")
|
||||
If RadioLauncherTheme5Gray.Opacity < 0.08 Then
|
||||
ThemeUnlock(5, UnlockHint:="隐藏主题 玄素黑 已解锁!")
|
||||
AniStop("ThemeUnlock")
|
||||
@@ -433,7 +438,7 @@ Refresh:
|
||||
End If
|
||||
End Sub
|
||||
Private Sub LabLauncherTheme11Click_MouseLeftButtonUp() Handles LabLauncherTheme11Click.MouseLeftButtonUp, RadioLauncherTheme11.MouseRightButtonUp
|
||||
If LabLauncherTheme11Click.Visibility = Visibility.Collapsed OrElse LabLauncherTheme11Click.ToolTip.ToString.Contains("点击") Then
|
||||
If LabLauncherTheme11Click.Visibility = Visibility.Collapsed OrElse If(LabLauncherTheme11Click.ToolTip, "").ToString.Contains("点击") Then
|
||||
If MyMsgBox(
|
||||
"1. 不爬取或攻击相关服务或网站,不盗取相关账号,没有谜题可以或需要以此来解决。" & vbCrLf &
|
||||
"2. 不得篡改或损毁相关公开信息,请尽量让它们保持原状。" & vbCrLf &
|
||||
@@ -664,18 +669,10 @@ Refresh:
|
||||
|
||||
'滑动条
|
||||
Private Sub SliderLoad()
|
||||
SliderMusicVolume.GetHintText = Function(Value As Integer)
|
||||
Return Math.Ceiling(Value * 0.1) & "%"
|
||||
End Function
|
||||
SliderLauncherOpacity.GetHintText = Function(Value As Integer)
|
||||
Return Math.Round(40 + Value * 0.1) & "%"
|
||||
End Function
|
||||
SliderLauncherHue.GetHintText = Function(Value As Integer)
|
||||
Return Value & "°"
|
||||
End Function
|
||||
SliderLauncherSat.GetHintText = Function(Value As Integer)
|
||||
Return Value & "%"
|
||||
End Function
|
||||
SliderMusicVolume.GetHintText = Function(v) Math.Ceiling(v * 0.1) & "%"
|
||||
SliderLauncherOpacity.GetHintText = Function(v) Math.Round(40 + v * 0.1) & "%"
|
||||
SliderLauncherHue.GetHintText = Function(v) v & "°"
|
||||
SliderLauncherSat.GetHintText = Function(v) v & "%"
|
||||
SliderLauncherDelta.GetHintText = Function(Value As Integer)
|
||||
If Value > 90 Then
|
||||
Return "+" & (Value - 90)
|
||||
@@ -694,12 +691,8 @@ Refresh:
|
||||
Return Value - 20
|
||||
End If
|
||||
End Function
|
||||
SliderBackgroundOpacity.GetHintText = Function(Value As Integer)
|
||||
Return Math.Round(Value * 0.1) & "%"
|
||||
End Function
|
||||
SliderBackgroundBlur.GetHintText = Function(Value As Integer)
|
||||
Return Value & " 像素"
|
||||
End Function
|
||||
SliderBackgroundOpacity.GetHintText = Function(v) Math.Round(v * 0.1) & "%"
|
||||
SliderBackgroundBlur.GetHintText = Function(v) v & " 像素"
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -607,8 +607,10 @@
|
||||
If ModEntry.Comp IsNot Nothing Then
|
||||
'跳转到 Mod 下载页面
|
||||
FrmMain.PageChange(New FormMain.PageStackData With {.Page = FormMain.PageType.CompDetail,
|
||||
.Additional = {ModEntry.Comp, New List(Of String), PageVersionLeft.Version.Version.McName,
|
||||
If(PageVersionLeft.Version.Version.HasForge, CompModLoaderType.Forge, If(PageVersionLeft.Version.Version.HasFabric, CompModLoaderType.Fabric, CompModLoaderType.Any))}})
|
||||
.Additional = {ModEntry.Comp, New List(Of String), PageVersionLeft.Version.Version.McName,
|
||||
If(PageVersionLeft.Version.Version.HasForge, CompModLoaderType.Forge,
|
||||
If(PageVersionLeft.Version.Version.HasNeoForge, CompModLoaderType.NeoForge,
|
||||
If(PageVersionLeft.Version.Version.HasFabric, CompModLoaderType.Fabric, CompModLoaderType.Any)))}})
|
||||
Else
|
||||
'获取信息
|
||||
Dim ContentLines As New List(Of String)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="4" Margin="0,0,0,9" HorizontalAlignment="Center" Text="该版本不可使用 Mod" FontSize="19" UseLayoutRounding="True" SnapsToDevicePixels="True" Foreground="{DynamicResource ColorBrush3}" />
|
||||
<Rectangle Grid.Row="1" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" Height="2" Fill="{DynamicResource ColorBrush3}" />
|
||||
<TextBlock Grid.Row="2" Grid.ColumnSpan="4" Margin="10,15,10,5" Text="你需要先安装 Forge 或 Fabric 等 Mod 加载器才能使用 Mod,请在下载页面重新安装这些版本。
如果你已经安装过了 Mod 加载器,那么你很可能选择了错误的版本,请点击版本选择按钮切换版本,并注意 Forge 在版本选择列表中的图标为铁砧,Fabric 的图标为丝绸。" TextWrapping="Wrap" />
|
||||
<TextBlock Grid.Row="2" Grid.ColumnSpan="4" Margin="10,15,10,5" Text="你需要先安装 Forge、Fabric 等 Mod 加载器才能使用 Mod,请在下载页面安装这些版本。
如果你已经安装过了 Mod 加载器,那么你很可能选择了错误的版本,请点击版本选择按钮切换版本。" TextWrapping="Wrap" />
|
||||
<local:MyButton Grid.Row="3" Grid.Column="1" Height="35" HorizontalAlignment="Center" x:Name="BtnDownload" MinWidth="140" Text="转到下载页面" Margin="10,10,10,0" Padding="13,0" ColorType="Highlight" />
|
||||
<local:MyButton Grid.Row="3" Grid.Column="2" Height="35" HorizontalAlignment="Center" x:Name="BtnVersion" MinWidth="140" Text="版本选择" Margin="10,10,10,0" Padding="13,0" />
|
||||
</Grid>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<local:MyComboBoxItem Content="红石灯(关)" Tag="pack://application:,,,/images/Blocks/RedstoneLampOff.png" />
|
||||
<local:MyComboBoxItem Content="鸡蛋" Tag="pack://application:,,,/images/Blocks/Egg.png" />
|
||||
<local:MyComboBoxItem Content="布料(Fabric)" Tag="pack://application:,,,/images/Blocks/Fabric.png" />
|
||||
<local:MyComboBoxItem Content="狐狸(NeoForge)" Tag="pack://application:,,,/images/Blocks/NeoForge.png" />
|
||||
</local:MyComboBox>
|
||||
<TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="分类" Margin="0,0,25,0" />
|
||||
<local:MyComboBox Grid.Column="1" Grid.Row="2" x:Name="ComboDisplayType">
|
||||
|
||||
@@ -127,6 +127,8 @@
|
||||
'重命名主文件夹
|
||||
My.Computer.FileSystem.RenameDirectory(OldPath, TempName)
|
||||
My.Computer.FileSystem.RenameDirectory(TempPath, NewName)
|
||||
'清理 ini 缓存
|
||||
IniClearCache(PageVersionLeft.Version.Path & "PCL\Setup.ini")
|
||||
'遍历重命名所有文件与文件夹
|
||||
For Each Entry As DirectoryInfo In New DirectoryInfo(NewPath).EnumerateDirectories
|
||||
If Not Entry.Name.Contains(OldName) Then Continue For
|
||||
@@ -292,16 +294,17 @@
|
||||
End SyncLock
|
||||
'启动
|
||||
Dim Loader As New LoaderCombo(Of String)(PageVersionLeft.Version.Name & " 文件补全", DlClientFix(PageVersionLeft.Version, True, AssetsIndexExistsBehaviour.AlwaysDownload, False))
|
||||
Loader.OnStateChanged = Sub()
|
||||
Select Case Loader.State
|
||||
Case LoadState.Finished
|
||||
Hint(Loader.Name & "成功!", HintType.Finish)
|
||||
Case LoadState.Failed
|
||||
Hint(Loader.Name & "失败:" & GetExceptionSummary(Loader.Error), HintType.Critical)
|
||||
Case LoadState.Aborted
|
||||
Hint(Loader.Name & "已取消!", HintType.Info)
|
||||
End Select
|
||||
End Sub
|
||||
Loader.OnStateChanged =
|
||||
Sub()
|
||||
Select Case Loader.State
|
||||
Case LoadState.Finished
|
||||
Hint(Loader.Name & "成功!", HintType.Finish)
|
||||
Case LoadState.Failed
|
||||
Hint(Loader.Name & "失败:" & GetExceptionSummary(Loader.Error), HintType.Critical)
|
||||
Case LoadState.Aborted
|
||||
Hint(Loader.Name & "已取消!", HintType.Info)
|
||||
End Select
|
||||
End Sub
|
||||
Loader.Start(PageVersionLeft.Version.Name)
|
||||
LoaderTaskbarAdd(Loader)
|
||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||
@@ -312,8 +315,8 @@
|
||||
End Sub
|
||||
|
||||
'删除版本
|
||||
'修改此代码时,同时修改 PageSelectRight 中的代码
|
||||
Private Sub BtnManageDelete_Click(sender As Object, e As EventArgs) Handles BtnManageDelete.Click
|
||||
'修改此代码时,同时修改 PageSelectRight 中的代码
|
||||
Try
|
||||
Dim IsShiftPressed As Boolean = My.Computer.Keyboard.ShiftKeyDown
|
||||
Dim IsHintIndie As Boolean = PageVersionLeft.Version.State <> McVersionState.Error AndAlso PageVersionLeft.Version.PathIndie <> PathMcFolder
|
||||
@@ -321,6 +324,7 @@
|
||||
If(IsHintIndie, vbCrLf & "由于该版本开启了版本隔离,删除版本时该版本对应的存档、资源包、Mod 等文件也将被一并删除!", ""),
|
||||
"版本删除确认", , "取消",, IsHintIndie OrElse IsShiftPressed)
|
||||
Case 1
|
||||
IniClearCache(PageVersionLeft.Version.Path & "PCL\Setup.ini")
|
||||
If IsShiftPressed Then
|
||||
DeleteDirectory(PageVersionLeft.Version.Path)
|
||||
Hint("版本 " & PageVersionLeft.Version.Name & " 已永久删除!", HintType.Finish)
|
||||
|
||||
@@ -77,6 +77,22 @@
|
||||
<local:MySlider Grid.Row="3" Grid.Column="1" IsEnabled="False" x:Name="SliderRamCustom" Tag="VersionRamCustom" MaxValue="49" Value="13" />
|
||||
<!--<local:MyTextBox Grid.Row="2" Grid.Column="3" Width="100" VerticalAlignment="Center" Margin="30,0,0,0" Text="2048 MB" />-->
|
||||
</Grid>
|
||||
<Grid Margin="0,5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Margin="0,6,30,0" Text="启动游戏前进行内存优化" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" />
|
||||
<local:MyComboBox x:Name="ComboRamOptimize" Margin="10,0,0,0" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="2" Tag="VersionRamOptimize">
|
||||
<local:MyComboBoxItem Content="使用全局设置" IsSelected="True" />
|
||||
<local:MyComboBoxItem Content="开启" />
|
||||
<local:MyComboBoxItem Content="关闭" />
|
||||
</local:MyComboBox>
|
||||
</Grid>
|
||||
<Grid x:Name="PanRamDisplay" Margin="0,11,2,0" SnapsToDevicePixels="True" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="ColumnRamUsed" Width="4.7*"/>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
'游戏内存
|
||||
CType(FindName("RadioRamType" & Setup.Load("VersionRamType", Version:=PageVersionLeft.Version)), MyRadioBox).Checked = True
|
||||
SliderRamCustom.Value = Setup.Get("VersionRamCustom", Version:=PageVersionLeft.Version)
|
||||
ComboRamOptimize.SelectedIndex = Setup.Get("VersionRamOptimize", Version:=PageVersionLeft.Version)
|
||||
|
||||
'服务器
|
||||
TextServerEnter.Text = Setup.Get("VersionServerEnter", Version:=PageVersionLeft.Version)
|
||||
@@ -95,6 +96,7 @@
|
||||
Setup.Set("VersionArgumentIndie", 0, Version:=PageVersionLeft.Version)
|
||||
Setup.Reset("VersionRamType", Version:=PageVersionLeft.Version)
|
||||
Setup.Reset("VersionRamCustom", Version:=PageVersionLeft.Version)
|
||||
Setup.Reset("VersionRamOptimize", Version:=PageVersionLeft.Version)
|
||||
Setup.Reset("VersionAdvanceJvm", Version:=PageVersionLeft.Version)
|
||||
Setup.Reset("VersionAdvanceGame", Version:=PageVersionLeft.Version)
|
||||
Setup.Reset("VersionAdvanceAssets", Version:=PageVersionLeft.Version)
|
||||
@@ -130,7 +132,7 @@
|
||||
Private Shared Sub SliderChange(sender As MySlider, e As Object) Handles SliderRamCustom.Change
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Value, Version:=PageVersionLeft.Version)
|
||||
End Sub
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboArgumentIndie.SelectionChanged
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboArgumentIndie.SelectionChanged, ComboRamOptimize.SelectionChanged
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex, Version:=PageVersionLeft.Version)
|
||||
End Sub
|
||||
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckAdvanceRunWait.Change, CheckAdvanceAssetsV2.Change, CheckAdvanceJava.Change
|
||||
@@ -163,10 +165,8 @@
|
||||
SliderRamCustom.MaxValue = Math.Floor((RamTotal - 1.5) / 0.5) + 12
|
||||
ElseIf RamTotal <= 16 Then
|
||||
SliderRamCustom.MaxValue = Math.Floor((RamTotal - 8) / 1) + 25
|
||||
ElseIf RamTotal <= 32 Then
|
||||
SliderRamCustom.MaxValue = Math.Floor((RamTotal - 16) / 2) + 33
|
||||
Else
|
||||
SliderRamCustom.MaxValue = Math.Min(Math.Floor((RamTotal - 32) / 4) + 41, 49)
|
||||
SliderRamCustom.MaxValue = Math.Min(Math.Floor((RamTotal - 16) / 2) + 33, 41)
|
||||
End If
|
||||
'设置文本
|
||||
LabRamGame.Text = If(RamGame = Math.Floor(RamGame), RamGame & ".0", RamGame) & " GB" &
|
||||
@@ -351,15 +351,14 @@ PreFin:
|
||||
RamGive = (Value - 12) * 0.5 + 1.5
|
||||
ElseIf Value <= 33 Then
|
||||
RamGive = (Value - 25) * 1 + 8
|
||||
ElseIf Value <= 41 Then
|
||||
RamGive = (Value - 33) * 2 + 16
|
||||
Else
|
||||
RamGive = (Value - 41) * 4 + 32
|
||||
RamGive = (Value - 33) * 2 + 16
|
||||
End If
|
||||
End If
|
||||
'若使用 32 位 Java,则限制为 1G
|
||||
If If(Is32BitJava, Not JavaIs64Bit(PageVersionLeft.Version)) Then RamGive = Math.Min(1, RamGive)
|
||||
Return RamGive
|
||||
'封顶 32G
|
||||
Return Math.Min(32, RamGive)
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
Reference in New Issue
Block a user