2.8.10
This commit is contained in:
@@ -72,9 +72,17 @@ Public Class Application
|
|||||||
Directory.CreateDirectory(PathAppdata)
|
Directory.CreateDirectory(PathAppdata)
|
||||||
'检测单例
|
'检测单例
|
||||||
#If Not DEBUG Then
|
#If Not DEBUG Then
|
||||||
|
Dim ShouldWaitForExit As Boolean = e.Args.Length > 0 AndAlso e.Args(0) = "--wait" '要求等待已有的 PCL 退出
|
||||||
|
Dim WaitRetryCount As Integer = 0
|
||||||
|
WaitRetry:
|
||||||
Dim WindowHwnd As IntPtr = FindWindow(Nothing, "Plain Craft Launcher ")
|
Dim WindowHwnd As IntPtr = FindWindow(Nothing, "Plain Craft Launcher ")
|
||||||
If WindowHwnd = IntPtr.Zero Then FindWindow(Nothing, "Plain Craft Launcher 2 ")
|
If WindowHwnd = IntPtr.Zero Then FindWindow(Nothing, "Plain Craft Launcher 2 ")
|
||||||
If WindowHwnd <> IntPtr.Zero Then
|
If WindowHwnd <> IntPtr.Zero Then
|
||||||
|
If ShouldWaitForExit AndAlso WaitRetryCount < 20 Then '至多等待 10 秒
|
||||||
|
WaitRetryCount += 1
|
||||||
|
Thread.Sleep(500)
|
||||||
|
GoTo WaitRetry
|
||||||
|
End If
|
||||||
'将已有的 PCL 窗口拖出来
|
'将已有的 PCL 窗口拖出来
|
||||||
ShowWindowToTop(WindowHwnd)
|
ShowWindowToTop(WindowHwnd)
|
||||||
'播放提示音并退出
|
'播放提示音并退出
|
||||||
@@ -162,7 +170,7 @@ Public Class Application
|
|||||||
ExceptionString.Contains(".NET Framework") OrElse ' “自动错误判断” 的结果分析
|
ExceptionString.Contains(".NET Framework") OrElse ' “自动错误判断” 的结果分析
|
||||||
ExceptionString.Contains("未能加载文件或程序集") Then
|
ExceptionString.Contains("未能加载文件或程序集") Then
|
||||||
OpenWebsite("https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net462-offline-installer")
|
OpenWebsite("https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net462-offline-installer")
|
||||||
MsgBox("你的 .NET Framework 版本过低或损坏,请在打开的网页中重新下载并安装 .NET Framework 4.6.2 后重试!", MsgBoxStyle.Information, "运行环境错误")
|
MsgBox("你的 .NET Framework 版本过低或损坏,请下载并重新安装 .NET Framework 4.6.2!", MsgBoxStyle.Information, "运行环境错误")
|
||||||
FormMain.EndProgramForce(Result.Cancel)
|
FormMain.EndProgramForce(Result.Cancel)
|
||||||
Else
|
Else
|
||||||
FeedbackInfo()
|
FeedbackInfo()
|
||||||
|
|||||||
@@ -293,26 +293,28 @@
|
|||||||
Public Const SwapedHeight As Integer = 40
|
Public Const SwapedHeight As Integer = 40
|
||||||
Private Sub MyCard_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonDown
|
Private Sub MyCard_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonDown
|
||||||
Dim Pos As Double = Mouse.GetPosition(Me).Y
|
Dim Pos As Double = Mouse.GetPosition(Me).Y
|
||||||
If Not IsSwaped AndAlso (IsNothing(SwapControl) OrElse Pos > SwapedHeight OrElse (Pos = 0 AndAlso Not IsMouseDirectlyOver)) Then Exit Sub '检测点击位置;或已经不在可视树上的误判
|
If Not IsSwaped AndAlso
|
||||||
|
(SwapControl Is Nothing OrElse Pos > SwapedHeight OrElse (Pos = 0 AndAlso Not IsMouseDirectlyOver)) Then Exit Sub '检测点击位置;或已经不在可视树上的误判
|
||||||
IsMouseDown = True
|
IsMouseDown = True
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub MyCard_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonUp
|
Private Sub MyCard_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonUp
|
||||||
If IsMouseDown Then
|
If Not IsMouseDown Then Return
|
||||||
|
IsMouseDown = False
|
||||||
|
|
||||||
|
Dim Pos As Double = Mouse.GetPosition(Me).Y
|
||||||
|
If Not IsSwaped AndAlso
|
||||||
|
(SwapControl Is Nothing OrElse Pos > SwapedHeight OrElse (Pos = 0 AndAlso Not IsMouseDirectlyOver)) Then Exit Sub '检测点击位置;或已经不在可视树上的误判
|
||||||
|
|
||||||
|
Dim ee = New RouteEventArgs(True)
|
||||||
|
RaiseEvent PreviewSwap(Me, ee)
|
||||||
|
If ee.Handled Then
|
||||||
IsMouseDown = False
|
IsMouseDown = False
|
||||||
Dim Pos As Double = Mouse.GetPosition(Me).Y
|
Return
|
||||||
If Not IsSwaped AndAlso (IsNothing(SwapControl) OrElse Pos > SwapedHeight OrElse (Pos = 0 AndAlso Not IsMouseDirectlyOver)) Then Exit Sub '检测点击位置;或已经不在可视树上的误判
|
|
||||||
|
|
||||||
Dim ee = New RouteEventArgs(True)
|
|
||||||
RaiseEvent PreviewSwap(Me, ee)
|
|
||||||
If ee.Handled Then
|
|
||||||
IsMouseDown = False
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
IsSwaped = Not IsSwaped
|
|
||||||
Log("[Control] " & If(IsSwaped, "折叠卡片", "展开卡片") & If(Title Is Nothing, "", ":" & Title))
|
|
||||||
RaiseEvent Swap(Me, ee)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
IsSwaped = Not IsSwaped
|
||||||
|
Log("[Control] " & If(IsSwaped, "折叠卡片", "展开卡片") & If(Title Is Nothing, "", ":" & Title))
|
||||||
|
RaiseEvent Swap(Me, ee)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub MyCard_MouseLeave_Swap(sender As Object, e As MouseEventArgs) Handles Me.MouseLeave
|
Private Sub MyCard_MouseLeave_Swap(sender As Object, e As MouseEventArgs) Handles Me.MouseLeave
|
||||||
IsMouseDown = False
|
IsMouseDown = False
|
||||||
|
|||||||
@@ -14,13 +14,14 @@
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Property EnableCache As Boolean
|
Public Property EnableCache As Boolean
|
||||||
Get
|
Get
|
||||||
Return _EnableCache
|
Return GetValue(EnableCacheProperty)
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
_EnableCache = value
|
SetValue(EnableCacheProperty, value)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private _EnableCache As Boolean = True
|
Public Shared Shadows ReadOnly EnableCacheProperty As DependencyProperty = DependencyProperty.Register(
|
||||||
|
"EnableCache", GetType(Boolean), GetType(MyImage), New PropertyMetadata(True))
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 与 Image 的 Source 类似。
|
''' 与 Image 的 Source 类似。
|
||||||
@@ -114,9 +115,10 @@
|
|||||||
Dim Retried As Boolean = False
|
Dim Retried As Boolean = False
|
||||||
Dim TempPath As String = GetTempPath(Url)
|
Dim TempPath As String = GetTempPath(Url)
|
||||||
Dim TempFile As New FileInfo(TempPath)
|
Dim TempFile As New FileInfo(TempPath)
|
||||||
|
Dim EnableCache As Boolean = Me.EnableCache
|
||||||
If EnableCache AndAlso TempFile.Exists Then
|
If EnableCache AndAlso TempFile.Exists Then
|
||||||
ActualSource = TempPath
|
ActualSource = TempPath
|
||||||
If (Date.Now - TempFile.CreationTime) < FileCacheExpiredTime Then Exit Sub '无需刷新缓存
|
If (Date.Now - TempFile.LastWriteTime) < FileCacheExpiredTime Then Exit Sub '无需刷新缓存
|
||||||
End If
|
End If
|
||||||
RunInNewThread(
|
RunInNewThread(
|
||||||
Sub()
|
Sub()
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
||||||
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
||||||
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanText" Margin="0,0,0,7" Padding="7,0,15,0"
|
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanText" Margin="0,0,0,7" Padding="7,0,15,0"
|
||||||
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMuity="0.7">
|
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMult="0.7">
|
||||||
<TextBlock VerticalAlignment="Top" TextTrimming="None" TextWrapping="Wrap" Name="LabText" FontSize="15" LineHeight="18"
|
<TextBlock VerticalAlignment="Top" TextTrimming="None" TextWrapping="Wrap" Name="LabText" FontSize="15" LineHeight="18"
|
||||||
Foreground="#FF5C5C5C" FontWeight="Normal" Padding="1" />
|
Foreground="#FF5C5C5C" FontWeight="Normal" Padding="1" />
|
||||||
</my:MyScrollViewer>
|
</my:MyScrollViewer>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
||||||
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
||||||
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanCaption" Margin="0,0,0,17" Padding="7,0,15,0"
|
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanCaption" Margin="0,0,0,17" Padding="7,0,15,0"
|
||||||
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMuity="0.7">
|
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMult="0.7">
|
||||||
<StackPanel x:Name="PanSelection" Orientation="Vertical" />
|
<StackPanel x:Name="PanSelection" Orientation="Vertical" />
|
||||||
</my:MyScrollViewer>
|
</my:MyScrollViewer>
|
||||||
<StackPanel Grid.Row="4" Name="PanBtn" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="150,0,8,0" Orientation="Horizontal">
|
<StackPanel Grid.Row="4" Name="PanBtn" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="150,0,8,0" Orientation="Horizontal">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
||||||
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
||||||
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanCaption" Margin="0,0,0,17" Padding="7,0,15,0"
|
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanCaption" Margin="0,0,0,17" Padding="7,0,15,0"
|
||||||
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMuity="0.7">
|
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMult="0.7">
|
||||||
<TextBlock VerticalAlignment="Top" TextTrimming="None" TextWrapping="Wrap" Name="LabCaption" FontSize="15" LineHeight="18"
|
<TextBlock VerticalAlignment="Top" TextTrimming="None" TextWrapping="Wrap" Name="LabCaption" FontSize="15" LineHeight="18"
|
||||||
Foreground="#FF5C5C5C" FontWeight="Normal" Padding="1" />
|
Foreground="#FF5C5C5C" FontWeight="Normal" Padding="1" />
|
||||||
</my:MyScrollViewer>
|
</my:MyScrollViewer>
|
||||||
|
|||||||
@@ -104,3 +104,7 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Public Interface IRefreshable
|
||||||
|
Sub Refresh()
|
||||||
|
End Interface
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
Public Class MyScrollViewer
|
Public Class MyScrollViewer
|
||||||
Inherits ScrollViewer
|
Inherits ScrollViewer
|
||||||
|
|
||||||
Public Property DeltaMuity As Double = 1
|
Public Property DeltaMult As Double = 1
|
||||||
|
|
||||||
|
|
||||||
Private RealOffset As Double
|
Private RealOffset As Double
|
||||||
@@ -25,10 +25,12 @@
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub PerformVerticalOffsetDelta(Delta As Double)
|
Public Sub PerformVerticalOffsetDelta(Delta As Double)
|
||||||
AniStart(AaDouble(Sub(AnimDelta As Double)
|
AniStart(
|
||||||
RealOffset = MathClamp(RealOffset + AnimDelta, 0, ExtentHeight - ActualHeight)
|
AaDouble(
|
||||||
ScrollToVerticalOffset(RealOffset)
|
Sub(AnimDelta As Double)
|
||||||
End Sub, Delta * DeltaMuity, 300,, New AniEaseOutFluent(6)))
|
RealOffset = MathClamp(RealOffset + AnimDelta, 0, ExtentHeight - ActualHeight)
|
||||||
|
ScrollToVerticalOffset(RealOffset)
|
||||||
|
End Sub, Delta * DeltaMult, 300,, New AniEaseOutFluent(6)))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub MyScrollViewer_ScrollChanged(sender As Object, e As ScrollChangedEventArgs) Handles Me.ScrollChanged
|
Private Sub MyScrollViewer_ScrollChanged(sender As Object, e As ScrollChangedEventArgs) Handles Me.ScrollChanged
|
||||||
RealOffset = VerticalOffset
|
RealOffset = VerticalOffset
|
||||||
|
|||||||
@@ -10,6 +10,13 @@ Public Class FormMain
|
|||||||
Dim FeatureList As New List(Of KeyValuePair(Of Integer, String))
|
Dim FeatureList As New List(Of KeyValuePair(Of Integer, String))
|
||||||
'统计更新日志条目
|
'统计更新日志条目
|
||||||
#If BETA Then
|
#If BETA Then
|
||||||
|
If LastVersion < 342 Then 'Release 2.8.9
|
||||||
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "支持下载原版服务端"))
|
||||||
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "本地 Mod 的标题支持选择显示 Mod 原始文件名"))
|
||||||
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(1, "修复搜索后启用/禁用 Mod 时出错的 Bug"))
|
||||||
|
FeatureCount += 17
|
||||||
|
BugCount += 13
|
||||||
|
End If
|
||||||
If LastVersion < 340 Then 'Release 2.8.8
|
If LastVersion < 340 Then 'Release 2.8.8
|
||||||
If LastVersion = 338 Then FeatureList.Add(New KeyValuePair(Of Integer, String)(1, "修复数个与新正版登录相关的严重 Bug"))
|
If LastVersion = 338 Then FeatureList.Add(New KeyValuePair(Of Integer, String)(1, "修复数个与新正版登录相关的严重 Bug"))
|
||||||
FeatureCount += 3
|
FeatureCount += 3
|
||||||
@@ -75,6 +82,13 @@ Public Class FormMain
|
|||||||
'3:BUG+ IMP* FEAT-
|
'3:BUG+ IMP* FEAT-
|
||||||
'2:BUG* IMP-
|
'2:BUG* IMP-
|
||||||
'1:BUG-
|
'1:BUG-
|
||||||
|
If LastVersion < 343 Then 'Snapshot 2.8.10
|
||||||
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "Mod 详情页面会按 Mod 加载器分类卡片"))
|
||||||
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "支持安装同时包含 modpack 文件和启动器的懒人包"))
|
||||||
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(1, "优化整合包导入流程"))
|
||||||
|
FeatureCount += 20
|
||||||
|
BugCount += 16
|
||||||
|
End If
|
||||||
If LastVersion < 341 Then 'Snapshot 2.8.9
|
If LastVersion < 341 Then 'Snapshot 2.8.9
|
||||||
FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "支持下载原版服务端"))
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "支持下载原版服务端"))
|
||||||
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "本地 Mod 的标题支持选择显示 Mod 原始文件名"))
|
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "本地 Mod 的标题支持选择显示 Mod 原始文件名"))
|
||||||
@@ -227,7 +241,9 @@ Public Class FormMain
|
|||||||
If Not IsNothing(FrmLaunchLeft.Parent) Then FrmLaunchLeft.SetValue(ContentPresenter.ContentProperty, Nothing)
|
If Not IsNothing(FrmLaunchLeft.Parent) Then FrmLaunchLeft.SetValue(ContentPresenter.ContentProperty, Nothing)
|
||||||
If Not IsNothing(FrmLaunchRight.Parent) Then FrmLaunchRight.SetValue(ContentPresenter.ContentProperty, Nothing)
|
If Not IsNothing(FrmLaunchRight.Parent) Then FrmLaunchRight.SetValue(ContentPresenter.ContentProperty, Nothing)
|
||||||
PanMainLeft.Child = FrmLaunchLeft
|
PanMainLeft.Child = FrmLaunchLeft
|
||||||
|
PageLeft = FrmLaunchLeft
|
||||||
PanMainRight.Child = FrmLaunchRight
|
PanMainRight.Child = FrmLaunchRight
|
||||||
|
PageRight = FrmLaunchRight
|
||||||
FrmLaunchRight.PageState = MyPageRight.PageStates.ContentStay
|
FrmLaunchRight.PageState = MyPageRight.PageStates.ContentStay
|
||||||
'模式提醒
|
'模式提醒
|
||||||
#If DEBUG Then
|
#If DEBUG Then
|
||||||
@@ -599,6 +615,12 @@ Public Class FormMain
|
|||||||
PageSetupUI.HiddenRefresh()
|
PageSetupUI.HiddenRefresh()
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
'按 F5 刷新页面
|
||||||
|
If e.Key = Key.F5 Then
|
||||||
|
If TypeOf PageLeft Is IRefreshable Then CType(PageLeft, IRefreshable).Refresh()
|
||||||
|
If TypeOf PageRight Is IRefreshable Then CType(PageRight, IRefreshable).Refresh()
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
'调用启动游戏
|
'调用启动游戏
|
||||||
If e.Key = Key.Enter AndAlso PageCurrent = FormMain.PageType.Launch Then
|
If e.Key = Key.Enter AndAlso PageCurrent = FormMain.PageType.Launch Then
|
||||||
If IsAprilEnabled AndAlso Not IsAprilGiveup Then
|
If IsAprilEnabled AndAlso Not IsAprilGiveup Then
|
||||||
@@ -736,14 +758,14 @@ Public Class FormMain
|
|||||||
If FilePathList.Count > 1 Then
|
If FilePathList.Count > 1 Then
|
||||||
'必须要求全部为 jar 文件
|
'必须要求全部为 jar 文件
|
||||||
For Each File In FilePathList
|
For Each File In FilePathList
|
||||||
If Not {"jar", "litemod", "disabled", "old"}.Contains(File.After(".").ToLower) Then
|
If Not {"jar", "litemod", "disabled", "old"}.Contains(File.AfterLast(".").ToLower) Then
|
||||||
Hint("一次请只拖入一个文件!", HintType.Critical)
|
Hint("一次请只拖入一个文件!", HintType.Critical)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
'自定义主页
|
'自定义主页
|
||||||
Dim Extension As String = FilePath.After(".").ToLower
|
Dim Extension As String = FilePath.AfterLast(".").ToLower
|
||||||
If Extension = "xaml" Then
|
If Extension = "xaml" Then
|
||||||
Log("[System] 文件后缀为 XAML,作为自定义主页加载")
|
Log("[System] 文件后缀为 XAML,作为自定义主页加载")
|
||||||
If File.Exists(Path & "PCL\Custom.xaml") Then
|
If File.Exists(Path & "PCL\Custom.xaml") Then
|
||||||
@@ -763,6 +785,11 @@ Public Class FormMain
|
|||||||
'Mod 安装
|
'Mod 安装
|
||||||
If {"jar", "litemod", "disabled", "old"}.Any(Function(t) t = Extension) Then
|
If {"jar", "litemod", "disabled", "old"}.Any(Function(t) t = Extension) Then
|
||||||
Log("[System] 文件为 jar/litemod 格式,尝试作为 Mod 安装")
|
Log("[System] 文件为 jar/litemod 格式,尝试作为 Mod 安装")
|
||||||
|
'检查回收站:回收站中的文件有错误的文件名
|
||||||
|
If FilePathList.First.Contains(":\$RECYCLE.BIN\") Then
|
||||||
|
Hint("请先将文件从回收站还原,再拖入 PCL!", HintType.Critical)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
'获取并检查目标版本
|
'获取并检查目标版本
|
||||||
Dim TargetVersion As McVersion = McVersionCurrent
|
Dim TargetVersion As McVersion = McVersionCurrent
|
||||||
If PageCurrent = PageType.VersionSetup Then TargetVersion = PageVersionLeft.Version
|
If PageCurrent = PageType.VersionSetup Then TargetVersion = PageVersionLeft.Version
|
||||||
@@ -799,7 +826,14 @@ Install:
|
|||||||
'安装整合包
|
'安装整合包
|
||||||
If {"zip", "rar", "mrpack"}.Any(Function(t) t = Extension) Then '部分压缩包是 zip 格式但后缀为 rar,总之试一试
|
If {"zip", "rar", "mrpack"}.Any(Function(t) t = Extension) Then '部分压缩包是 zip 格式但后缀为 rar,总之试一试
|
||||||
Log("[System] 文件为压缩包,尝试作为整合包安装")
|
Log("[System] 文件为压缩包,尝试作为整合包安装")
|
||||||
If ModpackInstall(FilePath, ShowHint:=False) IsNot Nothing Then Exit Sub
|
Try
|
||||||
|
ModpackInstall(FilePath)
|
||||||
|
Exit Sub
|
||||||
|
Catch ex As CancelledException
|
||||||
|
Exit Sub '用户主动取消
|
||||||
|
Catch ex As Exception
|
||||||
|
'安装失败,继续往后尝试
|
||||||
|
End Try
|
||||||
End If
|
End If
|
||||||
'RAR 处理
|
'RAR 处理
|
||||||
If Extension = "rar" Then
|
If Extension = "rar" Then
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ Public Module ModBase
|
|||||||
#Region "声明"
|
#Region "声明"
|
||||||
|
|
||||||
'下列版本信息由更新器自动修改
|
'下列版本信息由更新器自动修改
|
||||||
Public Const VersionBaseName As String = "2.8.9" '不含分支前缀的显示用版本名
|
Public Const VersionBaseName As String = "2.8.10" '不含分支前缀的显示用版本名
|
||||||
Public Const VersionStandardCode As String = "2.8.9." & VersionBranchCode '标准格式的四段式版本号
|
Public Const VersionStandardCode As String = "2.8.10." & VersionBranchCode '标准格式的四段式版本号
|
||||||
Public Const CommitHash As String = "" 'Commit Hash,由 GitHub Workflow 自动替换
|
Public Const CommitHash As String = "" 'Commit Hash,由 GitHub Workflow 自动替换
|
||||||
#If BETA Then
|
#If BETA Then
|
||||||
Public Const VersionCode As Integer = 340 'Release
|
Public Const VersionCode As Integer = 342 'Release
|
||||||
#Else
|
#Else
|
||||||
Public Const VersionCode As Integer = 341 'Snapshot
|
Public Const VersionCode As Integer = 343 'Snapshot
|
||||||
#End If
|
#End If
|
||||||
'自动生成的版本信息
|
'自动生成的版本信息
|
||||||
Public Const VersionDisplayName As String = VersionBranchName & " " & VersionBaseName
|
Public Const VersionDisplayName As String = VersionBranchName & " " & VersionBaseName
|
||||||
@@ -990,7 +990,7 @@ Public Module ModBase
|
|||||||
End Using
|
End Using
|
||||||
End Function
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 弹出选取文件夹对话框并且要求选取文件夹。如果没有选择就返回空字符串。
|
''' 弹出选取文件夹对话框并且要求选取文件夹,以 \ 结尾。如果没有选择就返回空字符串。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Function SelectFolder(Optional Title As String = "选择文件夹") As String
|
Public Function SelectFolder(Optional Title As String = "选择文件夹") As String
|
||||||
Dim folderDialog As New Ookii.Dialogs.Wpf.VistaFolderBrowserDialog With {.ShowNewFolderButton = True, .RootFolder = Environment.SpecialFolder.Desktop, .Description = Title, .UseDescriptionForTitle = True}
|
Dim folderDialog As New Ookii.Dialogs.Wpf.VistaFolderBrowserDialog With {.ShowNewFolderButton = True, .RootFolder = Environment.SpecialFolder.Desktop, .Description = Title, .UseDescriptionForTitle = True}
|
||||||
@@ -1207,7 +1207,8 @@ Re:
|
|||||||
''' 尝试根据后缀名判断文件种类并解压文件,支持 gz 与 zip,会尝试将 jar 以 zip 方式解压。
|
''' 尝试根据后缀名判断文件种类并解压文件,支持 gz 与 zip,会尝试将 jar 以 zip 方式解压。
|
||||||
''' 会尝试创建,但不会清空目标文件夹。
|
''' 会尝试创建,但不会清空目标文件夹。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub ExtractFile(CompressFilePath As String, DestDirectory As String, Optional Encode As Encoding = Nothing)
|
Public Sub ExtractFile(CompressFilePath As String, DestDirectory As String, Optional Encode As Encoding = Nothing,
|
||||||
|
Optional ProgressIncrementHandler As Action(Of Double) = Nothing)
|
||||||
Directory.CreateDirectory(DestDirectory)
|
Directory.CreateDirectory(DestDirectory)
|
||||||
If CompressFilePath.EndsWithF(".gz", True) Then
|
If CompressFilePath.EndsWithF(".gz", True) Then
|
||||||
'以 gz 方式解压
|
'以 gz 方式解压
|
||||||
@@ -1223,7 +1224,9 @@ Re:
|
|||||||
Else
|
Else
|
||||||
'以 zip 方式解压
|
'以 zip 方式解压
|
||||||
Using Archive = ZipFile.Open(CompressFilePath, ZipArchiveMode.Read, If(Encode, Encoding.GetEncoding("GB18030")))
|
Using Archive = ZipFile.Open(CompressFilePath, ZipArchiveMode.Read, If(Encode, Encoding.GetEncoding("GB18030")))
|
||||||
|
Dim TotalCount As Integer = Archive.Entries.Count
|
||||||
For Each Entry As ZipArchiveEntry In Archive.Entries
|
For Each Entry As ZipArchiveEntry In Archive.Entries
|
||||||
|
If ProgressIncrementHandler IsNot Nothing Then ProgressIncrementHandler(1 / TotalCount)
|
||||||
Dim DestinationPath As String = IO.Path.Combine(DestDirectory, Entry.FullName)
|
Dim DestinationPath As String = IO.Path.Combine(DestDirectory, Entry.FullName)
|
||||||
If DestinationPath.EndsWithF("\") OrElse DestinationPath.EndsWithF("/") Then
|
If DestinationPath.EndsWithF("\") OrElse DestinationPath.EndsWithF("/") Then
|
||||||
Continue For '不创建空文件夹
|
Continue For '不创建空文件夹
|
||||||
@@ -1293,13 +1296,16 @@ RetryDir:
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 复制文件夹,失败会抛出异常。
|
''' 复制文件夹,失败会抛出异常。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub CopyDirectory(FromPath As String, ToPath As String)
|
Public Sub CopyDirectory(FromPath As String, ToPath As String, Optional ProgressIncrementHandler As Action(Of Double) = Nothing)
|
||||||
FromPath = FromPath.Replace("/", "\")
|
FromPath = FromPath.Replace("/", "\")
|
||||||
If Not FromPath.EndsWithF("\") Then FromPath &= "\"
|
If Not FromPath.EndsWithF("\") Then FromPath &= "\"
|
||||||
ToPath = ToPath.Replace("/", "\")
|
ToPath = ToPath.Replace("/", "\")
|
||||||
If Not ToPath.EndsWithF("\") Then ToPath &= "\"
|
If Not ToPath.EndsWithF("\") Then ToPath &= "\"
|
||||||
For Each File In EnumerateFiles(FromPath)
|
Dim AllFiles = EnumerateFiles(FromPath).ToList
|
||||||
|
Dim FileCount As Integer = AllFiles.Count
|
||||||
|
For Each File In AllFiles
|
||||||
CopyFile(File.FullName, File.FullName.Replace(FromPath, ToPath))
|
CopyFile(File.FullName, File.FullName.Replace(FromPath, ToPath))
|
||||||
|
If ProgressIncrementHandler IsNot Nothing Then ProgressIncrementHandler(1 / FileCount)
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -1552,10 +1558,10 @@ RetryDir:
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 获取在子字符串之前的部分。
|
''' 获取在子字符串第一次出现之前的部分,例如对 2024/11/08 拆切 / 会得到 2024。
|
||||||
''' 会裁切尽可能多的内容,但如果未找到子字符串则不裁切。
|
''' 如果未找到子字符串则不裁切。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
<Extension> Public Function Before(Str As String, Text As String, Optional IgnoreCase As Boolean = False) As String
|
<Extension> Public Function BeforeFirst(Str As String, Text As String, Optional IgnoreCase As Boolean = False) As String
|
||||||
Dim Pos As Integer = If(String.IsNullOrEmpty(Text), -1, Str.IndexOfF(Text, IgnoreCase))
|
Dim Pos As Integer = If(String.IsNullOrEmpty(Text), -1, Str.IndexOfF(Text, IgnoreCase))
|
||||||
If Pos >= 0 Then
|
If Pos >= 0 Then
|
||||||
Return Str.Substring(0, Pos)
|
Return Str.Substring(0, Pos)
|
||||||
@@ -1564,10 +1570,34 @@ RetryDir:
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 获取在子字符串之后的部分。
|
''' 获取在子字符串最后一次出现之前的部分,例如对 2024/11/08 拆切 / 会得到 2024/11。
|
||||||
''' 会裁切尽可能多的内容,但如果未找到子字符串则不裁切。
|
''' 如果未找到子字符串则不裁切。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
<Extension> Public Function After(Str As String, Text As String, Optional IgnoreCase As Boolean = False) As String
|
<Extension> Public Function BeforeLast(Str As String, Text As String, Optional IgnoreCase As Boolean = False) As String
|
||||||
|
Dim Pos As Integer = If(String.IsNullOrEmpty(Text), -1, Str.LastIndexOfF(Text, IgnoreCase))
|
||||||
|
If Pos >= 0 Then
|
||||||
|
Return Str.Substring(0, Pos)
|
||||||
|
Else
|
||||||
|
Return Str
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
''' <summary>
|
||||||
|
''' 获取在子字符串第一次出现之后的部分,例如对 2024/11/08 拆切 / 会得到 11/08。
|
||||||
|
''' 如果未找到子字符串则不裁切。
|
||||||
|
''' </summary>
|
||||||
|
<Extension> Public Function AfterFirst(Str As String, Text As String, Optional IgnoreCase As Boolean = False) As String
|
||||||
|
Dim Pos As Integer = If(String.IsNullOrEmpty(Text), -1, Str.IndexOfF(Text, IgnoreCase))
|
||||||
|
If Pos >= 0 Then
|
||||||
|
Return Str.Substring(Pos + Text.Length)
|
||||||
|
Else
|
||||||
|
Return Str
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
''' <summary>
|
||||||
|
''' 获取在子字符串最后一次出现之后的部分,例如对 2024/11/08 拆切 / 会得到 08。
|
||||||
|
''' 如果未找到子字符串则不裁切。
|
||||||
|
''' </summary>
|
||||||
|
<Extension> Public Function AfterLast(Str As String, Text As String, Optional IgnoreCase As Boolean = False) As String
|
||||||
Dim Pos As Integer = If(String.IsNullOrEmpty(Text), -1, Str.LastIndexOfF(Text, IgnoreCase))
|
Dim Pos As Integer = If(String.IsNullOrEmpty(Text), -1, Str.LastIndexOfF(Text, IgnoreCase))
|
||||||
If Pos >= 0 Then
|
If Pos >= 0 Then
|
||||||
Return Str.Substring(Pos + Text.Length)
|
Return Str.Substring(Pos + Text.Length)
|
||||||
@@ -1576,8 +1606,8 @@ RetryDir:
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 获取处于两个子字符串之间的部分。
|
''' 获取处于两个子字符串之间的部分,裁切尽可能多的内容。
|
||||||
''' 会裁切尽可能多的内容:匹配开始使用 LastIndexOf,匹配结束使用 IndexOf,但如果未找到子字符串则不裁切。
|
''' 如果未找到子字符串则不裁切。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
<Extension> Public Function Between(Str As String, After As String, Before As String, Optional IgnoreCase As Boolean = False) As String
|
<Extension> Public Function Between(Str As String, After As String, Before As String, Optional IgnoreCase As Boolean = False) As String
|
||||||
Dim StartPos As Integer = If(String.IsNullOrEmpty(After), -1, Str.LastIndexOfF(After, IgnoreCase))
|
Dim StartPos As Integer = If(String.IsNullOrEmpty(After), -1, Str.LastIndexOfF(After, IgnoreCase))
|
||||||
@@ -1844,6 +1874,31 @@ RetryDir:
|
|||||||
|
|
||||||
#Region "系统"
|
#Region "系统"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 线程安全的,可以直接使用 For Each 的 List。
|
||||||
|
''' 在使用 For Each 循环时,列表的结果可能并非最新,但不会抛出异常。
|
||||||
|
''' </summary>
|
||||||
|
Public Class SafeList(Of T)
|
||||||
|
Inherits SynchronizedCollection(Of T)
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
End Sub
|
||||||
|
Public Sub New(Data As IEnumerable(Of T))
|
||||||
|
MyBase.New(New Object, Data)
|
||||||
|
End Sub
|
||||||
|
Public Shared Widening Operator CType(Data As List(Of T)) As SafeList(Of T)
|
||||||
|
Return New SafeList(Of T)(Data)
|
||||||
|
End Operator
|
||||||
|
Public Shared Widening Operator CType(Data As SafeList(Of T)) As List(Of T)
|
||||||
|
Return New List(Of T)(Data)
|
||||||
|
End Operator
|
||||||
|
Public Overloads Function GetEnumerator() As IEnumerator(Of T)
|
||||||
|
SyncLock SyncRoot
|
||||||
|
Return Items.ToList.GetEnumerator()
|
||||||
|
End SyncLock
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 可用于临时存放文件的,不含任何特殊字符的文件夹路径,以“\”结尾。
|
''' 可用于临时存放文件的,不含任何特殊字符的文件夹路径,以“\”结尾。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -1866,6 +1921,12 @@ RetryDir:
|
|||||||
Public Class RestartException
|
Public Class RestartException
|
||||||
Inherits Exception
|
Inherits Exception
|
||||||
End Class
|
End Class
|
||||||
|
''' <summary>
|
||||||
|
''' 指示用户手动取消了操作,或用户已知晓操作被取消的原因。
|
||||||
|
''' </summary>
|
||||||
|
Public Class CancelledException
|
||||||
|
Inherits Exception
|
||||||
|
End Class
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 当前程序是否拥有管理员权限。
|
''' 当前程序是否拥有管理员权限。
|
||||||
@@ -1983,11 +2044,11 @@ NextElement:
|
|||||||
'12~60 月,“1 年 2 个月”
|
'12~60 月,“1 年 2 个月”
|
||||||
GetTimeSpanString = Math.Floor(TotalMonthes / 12) & " 年" & If((TotalMonthes Mod 12) > 0, " " & (TotalMonthes Mod 12) & " 个月", "")
|
GetTimeSpanString = Math.Floor(TotalMonthes / 12) & " 年" & If((TotalMonthes Mod 12) > 0, " " & (TotalMonthes Mod 12) & " 个月", "")
|
||||||
ElseIf TotalMonthes >= 4 Then
|
ElseIf TotalMonthes >= 4 Then
|
||||||
'4~11 月,“5 月”
|
'4~11 月,“5 个月”
|
||||||
GetTimeSpanString = TotalMonthes & " 月"
|
GetTimeSpanString = TotalMonthes & " 个月"
|
||||||
ElseIf TotalMonthes >= 1 Then
|
ElseIf TotalMonthes >= 1 Then
|
||||||
'1~4 月,“2 月 13 天”
|
'1~4 月,“2 个月 13 天”
|
||||||
GetTimeSpanString = TotalMonthes & " 月" & If((Span.Days Mod 30) > 0, " " & (Span.Days Mod 30) & " 天", "")
|
GetTimeSpanString = TotalMonthes & " 个月" & If((Span.Days Mod 30) > 0, " " & (Span.Days Mod 30) & " 天", "")
|
||||||
ElseIf Span.TotalDays >= 4 Then
|
ElseIf Span.TotalDays >= 4 Then
|
||||||
'4~30 天,“23 天”
|
'4~30 天,“23 天”
|
||||||
GetTimeSpanString = Span.Days & " 天"
|
GetTimeSpanString = Span.Days & " 天"
|
||||||
@@ -2108,7 +2169,7 @@ NextElement:
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 在新的工作线程中执行代码。
|
''' 在新的工作线程中执行代码。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Function RunInNewThread(Action As Action, Name As String, Optional Priority As ThreadPriority = ThreadPriority.Normal) As Thread
|
Public Function RunInNewThread(Action As Action, Optional Name As String = Nothing, Optional Priority As ThreadPriority = ThreadPriority.Normal) As Thread
|
||||||
Dim th As New Thread(
|
Dim th As New Thread(
|
||||||
Sub()
|
Sub()
|
||||||
Try
|
Try
|
||||||
@@ -2118,7 +2179,7 @@ NextElement:
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, Name & ":线程执行失败", LogLevel.Feedback)
|
Log(ex, Name & ":线程执行失败", LogLevel.Feedback)
|
||||||
End Try
|
End Try
|
||||||
End Sub) With {.Name = Name, .Priority = Priority}
|
End Sub) With {.Name = If(Name, "Runtime New Invoke " & GetUuid() & "#"), .Priority = Priority}
|
||||||
th.Start()
|
th.Start()
|
||||||
Return th
|
Return th
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -568,7 +568,7 @@ Restart:
|
|||||||
End Class
|
End Class
|
||||||
|
|
||||||
'任务栏进度条
|
'任务栏进度条
|
||||||
Public LoaderTaskbar As New SynchronizedCollection(Of LoaderBase)
|
Public LoaderTaskbar As New SafeList(Of LoaderBase)
|
||||||
Public LoaderTaskbarProgress As Double = 0 '平滑后的进度
|
Public LoaderTaskbarProgress As Double = 0 '平滑后的进度
|
||||||
Private LoaderTaskbarProgressLast As Shell.TaskbarItemProgressState = Shell.TaskbarItemProgressState.None
|
Private LoaderTaskbarProgressLast As Shell.TaskbarItemProgressState = Shell.TaskbarItemProgressState.None
|
||||||
|
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ RequestFinished:
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 所属的文件列表任务。
|
''' 所属的文件列表任务。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Tasks As New SynchronizedCollection(Of LoaderDownload)
|
Public Tasks As New SafeList(Of LoaderDownload)
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 所有下载源。
|
''' 所有下载源。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -974,7 +974,8 @@ Capture:
|
|||||||
Next
|
Next
|
||||||
'是否禁用多线程,以及规定碎片大小
|
'是否禁用多线程,以及规定碎片大小
|
||||||
Dim TargetUrl As String = GetSource().Url
|
Dim TargetUrl As String = GetSource().Url
|
||||||
If TargetUrl.Contains("pcl2-server") OrElse TargetUrl.Contains("gitcode.net") OrElse TargetUrl.Contains("github.com") OrElse TargetUrl.Contains("modrinth") Then Return Nothing
|
If TargetUrl.Contains("pcl2-server") OrElse TargetUrl.Contains("mcimirror") OrElse TargetUrl.Contains("github.com") OrElse
|
||||||
|
TargetUrl.Contains("optifine.net") OrElse TargetUrl.Contains("modrinth") Then Return Nothing
|
||||||
'寻找最大碎片
|
'寻找最大碎片
|
||||||
'FUTURE: 下载引擎重做,计算下载源平均链接时间和线程下载速度,按最高时间节省来开启多线程
|
'FUTURE: 下载引擎重做,计算下载源平均链接时间和线程下载速度,按最高时间节省来开启多线程
|
||||||
Dim FilePieceMax As NetThread = Threads
|
Dim FilePieceMax As NetThread = Threads
|
||||||
@@ -1303,7 +1304,7 @@ Wrong:
|
|||||||
If String.IsNullOrEmpty(header) Then Return Nothing
|
If String.IsNullOrEmpty(header) Then Return Nothing
|
||||||
'attachment; filename="filename.ext"
|
'attachment; filename="filename.ext"
|
||||||
If Not header.Contains("filename=") Then Return Nothing
|
If Not header.Contains("filename=") Then Return Nothing
|
||||||
Return header.After("filename=").Trim(""""c, " "c).Before(";")
|
Return header.AfterLast("filename=").Trim(""""c, " "c).BeforeFirst(";")
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'下载文件的最终收束事件
|
'下载文件的最终收束事件
|
||||||
@@ -1469,8 +1470,7 @@ Retry:
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 需要下载的文件。
|
''' 需要下载的文件。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Files As List(Of NetFile)
|
Public Files As SafeList(Of NetFile)
|
||||||
Private ReadOnly FilesLock As New Object
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 剩余未完成的文件数。(用于减轻 FilesLock 的占用)
|
''' 剩余未完成的文件数。(用于减轻 FilesLock 的占用)
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -1483,9 +1483,7 @@ Retry:
|
|||||||
Public Overrides Property Progress As Double
|
Public Overrides Property Progress As Double
|
||||||
Get
|
Get
|
||||||
If State >= LoadState.Finished Then Return 1
|
If State >= LoadState.Finished Then Return 1
|
||||||
SyncLock FilesLock
|
If Not Files.Any() Then Return 0 '必须返回 0,否则在获取列表的时候会错觉已经下载完了
|
||||||
If Not Files.Any() Then Return 0 '必须返回 0,否则在获取列表的时候会错觉已经下载完了
|
|
||||||
End SyncLock
|
|
||||||
Return _Progress
|
Return _Progress
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
@@ -1507,16 +1505,14 @@ Retry:
|
|||||||
Log("[Download] 由于同加载器中失败次数过多引发强制失败:连续失败了 " & value & " 次", LogLevel.Debug)
|
Log("[Download] 由于同加载器中失败次数过多引发强制失败:连续失败了 " & value & " 次", LogLevel.Debug)
|
||||||
On Error Resume Next
|
On Error Resume Next
|
||||||
Dim ExList As New List(Of Exception)
|
Dim ExList As New List(Of Exception)
|
||||||
SyncLock FilesLock
|
For Each File In Files
|
||||||
For Each File In Files
|
For Each Source In File.Sources
|
||||||
For Each Source In File.Sources
|
If Source.Ex IsNot Nothing Then
|
||||||
If Source.Ex IsNot Nothing Then
|
ExList.Add(Source.Ex)
|
||||||
ExList.Add(Source.Ex)
|
If ExList.Count > 10 Then GoTo FinishExCatch
|
||||||
If ExList.Count > 10 Then GoTo FinishExCatch
|
End If
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Next
|
Next
|
||||||
End SyncLock
|
Next
|
||||||
FinishExCatch:
|
FinishExCatch:
|
||||||
OnFail(ExList)
|
OnFail(ExList)
|
||||||
End If
|
End If
|
||||||
@@ -1533,17 +1529,15 @@ FinishExCatch:
|
|||||||
'计算进度
|
'计算进度
|
||||||
Dim NewProgress As Double = 0
|
Dim NewProgress As Double = 0
|
||||||
Dim TotalProgress As Double = 0
|
Dim TotalProgress As Double = 0
|
||||||
SyncLock FilesLock
|
For Each File In Files
|
||||||
For Each File In Files
|
If File.IsCopy Then
|
||||||
If File.IsCopy Then
|
NewProgress += File.Progress * 0.2
|
||||||
NewProgress += File.Progress * 0.2
|
TotalProgress += 0.2
|
||||||
TotalProgress += 0.2
|
Else
|
||||||
Else
|
NewProgress += File.Progress
|
||||||
NewProgress += File.Progress
|
TotalProgress += 1
|
||||||
TotalProgress += 1
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End SyncLock
|
|
||||||
If TotalProgress > 0 Then NewProgress /= TotalProgress
|
If TotalProgress > 0 Then NewProgress /= TotalProgress
|
||||||
'刷新进度
|
'刷新进度
|
||||||
If NewProgress < 1 AndAlso NewProgress > 0 Then NewProgress = 2 * (NewProgress ^ 3) - 3 * (NewProgress ^ 2) + 2 * NewProgress '2x^3-3x^2+2x,模拟开头和结尾更慢的情况
|
If NewProgress < 1 AndAlso NewProgress > 0 Then NewProgress = 2 * (NewProgress ^ 3) - 3 * (NewProgress ^ 2) + 2 * NewProgress '2x^3-3x^2+2x,模拟开头和结尾更慢的情况
|
||||||
@@ -1552,27 +1546,25 @@ FinishExCatch:
|
|||||||
|
|
||||||
Public Sub New(Name As String, FileTasks As List(Of NetFile))
|
Public Sub New(Name As String, FileTasks As List(Of NetFile))
|
||||||
Me.Name = Name
|
Me.Name = Name
|
||||||
Files = FileTasks
|
Files = New SafeList(Of NetFile)(FileTasks)
|
||||||
End Sub
|
End Sub
|
||||||
Public Overrides Sub Start(Optional Input As Object = Nothing, Optional IsForceRestart As Boolean = False)
|
Public Overrides Sub Start(Optional Input As Object = Nothing, Optional IsForceRestart As Boolean = False)
|
||||||
SyncLock FilesLock
|
If Input IsNot Nothing Then Files = New SafeList(Of NetFile)(Input)
|
||||||
If Input IsNot Nothing Then Files = Input
|
'去重
|
||||||
'去重
|
Dim ResultArray As New SafeList(Of NetFile)
|
||||||
Dim ResultArray As New List(Of NetFile)
|
For i = 0 To Files.Count - 1
|
||||||
For i = 0 To Files.Count - 1
|
For ii = i + 1 To Files.Count - 1
|
||||||
For ii = i + 1 To Files.Count - 1
|
If Files(i).LocalPath = Files(ii).LocalPath Then GoTo NextElement
|
||||||
If Files(i).LocalPath = Files(ii).LocalPath Then GoTo NextElement
|
Next
|
||||||
Next
|
ResultArray.Add(Files(i))
|
||||||
ResultArray.Add(Files(i))
|
|
||||||
NextElement:
|
NextElement:
|
||||||
Next i
|
Next
|
||||||
Files = ResultArray
|
Files = ResultArray
|
||||||
'设置剩余文件数
|
'设置剩余文件数
|
||||||
SyncLock FileRemainLock
|
SyncLock FileRemainLock
|
||||||
For Each File In Files
|
For Each File In Files
|
||||||
If File.State <> NetState.Finish Then FileRemain += 1
|
If File.State <> NetState.Finish Then FileRemain += 1
|
||||||
Next
|
Next
|
||||||
End SyncLock
|
|
||||||
End SyncLock
|
End SyncLock
|
||||||
State = LoadState.Loading
|
State = LoadState.Loading
|
||||||
'开始执行
|
'开始执行
|
||||||
@@ -1615,25 +1607,23 @@ NextElement:
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
'最多 5 个线程,最少每个线程分配 10 个文件
|
'最多 5 个线程,最少每个线程分配 10 个文件
|
||||||
SyncLock FilesLock
|
Dim FilesPerThread As Integer = Math.Max(5, Files.Count / 10 + 1)
|
||||||
Dim FilesPerThread As Integer = Math.Max(5, Files.Count / 10 + 1)
|
Dim FilesInThread As New List(Of NetFile)
|
||||||
Dim FilesInThread As New List(Of NetFile)
|
For Each File In Files
|
||||||
For Each File In Files
|
FilesInThread.Add(File)
|
||||||
FilesInThread.Add(File)
|
If FilesInThread.Count = FilesPerThread Then
|
||||||
If FilesInThread.Count = FilesPerThread Then
|
|
||||||
Dim FilesToRun As New List(Of NetFile)
|
|
||||||
FilesToRun.AddRange(FilesInThread)
|
|
||||||
RunInNewThread(Sub() StartCopy(FilesToRun, FoldersFinal), "NetTask FileCopy " & Uuid)
|
|
||||||
FilesInThread.Clear()
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If FilesInThread.Any Then
|
|
||||||
Dim FilesToRun As New List(Of NetFile)
|
Dim FilesToRun As New List(Of NetFile)
|
||||||
FilesToRun.AddRange(FilesInThread)
|
FilesToRun.AddRange(FilesInThread)
|
||||||
RunInNewThread(Sub() StartCopy(FilesToRun, FoldersFinal), "NetTask FileCopy " & Uuid)
|
RunInNewThread(Sub() StartCopy(FilesToRun, FoldersFinal), "NetTask FileCopy " & Uuid)
|
||||||
FilesInThread.Clear()
|
FilesInThread.Clear()
|
||||||
End If
|
End If
|
||||||
End SyncLock
|
Next
|
||||||
|
If FilesInThread.Any Then
|
||||||
|
Dim FilesToRun As New List(Of NetFile)
|
||||||
|
FilesToRun.AddRange(FilesInThread)
|
||||||
|
RunInNewThread(Sub() StartCopy(FilesToRun, FoldersFinal), "NetTask FileCopy " & Uuid)
|
||||||
|
FilesInThread.Clear()
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnFail(New List(Of Exception) From {ex})
|
OnFail(New List(Of Exception) From {ex})
|
||||||
End Try
|
End Try
|
||||||
@@ -1728,24 +1718,20 @@ Retry:
|
|||||||
Dim UsefulExs = ExList.Where(Function(e) Not e.Message.Contains("(404)")).ToList
|
Dim UsefulExs = ExList.Where(Function(e) Not e.Message.Contains("(404)")).ToList
|
||||||
[Error] = If(UsefulExs.Any, UsefulExs(0), ExList(0))
|
[Error] = If(UsefulExs.Any, UsefulExs(0), ExList(0))
|
||||||
'获取实际失败的文件
|
'获取实际失败的文件
|
||||||
SyncLock FilesLock
|
For Each File In Files
|
||||||
For Each File In Files
|
If File.State = NetState.Error Then
|
||||||
If File.State = NetState.Error Then
|
[Error] = New Exception("文件下载失败:" & File.LocalPath & vbCrLf & Join(
|
||||||
[Error] = New Exception("文件下载失败:" & File.LocalPath & vbCrLf & Join(
|
File.Sources.Select(Function(s) If(s.Ex Is Nothing, s.Url, s.Ex.Message & "(" & s.Url & ")")), vbCrLf), [Error])
|
||||||
File.Sources.Select(Function(s) If(s.Ex Is Nothing, s.Url, s.Ex.Message & "(" & s.Url & ")")), vbCrLf), [Error])
|
Exit For
|
||||||
Exit For
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End SyncLock
|
|
||||||
'在设置 Error 对象后再更改为失败,避免 WaitForExit 无法捕获错误
|
'在设置 Error 对象后再更改为失败,避免 WaitForExit 无法捕获错误
|
||||||
State = LoadState.Failed
|
State = LoadState.Failed
|
||||||
End SyncLock
|
End SyncLock
|
||||||
'中断所有文件
|
'中断所有文件
|
||||||
SyncLock FilesLock
|
For Each TaskFile In Files
|
||||||
For Each TaskFile In Files
|
If TaskFile.State < NetState.Merge Then TaskFile.State = NetState.Error
|
||||||
If TaskFile.State < NetState.Merge Then TaskFile.State = NetState.Error
|
Next
|
||||||
Next
|
|
||||||
End SyncLock
|
|
||||||
'在退出同步锁后再进行日志输出
|
'在退出同步锁后再进行日志输出
|
||||||
Dim ErrOutput As New List(Of String)
|
Dim ErrOutput As New List(Of String)
|
||||||
For Each Ex As Exception In ExList
|
For Each Ex As Exception In ExList
|
||||||
@@ -1760,11 +1746,9 @@ Retry:
|
|||||||
End SyncLock
|
End SyncLock
|
||||||
Log("[Download] " & Name & " 已取消!")
|
Log("[Download] " & Name & " 已取消!")
|
||||||
'中断所有文件
|
'中断所有文件
|
||||||
SyncLock FilesLock
|
For Each TaskFile In Files
|
||||||
For Each TaskFile In Files
|
TaskFile.Abort(Me)
|
||||||
TaskFile.Abort(Me)
|
Next
|
||||||
Next
|
|
||||||
End SyncLock
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1786,8 +1770,7 @@ Retry:
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 当前的所有下载任务。
|
''' 当前的所有下载任务。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Tasks As New List(Of LoaderDownload)
|
Public Tasks As New SafeList(Of LoaderDownload)
|
||||||
Private ReadOnly LockTasks As New Object
|
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 已下载完成的大小。
|
''' 已下载完成的大小。
|
||||||
@@ -1860,11 +1843,9 @@ Retry:
|
|||||||
End If
|
End If
|
||||||
#End Region
|
#End Region
|
||||||
#Region "刷新下载任务属性"
|
#Region "刷新下载任务属性"
|
||||||
SyncLock LockTasks
|
For Each Task In Tasks
|
||||||
For Each Task In Tasks
|
Task.RefreshStat()
|
||||||
Task.RefreshStat()
|
Next
|
||||||
Next
|
|
||||||
End SyncLock
|
|
||||||
#End Region
|
#End Region
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "刷新下载公开属性失败")
|
Log(ex, "刷新下载公开属性失败")
|
||||||
@@ -2010,9 +1991,7 @@ Retry:
|
|||||||
Task.Files(i) = File '回设
|
Task.Files(i) = File '回设
|
||||||
Next
|
Next
|
||||||
End SyncLock
|
End SyncLock
|
||||||
SyncLock LockTasks
|
Tasks.Add(Task)
|
||||||
Tasks.Add(Task)
|
|
||||||
End SyncLock
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -17,15 +17,19 @@ Public Class MyBitmap
|
|||||||
'自动类型转换
|
'自动类型转换
|
||||||
'支持的类:Image,ImageSource,Bitmap,ImageBrush,BitmapSource
|
'支持的类:Image,ImageSource,Bitmap,ImageBrush,BitmapSource
|
||||||
Public Shared Widening Operator CType(Image As System.Drawing.Image) As MyBitmap
|
Public Shared Widening Operator CType(Image As System.Drawing.Image) As MyBitmap
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Return New MyBitmap(Image)
|
Return New MyBitmap(Image)
|
||||||
End Operator
|
End Operator
|
||||||
Public Shared Widening Operator CType(Image As MyBitmap) As System.Drawing.Image
|
Public Shared Widening Operator CType(Image As MyBitmap) As System.Drawing.Image
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Return Image.Pic
|
Return Image.Pic
|
||||||
End Operator
|
End Operator
|
||||||
Public Shared Widening Operator CType(Image As ImageSource) As MyBitmap
|
Public Shared Widening Operator CType(Image As ImageSource) As MyBitmap
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Return New MyBitmap(Image)
|
Return New MyBitmap(Image)
|
||||||
End Operator
|
End Operator
|
||||||
Public Shared Widening Operator CType(Image As MyBitmap) As ImageSource
|
Public Shared Widening Operator CType(Image As MyBitmap) As ImageSource
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Dim Bitmap = Image.Pic
|
Dim Bitmap = Image.Pic
|
||||||
Dim rect = New System.Drawing.Rectangle(0, 0, Bitmap.Width, Bitmap.Height)
|
Dim rect = New System.Drawing.Rectangle(0, 0, Bitmap.Width, Bitmap.Height)
|
||||||
Dim bitmapData = Bitmap.LockBits(rect, ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb)
|
Dim bitmapData = Bitmap.LockBits(rect, ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb)
|
||||||
@@ -37,15 +41,19 @@ Public Class MyBitmap
|
|||||||
End Try
|
End Try
|
||||||
End Operator
|
End Operator
|
||||||
Public Shared Widening Operator CType(Image As System.Drawing.Bitmap) As MyBitmap
|
Public Shared Widening Operator CType(Image As System.Drawing.Bitmap) As MyBitmap
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Return New MyBitmap(Image)
|
Return New MyBitmap(Image)
|
||||||
End Operator
|
End Operator
|
||||||
Public Shared Widening Operator CType(Image As MyBitmap) As System.Drawing.Bitmap
|
Public Shared Widening Operator CType(Image As MyBitmap) As System.Drawing.Bitmap
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Return Image.Pic
|
Return Image.Pic
|
||||||
End Operator
|
End Operator
|
||||||
Public Shared Widening Operator CType(Image As ImageBrush) As MyBitmap
|
Public Shared Widening Operator CType(Image As ImageBrush) As MyBitmap
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Return New MyBitmap(Image)
|
Return New MyBitmap(Image)
|
||||||
End Operator
|
End Operator
|
||||||
Public Shared Widening Operator CType(Image As MyBitmap) As ImageBrush
|
Public Shared Widening Operator CType(Image As MyBitmap) As ImageBrush
|
||||||
|
If Image Is Nothing Then Return Nothing
|
||||||
Return New ImageBrush(New MyBitmap(Image.Pic))
|
Return New ImageBrush(New MyBitmap(Image.Pic))
|
||||||
End Operator
|
End Operator
|
||||||
|
|
||||||
|
|||||||
@@ -271,7 +271,7 @@
|
|||||||
Next
|
Next
|
||||||
CurseForgeFileIds = Files.Select(Function(f) f.Key).Distinct.ToList
|
CurseForgeFileIds = Files.Select(Function(f) f.Key).Distinct.ToList
|
||||||
GameVersions = Files.SelectMany(Function(f) f.Value).Where(Function(v) v.StartsWithF("1.")).
|
GameVersions = Files.SelectMany(Function(f) f.Value).Where(Function(v) v.StartsWithF("1.")).
|
||||||
Select(Function(v) CInt(Val(v.Split(".")(1).Before("-")))).Where(Function(v) v > 0).
|
Select(Function(v) CInt(Val(v.Split(".")(1).BeforeFirst("-")))).Where(Function(v) v > 0).
|
||||||
Distinct.OrderByDescending(Function(v) v).ToList
|
Distinct.OrderByDescending(Function(v) v).ToList
|
||||||
ModLoaders = ModLoaders.Distinct.OrderBy(Of Integer)(Function(t) t).ToList
|
ModLoaders = ModLoaders.Distinct.OrderBy(Of Integer)(Function(t) t).ToList
|
||||||
'Type
|
'Type
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
'搜索结果的键为 versions,获取特定工程的键为 game_versions
|
'搜索结果的键为 versions,获取特定工程的键为 game_versions
|
||||||
GameVersions = If(CType(If(Data("game_versions"), Data("versions")), JArray), New JArray).
|
GameVersions = If(CType(If(Data("game_versions"), Data("versions")), JArray), New JArray).
|
||||||
Select(Function(v) v.ToString).Where(Function(v) v.StartsWithF("1.")).
|
Select(Function(v) v.ToString).Where(Function(v) v.StartsWithF("1.")).
|
||||||
Select(Of Integer)(Function(v) Val(v.Split(".")(1).Before("-"))).Where(Function(v) v > 0).
|
Select(Of Integer)(Function(v) Val(v.Split(".")(1).BeforeFirst("-"))).Where(Function(v) v > 0).
|
||||||
Distinct.OrderByDescending(Function(v) v).ToList
|
Distinct.OrderByDescending(Function(v) v).ToList
|
||||||
'Type
|
'Type
|
||||||
Select Case Data("project_type").ToString
|
Select Case Data("project_type").ToString
|
||||||
@@ -583,9 +583,9 @@
|
|||||||
'有中文翻译
|
'有中文翻译
|
||||||
'尝试将文本分为三段:Title (EnglishName) - Suffix
|
'尝试将文本分为三段:Title (EnglishName) - Suffix
|
||||||
'检查时注意 Carpet:它没有中文译名,但有 Suffix
|
'检查时注意 Carpet:它没有中文译名,但有 Suffix
|
||||||
Title = TranslatedName.Before(" (").Before(" - ")
|
Title = TranslatedName.BeforeFirst(" (").BeforeFirst(" - ")
|
||||||
Dim Suffix As String = ""
|
Dim Suffix As String = ""
|
||||||
If TranslatedName.After(")").Contains(" - ") Then Suffix = TranslatedName.After(")").After(" - ")
|
If TranslatedName.AfterLast(")").Contains(" - ") Then Suffix = TranslatedName.AfterLast(")").AfterLast(" - ")
|
||||||
Dim EnglishName As String = TranslatedName
|
Dim EnglishName As String = TranslatedName
|
||||||
If Suffix <> "" Then EnglishName = EnglishName.Replace(" - " & Suffix, "")
|
If Suffix <> "" Then EnglishName = EnglishName.Replace(" - " & Suffix, "")
|
||||||
EnglishName = EnglishName.Replace(Title, "").Trim("("c, ")"c, " "c)
|
EnglishName = EnglishName.Replace(Title, "").Trim("("c, ")"c, " "c)
|
||||||
@@ -758,7 +758,7 @@ NoSubtitle:
|
|||||||
Case CompType.ResourcePack
|
Case CompType.ResourcePack
|
||||||
'FUTURE: Res
|
'FUTURE: Res
|
||||||
End Select
|
End Select
|
||||||
Address += "&categoryId=" & If(Tag = "", "0", Tag.Before("/"))
|
Address += "&categoryId=" & If(Tag = "", "0", Tag.BeforeFirst("/"))
|
||||||
If ModLoader <> CompModLoaderType.Any Then Address += "&modLoaderType=" & CType(ModLoader, Integer)
|
If ModLoader <> CompModLoaderType.Any Then Address += "&modLoaderType=" & CType(ModLoader, Integer)
|
||||||
If Not String.IsNullOrEmpty(GameVersion) Then Address += "&gameVersion=" & GameVersion
|
If Not String.IsNullOrEmpty(GameVersion) Then Address += "&gameVersion=" & GameVersion
|
||||||
If Not String.IsNullOrEmpty(SearchText) Then Address += "&searchFilter=" & Net.WebUtility.UrlEncode(SearchText)
|
If Not String.IsNullOrEmpty(SearchText) Then Address += "&searchFilter=" & Net.WebUtility.UrlEncode(SearchText)
|
||||||
@@ -779,7 +779,7 @@ NoSubtitle:
|
|||||||
'facets=[["categories:'game-mechanics'"],["categories:'forge'"],["versions:1.19.3"],["project_type:mod"]]
|
'facets=[["categories:'game-mechanics'"],["categories:'forge'"],["versions:1.19.3"],["project_type:mod"]]
|
||||||
Dim Facets As New List(Of String)
|
Dim Facets As New List(Of String)
|
||||||
Facets.Add($"[""project_type:{GetStringFromEnum(Type).ToLower}""]")
|
Facets.Add($"[""project_type:{GetStringFromEnum(Type).ToLower}""]")
|
||||||
If Not String.IsNullOrEmpty(Tag) Then Facets.Add($"[""categories:'{Tag.After("/")}'""]")
|
If Not String.IsNullOrEmpty(Tag) Then Facets.Add($"[""categories:'{Tag.AfterLast("/")}'""]")
|
||||||
If ModLoader <> CompModLoaderType.Any Then Facets.Add($"[""categories:'{GetStringFromEnum(ModLoader).ToLower}'""]")
|
If ModLoader <> CompModLoaderType.Any Then Facets.Add($"[""categories:'{GetStringFromEnum(ModLoader).ToLower}'""]")
|
||||||
If Not String.IsNullOrEmpty(GameVersion) Then Facets.Add($"[""versions:'{GameVersion}'""]")
|
If Not String.IsNullOrEmpty(GameVersion) Then Facets.Add($"[""versions:'{GameVersion}'""]")
|
||||||
Address += "&facets=[" & String.Join(",", Facets) & "]"
|
Address += "&facets=[" & String.Join(",", Facets) & "]"
|
||||||
@@ -887,7 +887,7 @@ NoSubtitle:
|
|||||||
If Not SearchResults(i).AbsoluteRight AndAlso i >= Math.Min(2, SearchResults.Count - 1) Then Exit For '把 3 个结果拼合以提高准确度
|
If Not SearchResults(i).AbsoluteRight AndAlso i >= Math.Min(2, SearchResults.Count - 1) Then Exit For '把 3 个结果拼合以提高准确度
|
||||||
If SearchResults(i).Item.CurseForgeSlug IsNot Nothing Then SearchResult += SearchResults(i).Item.CurseForgeSlug.Replace("-", " ").Replace("/", " ") & " "
|
If SearchResults(i).Item.CurseForgeSlug IsNot Nothing Then SearchResult += SearchResults(i).Item.CurseForgeSlug.Replace("-", " ").Replace("/", " ") & " "
|
||||||
If SearchResults(i).Item.ModrinthSlug IsNot Nothing Then SearchResult += SearchResults(i).Item.ModrinthSlug.Replace("-", " ").Replace("/", " ") & " "
|
If SearchResults(i).Item.ModrinthSlug IsNot Nothing Then SearchResult += SearchResults(i).Item.ModrinthSlug.Replace("-", " ").Replace("/", " ") & " "
|
||||||
SearchResult += SearchResults(i).Item.ChineseName.After(" (").TrimEnd(") ").Before(" - ").
|
SearchResult += SearchResults(i).Item.ChineseName.AfterLast(" (").TrimEnd(") ").BeforeFirst(" - ").
|
||||||
Replace(":", "").Replace("(", "").Replace(")", "").ToLower.Replace("/", " ") & " "
|
Replace(":", "").Replace("(", "").Replace(")", "").ToLower.Replace("/", " ") & " "
|
||||||
Next
|
Next
|
||||||
Log("[Comp] 中文搜索原始关键词:" & SearchResult, LogLevel.Developer)
|
Log("[Comp] 中文搜索原始关键词:" & SearchResult, LogLevel.Developer)
|
||||||
@@ -1313,7 +1313,7 @@ Retry:
|
|||||||
'GameVersions
|
'GameVersions
|
||||||
Dim RawVersions As List(Of String) = Data("game_versions").Select(Function(t) t.ToString.Trim.ToLower).ToList
|
Dim RawVersions As List(Of String) = Data("game_versions").Select(Function(t) t.ToString.Trim.ToLower).ToList
|
||||||
GameVersions = RawVersions.Where(Function(v) v.StartsWithF("1.") OrElse v.StartsWithF("b1.")).
|
GameVersions = RawVersions.Where(Function(v) v.StartsWithF("1.") OrElse v.StartsWithF("b1.")).
|
||||||
Select(Function(v) If(v.Contains("-"), v.Before("-") & " 快照", If(v.StartsWithF("b1."), "远古版本", v))).ToList
|
Select(Function(v) If(v.Contains("-"), v.BeforeFirst("-") & " 快照", If(v.StartsWithF("b1."), "远古版本", v))).ToList
|
||||||
If GameVersions.Count > 1 Then
|
If GameVersions.Count > 1 Then
|
||||||
GameVersions = Sort(GameVersions, AddressOf VersionSortBoolean).ToList
|
GameVersions = Sort(GameVersions, AddressOf VersionSortBoolean).ToList
|
||||||
If Type = CompType.ModPack Then GameVersions = New List(Of String) From {GameVersions(0)}
|
If Type = CompType.ModPack Then GameVersions = New List(Of String) From {GameVersions(0)}
|
||||||
@@ -1362,28 +1362,26 @@ Retry:
|
|||||||
Optional BadDisplayName As Boolean = False) As MyListItem
|
Optional BadDisplayName As Boolean = False) As MyListItem
|
||||||
|
|
||||||
'获取描述信息
|
'获取描述信息
|
||||||
Dim Info As String = ""
|
Dim Title As String = If(BadDisplayName, FileName, DisplayName)
|
||||||
|
Dim Info As New List(Of String)
|
||||||
|
If Title <> FileName.BeforeLast(".") Then Info.Add(FileName.BeforeLast("."))
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case CompType.Mod
|
Case CompType.Mod
|
||||||
Info += If(ModLoaders.Any,
|
If Dependencies.Any Then Info.Add(Dependencies.Count & " 个前置 Mod")
|
||||||
"适用于 " & Join(ModLoaders.Select(Function(m) GetStringFromEnum(m)).ToList, "/") & ",", "")
|
|
||||||
Info += If(ModeDebug AndAlso Dependencies.Any, Dependencies.Count & " 个前置 Mod,", "")
|
|
||||||
Case CompType.ModPack
|
Case CompType.ModPack
|
||||||
If GameVersions.All(Function(v) v.Contains("w")) Then
|
If GameVersions.All(Function(v) v.Contains("w")) Then Info.Add($"游戏版本 {Join(GameVersions, "、")}")
|
||||||
Info += $"游戏版本 {Join(GameVersions, "、")},"
|
|
||||||
End If
|
|
||||||
End Select
|
End Select
|
||||||
If DownloadCount > 0 Then 'CurseForge 的下载次数经常错误地返回 0
|
If DownloadCount > 0 Then 'CurseForge 的下载次数经常错误地返回 0
|
||||||
Info += If(DownloadCount > 100000, Math.Round(DownloadCount / 10000) & " 万次下载,", DownloadCount & " 次下载,")
|
Info.Add("下载 " & If(DownloadCount > 100000, Math.Round(DownloadCount / 10000) & " 万次", DownloadCount & " 次"))
|
||||||
End If
|
End If
|
||||||
Info += GetTimeSpanString(ReleaseDate - Date.Now, False) & "更新"
|
Info.Add("更新于 " & GetTimeSpanString(ReleaseDate - Date.Now, False))
|
||||||
Info += If(Status = CompFileStatus.Release, "", "," & StatusDescription)
|
If Status <> CompFileStatus.Release Then Info.Add(StatusDescription)
|
||||||
|
|
||||||
'建立控件
|
'建立控件
|
||||||
Dim NewItem As New MyListItem With {
|
Dim NewItem As New MyListItem With {
|
||||||
.Title = If(BadDisplayName, FileName, DisplayName),
|
.Title = Title,
|
||||||
.SnapsToDevicePixels = True, .Height = 42, .Type = MyListItem.CheckType.Clickable, .Tag = Me,
|
.SnapsToDevicePixels = True, .Height = 42, .Type = MyListItem.CheckType.Clickable, .Tag = Me,
|
||||||
.Info = Info
|
.Info = Info.Join(",")
|
||||||
}
|
}
|
||||||
Select Case Status
|
Select Case Status
|
||||||
Case CompFileStatus.Release
|
Case CompFileStatus.Release
|
||||||
|
|||||||
@@ -381,6 +381,7 @@ Extracted:
|
|||||||
没有可用的分析文件
|
没有可用的分析文件
|
||||||
使用32位Java导致JVM无法分配足够多的内存
|
使用32位Java导致JVM无法分配足够多的内存
|
||||||
Mod重复安装
|
Mod重复安装
|
||||||
|
Mod互不兼容
|
||||||
OptiFine与Forge不兼容
|
OptiFine与Forge不兼容
|
||||||
Fabric报错
|
Fabric报错
|
||||||
Fabric报错并给出解决方案
|
Fabric报错并给出解决方案
|
||||||
@@ -413,7 +414,7 @@ Extracted:
|
|||||||
'崩溃日志
|
'崩溃日志
|
||||||
If LogCrash IsNot Nothing Then
|
If LogCrash IsNot Nothing Then
|
||||||
Log("[Crash] 开始进行崩溃日志堆栈分析")
|
Log("[Crash] 开始进行崩溃日志堆栈分析")
|
||||||
Keywords.AddRange(AnalyzeStackKeyword(LogCrash.Before("System Details")))
|
Keywords.AddRange(AnalyzeStackKeyword(LogCrash.BeforeFirst("System Details")))
|
||||||
End If
|
End If
|
||||||
'Minecraft 日志
|
'Minecraft 日志
|
||||||
If LogMc IsNot Nothing Then
|
If LogMc IsNot Nothing Then
|
||||||
@@ -541,12 +542,14 @@ Done:
|
|||||||
End If
|
End If
|
||||||
'确定的 Mod 导致崩溃
|
'确定的 Mod 导致崩溃
|
||||||
If LogMc.Contains("Caught exception from ") Then AppendReason(CrashReason.确定Mod导致游戏崩溃, TryAnalyzeModName(RegexSeek(LogMc, "(?<=Caught exception from )[^\n]+?")?.TrimEnd((vbCrLf & " ").ToCharArray)))
|
If LogMc.Contains("Caught exception from ") Then AppendReason(CrashReason.确定Mod导致游戏崩溃, TryAnalyzeModName(RegexSeek(LogMc, "(?<=Caught exception from )[^\n]+?")?.TrimEnd((vbCrLf & " ").ToCharArray)))
|
||||||
'Mod 重复安装
|
'Mod 重复 / 前置问题
|
||||||
If LogMc.Contains("DuplicateModsFoundException") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(LogMc, "(?<=\n\t[\w]+ : [A-Z]{1}:[^\n]+(/|\\))[^/\\\n]+?.jar", RegularExpressions.RegexOptions.IgnoreCase))
|
If LogMc.Contains("DuplicateModsFoundException") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(LogMc, "(?<=\n\t[\w]+ : [A-Z]{1}:[^\n]+(/|\\))[^/\\\n]+?.jar", RegularExpressions.RegexOptions.IgnoreCase))
|
||||||
If LogMc.Contains("Found a duplicate mod") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(If(RegexSeek(LogMc, "Found a duplicate mod[^\n]+"), ""), "[^\\/]+.jar", RegularExpressions.RegexOptions.IgnoreCase))
|
If LogMc.Contains("Found a duplicate mod") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(If(RegexSeek(LogMc, "Found a duplicate mod[^\n]+"), ""), "[^\\/]+.jar", RegularExpressions.RegexOptions.IgnoreCase))
|
||||||
If LogMc.Contains("Found duplicate mods") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(LogMc, "(?<=Mod ID: ')\w+?(?=' from mod files:)").Distinct.ToList)
|
If LogMc.Contains("Found duplicate mods") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(LogMc, "(?<=Mod ID: ')\w+?(?=' from mod files:)").Distinct.ToList)
|
||||||
If LogMc.Contains("ModResolutionException: Duplicate") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(If(RegexSeek(LogMc, "ModResolutionException: Duplicate[^\n]+"), ""), "[^\\/]+.jar", RegularExpressions.RegexOptions.IgnoreCase))
|
If LogMc.Contains("ModResolutionException: Duplicate") Then AppendReason(CrashReason.Mod重复安装, RegexSearch(If(RegexSeek(LogMc, "ModResolutionException: Duplicate[^\n]+"), ""), "[^\\/]+.jar", RegularExpressions.RegexOptions.IgnoreCase))
|
||||||
'Mod 缺少前置
|
If LogMc.Contains("Incompatible mods found!") Then '#5006
|
||||||
|
AppendReason(CrashReason.Mod互不兼容, If(RegexSeek(LogMc, "(?<=Incompatible mods found![\s\S]+: )[\s\S]+?(?=\tat )"), ""))
|
||||||
|
End If
|
||||||
If LogMc.Contains("Missing or unsupported mandatory dependencies:") Then
|
If LogMc.Contains("Missing or unsupported mandatory dependencies:") Then
|
||||||
AppendReason(CrashReason.Mod缺少前置或MC版本错误,
|
AppendReason(CrashReason.Mod缺少前置或MC版本错误,
|
||||||
RegexSearch(LogMc, "(?<=Missing or unsupported mandatory dependencies:)([\n\r]+\t(.*))+", RegularExpressions.RegexOptions.IgnoreCase).
|
RegexSearch(LogMc, "(?<=Missing or unsupported mandatory dependencies:)([\n\r]+\t(.*))+", RegularExpressions.RegexOptions.IgnoreCase).
|
||||||
@@ -592,37 +595,51 @@ Done:
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Private Sub AnalyzeCrit2()
|
Private Sub AnalyzeCrit2()
|
||||||
|
|
||||||
|
'Mixin 分析
|
||||||
|
Dim MixinAnalyze =
|
||||||
|
Function(LogText As String) As Boolean
|
||||||
|
Dim IsMixin As Boolean =
|
||||||
|
LogText.Contains("Mixin prepare failed ") OrElse LogText.Contains("Mixin apply failed ") OrElse
|
||||||
|
LogText.Contains("MixinApplyError") OrElse LogText.Contains("MixinTransformerError") OrElse
|
||||||
|
LogText.Contains("mixin.injection.throwables.") OrElse LogText.Contains(".json] FAILED during )")
|
||||||
|
If Not IsMixin Then Return False
|
||||||
|
'Mod 名称匹配
|
||||||
|
Dim ModName As String = RegexSeek(LogText, "(?<=from mod )[^.\/ ]+(?=\] from)")
|
||||||
|
If ModName Is Nothing Then ModName = RegexSeek(LogText, "(?<=for mod )[^.\/ ]+(?= failed)")
|
||||||
|
If ModName IsNot Nothing Then
|
||||||
|
AppendReason(CrashReason.ModMixin失败, TryAnalyzeModName(ModName.TrimEnd((vbCrLf & " ").ToCharArray)))
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
'JSON 名称匹配
|
||||||
|
For Each JsonName In RegexSearch(LogText, "(?<=^[^\t]+[ \[{(]{1})[^ \[{(]+\.[^ ]+(?=\.json)", RegularExpressions.RegexOptions.Multiline)
|
||||||
|
AppendReason(CrashReason.ModMixin失败,
|
||||||
|
TryAnalyzeModName(JsonName.Replace("mixins", "mixin").Replace(".mixin", "").Replace("mixin.", "")))
|
||||||
|
Return True
|
||||||
|
Next
|
||||||
|
'没有明确匹配
|
||||||
|
AppendReason(CrashReason.ModMixin失败)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
'游戏日志分析
|
'游戏日志分析
|
||||||
If LogMc IsNot Nothing Then
|
If LogMc IsNot Nothing Then
|
||||||
|
'Mixin 崩溃
|
||||||
|
Dim IsMixin As Boolean = MixinAnalyze(LogMc)
|
||||||
'常规信息
|
'常规信息
|
||||||
If LogMc.Contains("An exception was thrown, the game will display an error screen and halt.") Then AppendReason(CrashReason.Forge报错, RegexSeek(LogMc, "(?<=the game will display an error screen and halt.[\n\r]+[^\n]+?Exception: )[\s\S]+?(?=\n\tat)")?.Trim(vbCrLf))
|
If LogMc.Contains("An exception was thrown, the game will display an error screen and halt.") Then AppendReason(CrashReason.Forge报错, RegexSeek(LogMc, "(?<=the game will display an error screen and halt.[\n\r]+[^\n]+?Exception: )[\s\S]+?(?=\n\tat)")?.Trim(vbCrLf))
|
||||||
If LogMc.Contains("A potential solution has been determined:") Then AppendReason(CrashReason.Fabric报错并给出解决方案, Join(RegexSearch(If(RegexSeek(LogMc, "(?<=A potential solution has been determined:\n)((\t)+ - [^\n]+\n)+"), ""), "(?<=(\t)+)[^\n]+"), vbLf))
|
If LogMc.Contains("A potential solution has been determined:") Then AppendReason(CrashReason.Fabric报错并给出解决方案, Join(RegexSearch(If(RegexSeek(LogMc, "(?<=A potential solution has been determined:\n)((\t)+ - [^\n]+\n)+"), ""), "(?<=(\t)+)[^\n]+"), vbLf))
|
||||||
If LogMc.Contains("A potential solution has been determined, this may resolve your problem:") Then AppendReason(CrashReason.Fabric报错并给出解决方案, Join(RegexSearch(If(RegexSeek(LogMc, "(?<=A potential solution has been determined, this may resolve your problem:\n)((\t)+ - [^\n]+\n)+"), ""), "(?<=(\t)+)[^\n]+"), vbLf))
|
If LogMc.Contains("A potential solution has been determined, this may resolve your problem:") Then AppendReason(CrashReason.Fabric报错并给出解决方案, Join(RegexSearch(If(RegexSeek(LogMc, "(?<=A potential solution has been determined, this may resolve your problem:\n)((\t)+ - [^\n]+\n)+"), ""), "(?<=(\t)+)[^\n]+"), vbLf))
|
||||||
If LogMc.Contains("确定了一种可能的解决方法,这样做可能会解决你的问题:") Then AppendReason(CrashReason.Fabric报错并给出解决方案, Join(RegexSearch(If(RegexSeek(LogMc, "(?<=确定了一种可能的解决方法,这样做可能会解决你的问题:\n)((\t)+ - [^\n]+\n)+"), ""), "(?<=(\t)+)[^\n]+"), vbLf))
|
If LogMc.Contains("确定了一种可能的解决方法,这样做可能会解决你的问题:") Then AppendReason(CrashReason.Fabric报错并给出解决方案, Join(RegexSearch(If(RegexSeek(LogMc, "(?<=确定了一种可能的解决方法,这样做可能会解决你的问题:\n)((\t)+ - [^\n]+\n)+"), ""), "(?<=(\t)+)[^\n]+"), vbLf))
|
||||||
'Mixin 崩溃
|
If Not IsMixin AndAlso LogMc.Contains("due to errors, provided by ") Then '在 #3104 的情况下,这一句导致 OptiFabric 的 Mixin 失败错判为 Fabric Loader 加载失败
|
||||||
If LogMc.Contains("Mixin prepare failed ") OrElse LogMc.Contains("Mixin apply failed ") OrElse LogMc.Contains("MixinApplyError") OrElse
|
AppendReason(CrashReason.确定Mod导致游戏崩溃, TryAnalyzeModName(If(RegexSeek(LogMc, "(?<=due to errors, provided by ')[^']+"), "").TrimEnd((vbCrLf & " ").ToCharArray)))
|
||||||
LogMc.Contains("mixin.injection.throwables.") OrElse LogMc.Contains(".json] FAILED during )") Then
|
|
||||||
Dim ModId As String = RegexSeek(LogMc, "(?<=in )[^./ ]+(?=.mixins.json.+failed injection check)")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<=in mixins.)[^./ ]+(?=.json.+failed injection check)")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<= failed .+ in )[^./ ]+(?=.mixins.json)")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<= failed .+ in mixins.)[^./ ]+(?=.json)")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<= failed mixins.)[^./ ]+(?=.json:)")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<= in config \[)[^./ ]+(?=.mixins.json\] FAILED during )")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<= in config \[mixins.)[^./ ]+(?=.json\] FAILED during )")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<=from mod )[^./ ]+(?=\] from)")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<=for mod )[^./ ]+(?= failed)")
|
|
||||||
'兜底名称判断
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "[^./ \]]+(?=.mixins.json)")
|
|
||||||
If ModId Is Nothing Then ModId = RegexSeek(LogMc, "(?<=mixins.)[^./ \]]+(?=.json)")
|
|
||||||
AppendReason(CrashReason.ModMixin失败, TryAnalyzeModName(If(ModId, "").TrimEnd((vbCrLf & " ").ToCharArray)))
|
|
||||||
Else
|
|
||||||
'在 #3104 的情况下,这一句导致 OptiFabric 的 Mixin 失败错判为 Fabric Loader 加载失败
|
|
||||||
If LogMc.Contains("due to errors, provided by ") Then AppendReason(CrashReason.确定Mod导致游戏崩溃, TryAnalyzeModName(If(RegexSeek(LogMc, "(?<=due to errors, provided by ')[^']+"), "").TrimEnd((vbCrLf & " ").ToCharArray)))
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'崩溃报告分析
|
'崩溃报告分析
|
||||||
If LogCrash IsNot Nothing Then
|
If LogCrash IsNot Nothing Then
|
||||||
|
'Mixin 崩溃
|
||||||
|
MixinAnalyze(LogCrash)
|
||||||
|
'常规信息
|
||||||
If LogCrash.Contains("Suspected Mod") Then
|
If LogCrash.Contains("Suspected Mod") Then
|
||||||
Dim SuspectsRaw As String = LogCrash.Between("Suspected Mod", "Stacktrace")
|
Dim SuspectsRaw As String = LogCrash.Between("Suspected Mod", "Stacktrace")
|
||||||
If Not SuspectsRaw.StartsWithF("s: None") Then 'Suspected Mods: None
|
If Not SuspectsRaw.StartsWithF("s: None") Then 'Suspected Mods: None
|
||||||
@@ -644,6 +661,8 @@ Done:
|
|||||||
If Not (LogMc.Contains("at net.") OrElse LogMc.Contains("INFO]")) AndAlso LogHs Is Nothing AndAlso LogCrash Is Nothing AndAlso LogMc.Length < 100 Then
|
If Not (LogMc.Contains("at net.") OrElse LogMc.Contains("INFO]")) AndAlso LogHs Is Nothing AndAlso LogCrash Is Nothing AndAlso LogMc.Length < 100 Then
|
||||||
AppendReason(CrashReason.极短的程序输出, LogMc)
|
AppendReason(CrashReason.极短的程序输出, LogMc)
|
||||||
End If
|
End If
|
||||||
|
'Mod 解析错误(常见于 Fabric 前置校验失败)
|
||||||
|
If LogMc.Contains("Mod resolution failed") Then AppendReason(CrashReason.Mod加载器报错)
|
||||||
'Mixin 失败可以导致大量 Mod 实例创建失败
|
'Mixin 失败可以导致大量 Mod 实例创建失败
|
||||||
If LogMc.Contains("Failed to create mod instance.") Then AppendReason(CrashReason.Mod初始化失败, TryAnalyzeModName(If(RegexSeek(LogMc, "(?<=Failed to create mod instance. ModID: )[^,]+"), If(RegexSeek(LogMc, "(?<=Failed to create mod instance. ModId )[^\n]+(?= for )"), "")).TrimEnd(vbCrLf)))
|
If LogMc.Contains("Failed to create mod instance.") Then AppendReason(CrashReason.Mod初始化失败, TryAnalyzeModName(If(RegexSeek(LogMc, "(?<=Failed to create mod instance. ModID: )[^,]+"), If(RegexSeek(LogMc, "(?<=Failed to create mod instance. ModId )[^\n]+(?= for )"), "")).TrimEnd(vbCrLf)))
|
||||||
'注意:Fabric 的 Warnings were found! 不一定是崩溃原因,它可能是单纯的警报
|
'注意:Fabric 的 Warnings were found! 不一定是崩溃原因,它可能是单纯的警报
|
||||||
@@ -699,7 +718,7 @@ NextStack:
|
|||||||
If {"com", "org", "net", "asm", "fml", "mod", "jar", "sun", "lib", "map", "gui", "dev", "nio", "api", "dsi", "top", "mcp",
|
If {"com", "org", "net", "asm", "fml", "mod", "jar", "sun", "lib", "map", "gui", "dev", "nio", "api", "dsi", "top", "mcp",
|
||||||
"core", "init", "mods", "main", "file", "game", "load", "read", "done", "util", "tile", "item", "base", "oshi", "impl", "data", "pool", "task",
|
"core", "init", "mods", "main", "file", "game", "load", "read", "done", "util", "tile", "item", "base", "oshi", "impl", "data", "pool", "task",
|
||||||
"forge", "setup", "block", "model", "mixin", "event", "unimi", "netty", "world",
|
"forge", "setup", "block", "model", "mixin", "event", "unimi", "netty", "world",
|
||||||
"gitlab", "common", "server", "config", "loader", "launch", "entity", "assist", "client", "plugin", "modapi", "mojang", "shader", "events", "github", "recipe", "render", "packet", "events",
|
"gitlab", "common", "server", "config", "mixins", "compat", "loader", "launch", "entity", "assist", "client", "plugin", "modapi", "mojang", "shader", "events", "github", "recipe", "render", "packet", "events",
|
||||||
"preinit", "preload", "machine", "reflect", "channel", "general", "handler", "content", "systems", "modules", "service",
|
"preinit", "preload", "machine", "reflect", "channel", "general", "handler", "content", "systems", "modules", "service",
|
||||||
"fastutil", "optifine", "internal", "platform", "override", "fabricmc", "neoforge",
|
"fastutil", "optifine", "internal", "platform", "override", "fabricmc", "neoforge",
|
||||||
"injection", "listeners", "scheduler", "minecraft", "transformer", "transformers", "neoforged", "universal", "multipart", "minecraftforge", "blockentity", "spongepowered", "electronwill"
|
"injection", "listeners", "scheduler", "minecraft", "transformer", "transformers", "neoforged", "universal", "multipart", "minecraftforge", "blockentity", "spongepowered", "electronwill"
|
||||||
@@ -742,7 +761,7 @@ NextStack:
|
|||||||
Details = Details.Replace("Fabric Mods", "¨")
|
Details = Details.Replace("Fabric Mods", "¨")
|
||||||
Log("[Crash] 崩溃报告中检测到 Fabric Mod 信息格式")
|
Log("[Crash] 崩溃报告中检测到 Fabric Mod 信息格式")
|
||||||
End If
|
End If
|
||||||
Details = Details.After("¨")
|
Details = Details.AfterLast("¨")
|
||||||
|
|
||||||
'[Forge] 获取所有包含 .jar 的行
|
'[Forge] 获取所有包含 .jar 的行
|
||||||
'[Fabric] 获取所有包含 Mod 信息的行
|
'[Fabric] 获取所有包含 Mod 信息的行
|
||||||
@@ -877,16 +896,19 @@ NextStack:
|
|||||||
If ExtraFiles IsNot Nothing Then OutputFiles.AddRange(ExtraFiles)
|
If ExtraFiles IsNot Nothing Then OutputFiles.AddRange(ExtraFiles)
|
||||||
For Each OutputFile In OutputFiles
|
For Each OutputFile In OutputFiles
|
||||||
Dim FileName As String = GetFileNameFromPath(OutputFile)
|
Dim FileName As String = GetFileNameFromPath(OutputFile)
|
||||||
|
Dim FileEncoding As Encoding = Nothing
|
||||||
Select Case FileName
|
Select Case FileName
|
||||||
Case "LatestLaunch.bat"
|
Case "LatestLaunch.bat"
|
||||||
FileName = "启动脚本.bat"
|
FileName = "启动脚本.bat"
|
||||||
Case "Log1.txt"
|
Case "Log1.txt"
|
||||||
FileName = "PCL 启动器日志.txt"
|
FileName = "PCL 启动器日志.txt"
|
||||||
|
FileEncoding = Encoding.UTF8
|
||||||
Case "RawOutput.log"
|
Case "RawOutput.log"
|
||||||
FileName = "游戏崩溃前的输出.txt"
|
FileName = "游戏崩溃前的输出.txt"
|
||||||
|
FileEncoding = Encoding.UTF8
|
||||||
End Select
|
End Select
|
||||||
If File.Exists(OutputFile) Then
|
If File.Exists(OutputFile) Then
|
||||||
Dim FileEncoding As Encoding = GetEncoding(ReadFileBytes(OutputFile))
|
If FileEncoding Is Nothing Then FileEncoding = GetEncoding(ReadFileBytes(OutputFile))
|
||||||
WriteFile(TempFolder & "Report\" & FileName,
|
WriteFile(TempFolder & "Report\" & FileName,
|
||||||
SecretFilter(ReadFile(OutputFile, FileEncoding), If(FileName = "启动脚本.bat", "F", "*")),
|
SecretFilter(ReadFile(OutputFile, FileEncoding), If(FileName = "启动脚本.bat", "F", "*")),
|
||||||
Encoding:=FileEncoding)
|
Encoding:=FileEncoding)
|
||||||
@@ -914,7 +936,7 @@ NextStack:
|
|||||||
If IsHandAnalyze Then
|
If IsHandAnalyze Then
|
||||||
Return "很抱歉,PCL 无法确定错误原因。"
|
Return "很抱歉,PCL 无法确定错误原因。"
|
||||||
Else
|
Else
|
||||||
Return $"很抱歉,你的游戏出现了一些问题……{vbCrLf}如果要寻求帮助,请导出错误报告并发给他人,而不是发送这个窗口的截图。"
|
Return $"很抱歉,你的游戏出现了一些问题……{vbCrLf}如果要寻求帮助,请把错误报告文件发给对方,而不是发送这个窗口的照片或者截图。"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -970,7 +992,9 @@ NextStack:
|
|||||||
Results.Add("以下 Mod 导致了游戏出错:\n - " & Join(Additional, "\n - ") & "\n\n你可以尝试依次禁用上述 Mod,然后观察游戏是否还会崩溃。\n\e\h")
|
Results.Add("以下 Mod 导致了游戏出错:\n - " & Join(Additional, "\n - ") & "\n\n你可以尝试依次禁用上述 Mod,然后观察游戏是否还会崩溃。\n\e\h")
|
||||||
End If
|
End If
|
||||||
Case CrashReason.ModMixin失败
|
Case CrashReason.ModMixin失败
|
||||||
If Additional.Count = 1 Then
|
If Additional.Count = 0 Then
|
||||||
|
Results.Add("部分 Mod 注入失败,导致游戏出错。\n这一般代表着部分 Mod 与其他 Mod 或当前环境不兼容,或是它存在 Bug。\n你可以尝试逐步禁用 Mod,然后观察游戏是否还会崩溃,以此定位导致崩溃的 Mod。\n\e\h")
|
||||||
|
ElseIf Additional.Count = 1 Then
|
||||||
Results.Add("名为 " & Additional.First & " 的 Mod 注入失败,导致游戏出错。\n这一般代表着它与其他 Mod 或当前环境不兼容,或是它存在 Bug。\n你可以尝试禁用此 Mod,然后观察游戏是否还会崩溃。\n\e\h")
|
Results.Add("名为 " & Additional.First & " 的 Mod 注入失败,导致游戏出错。\n这一般代表着它与其他 Mod 或当前环境不兼容,或是它存在 Bug。\n你可以尝试禁用此 Mod,然后观察游戏是否还会崩溃。\n\e\h")
|
||||||
Else
|
Else
|
||||||
Results.Add("以下 Mod 导致了游戏出错:\n - " & Join(Additional, "\n - ") & "\n这一般代表着它们与其他 Mod 或当前环境不兼容,或是它存在 Bug。\n你可以尝试依次禁用上述 Mod,然后观察游戏是否还会崩溃。\n\e\h")
|
Results.Add("以下 Mod 导致了游戏出错:\n - " & Join(Additional, "\n - ") & "\n这一般代表着它们与其他 Mod 或当前环境不兼容,或是它存在 Bug。\n你可以尝试依次禁用上述 Mod,然后观察游戏是否还会崩溃。\n\e\h")
|
||||||
@@ -1043,25 +1067,31 @@ NextStack:
|
|||||||
If Additional.Count = 1 Then
|
If Additional.Count = 1 Then
|
||||||
Results.Add("Fabric 提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
Results.Add("Fabric 提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
||||||
Else
|
Else
|
||||||
Results.Add("Fabric 可能已经提供了错误信息,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\n如果没有看到报错信息,可以查看错误报告了解错误具体是如何发生的。\h")
|
Results.Add("Fabric 可能已经提供了错误信息,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\h")
|
||||||
|
End If
|
||||||
|
Case CrashReason.Mod互不兼容
|
||||||
|
If Additional.Count = 1 Then
|
||||||
|
Results.Add("你所安装的 Mod 不兼容:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
||||||
|
Else
|
||||||
|
Results.Add("你所安装的 Mod 不兼容,Mod 加载器可能已经提供了错误信息,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\h")
|
||||||
End If
|
End If
|
||||||
Case CrashReason.Mod加载器报错
|
Case CrashReason.Mod加载器报错
|
||||||
If Additional.Count = 1 Then
|
If Additional.Count = 1 Then
|
||||||
Results.Add("Mod 加载器提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
Results.Add("Mod 加载器提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
||||||
Else
|
Else
|
||||||
Results.Add("Mod 加载器可能已经提供了错误信息,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\n如果没有看到报错信息,可以查看错误报告了解错误具体是如何发生的。\h")
|
Results.Add("Mod 加载器可能已经提供了错误信息,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\h")
|
||||||
End If
|
End If
|
||||||
Case CrashReason.Fabric报错并给出解决方案
|
Case CrashReason.Fabric报错并给出解决方案
|
||||||
If Additional.Count = 1 Then
|
If Additional.Count = 1 Then
|
||||||
Results.Add("Fabric 提供了以下解决方案:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
Results.Add("Fabric 提供了以下解决方案:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
||||||
Else
|
Else
|
||||||
Results.Add("Fabric 可能已经提供了解决方案,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\n如果没有看到报错信息,可以查看错误报告了解错误具体是如何发生的。\h")
|
Results.Add("Fabric 可能已经提供了解决方案,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\h")
|
||||||
End If
|
End If
|
||||||
Case CrashReason.Forge报错
|
Case CrashReason.Forge报错
|
||||||
If Additional.Count = 1 Then
|
If Additional.Count = 1 Then
|
||||||
Results.Add("Forge 提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
Results.Add("Forge 提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
|
||||||
Else
|
Else
|
||||||
Results.Add("Forge 可能已经提供了错误信息,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\n如果没有看到报错信息,可以查看错误报告了解错误具体是如何发生的。\h")
|
Results.Add("Forge 可能已经提供了错误信息,请根据错误报告中的日志信息进行对应处理,如果看不懂英文可以使用翻译软件。\h")
|
||||||
End If
|
End If
|
||||||
Case CrashReason.没有可用的分析文件
|
Case CrashReason.没有可用的分析文件
|
||||||
Results.Add("你的游戏出现了一些问题,但 PCL 未能找到相关记录文件,因此无法进行分析。\h")
|
Results.Add("你的游戏出现了一些问题,但 PCL 未能找到相关记录文件,因此无法进行分析。\h")
|
||||||
@@ -1077,7 +1107,7 @@ NextStack:
|
|||||||
Replace(vbCrLf, vbCr).Replace(vbLf, vbCr).Replace(vbCr, vbCrLf).
|
Replace(vbCrLf, vbCr).Replace(vbLf, vbCr).Replace(vbCr, vbCrLf).
|
||||||
Trim(vbCrLf.ToCharArray) &
|
Trim(vbCrLf.ToCharArray) &
|
||||||
If(Not Results.Any(Function(r) r.EndsWithF("\h")) OrElse IsHandAnalyze, "",
|
If(Not Results.Any(Function(r) r.EndsWithF("\h")) OrElse IsHandAnalyze, "",
|
||||||
vbCrLf & "如果要寻求帮助,请向他人发送错误报告文件,而不是发送这个窗口的截图。" &
|
vbCrLf & "如果要寻求帮助,请把错误报告文件发给对方,而不是发送这个窗口的照片或者截图。" &
|
||||||
If(If(PageSetupSystem.IsLauncherNewest(), True), "",
|
If(If(PageSetupSystem.IsLauncherNewest(), True), "",
|
||||||
vbCrLf & vbCrLf & "此外,你正在使用老版本 PCL,更新 PCL 或许也能解决这个问题。" & vbCrLf & "你可以点击 设置 → 启动器 → 检查更新 来更新 PCL。"))
|
vbCrLf & vbCrLf & "此外,你正在使用老版本 PCL,更新 PCL 或许也能解决这个问题。" & vbCrLf & "你可以点击 设置 → 启动器 → 检查更新 来更新 PCL。"))
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -780,7 +780,7 @@
|
|||||||
Inherit = "1.20.1"
|
Inherit = "1.20.1"
|
||||||
Else '20.4.30-beta
|
Else '20.4.30-beta
|
||||||
VersionName = ApiName
|
VersionName = ApiName
|
||||||
Version = New Version(ApiName.Before("-"))
|
Version = New Version(ApiName.BeforeFirst("-"))
|
||||||
Inherit = $"1.{Version.Major}" & If(Version.Minor = 0, "", "." & Version.Minor)
|
Inherit = $"1.{Version.Major}" & If(Version.Minor = 0, "", "." & Version.Minor)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1089,7 +1089,7 @@
|
|||||||
Dim Urls As New List(Of KeyValuePair(Of String, Integer))
|
Dim Urls As New List(Of KeyValuePair(Of String, Integer))
|
||||||
If McimUrl <> Url Then
|
If McimUrl <> Url Then
|
||||||
Select Case Setup.Get("ToolDownloadMod")
|
Select Case Setup.Get("ToolDownloadMod")
|
||||||
'UNDONE: 在 MCIM 源稳定后回调
|
'TODO: 在 MCIM 源稳定后回调
|
||||||
Case 0
|
Case 0
|
||||||
If ModeDebug Then
|
If ModeDebug Then
|
||||||
Urls.Add(New KeyValuePair(Of String, Integer)(McimUrl, 10))
|
Urls.Add(New KeyValuePair(Of String, Integer)(McimUrl, 10))
|
||||||
@@ -1138,7 +1138,7 @@
|
|||||||
Dim Urls As New List(Of KeyValuePair(Of String, Integer))
|
Dim Urls As New List(Of KeyValuePair(Of String, Integer))
|
||||||
If McimUrl <> Url Then
|
If McimUrl <> Url Then
|
||||||
Select Case Setup.Get("ToolDownloadMod")
|
Select Case Setup.Get("ToolDownloadMod")
|
||||||
'UNDONE: 在 MCIM 源稳定后回调
|
'TODO: 在 MCIM 源稳定后回调
|
||||||
Case 0
|
Case 0
|
||||||
If ModeDebug Then
|
If ModeDebug Then
|
||||||
Urls.Add(New KeyValuePair(Of String, Integer)(McimUrl, 10))
|
Urls.Add(New KeyValuePair(Of String, Integer)(McimUrl, 10))
|
||||||
|
|||||||
@@ -681,8 +681,8 @@ Wait:
|
|||||||
For Each FolderInfo As DirectoryInfo In OriginalPath.EnumerateDirectories
|
For Each FolderInfo As DirectoryInfo In OriginalPath.EnumerateDirectories
|
||||||
If FolderInfo.Attributes.HasFlag(FileAttributes.ReparsePoint) Then Continue For '跳过符号链接
|
If FolderInfo.Attributes.HasFlag(FileAttributes.ReparsePoint) Then Continue For '跳过符号链接
|
||||||
Dim SearchEntry = GetFolderNameFromPath(FolderInfo.Name).ToLower '用于搜索的字符串
|
Dim SearchEntry = GetFolderNameFromPath(FolderInfo.Name).ToLower '用于搜索的字符串
|
||||||
If IsFullSearch OrElse FolderInfo.Parent.Name.ToLower = "users" OrElse
|
If IsFullSearch OrElse
|
||||||
Keywords.Any(Function(w) SearchEntry.Contains(w)) OrElse SearchEntry = "bin" Then
|
FolderInfo.Parent.Name.ToLower = "users" OrElse Val(SearchEntry) > 0 OrElse Keywords.Any(Function(w) SearchEntry.Contains(w)) OrElse SearchEntry = "bin" Then
|
||||||
JavaSearchFolder(FolderInfo, Results, Source)
|
JavaSearchFolder(FolderInfo, Results, Source)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ NextInner:
|
|||||||
Case McLoginType.Ms
|
Case McLoginType.Ms
|
||||||
If Setup.Get("CacheMsV2Name") <> "" Then Return Setup.Get("CacheMsV2Name")
|
If Setup.Get("CacheMsV2Name") <> "" Then Return Setup.Get("CacheMsV2Name")
|
||||||
Case McLoginType.Legacy
|
Case McLoginType.Legacy
|
||||||
If Setup.Get("LoginLegacyName") <> "" Then Return Setup.Get("LoginLegacyName").ToString.Before("¨")
|
If Setup.Get("LoginLegacyName") <> "" Then Return Setup.Get("LoginLegacyName").ToString.BeforeFirst("¨")
|
||||||
Case McLoginType.Nide
|
Case McLoginType.Nide
|
||||||
If Setup.Get("CacheNideName") <> "" Then Return Setup.Get("CacheNideName")
|
If Setup.Get("CacheNideName") <> "" Then Return Setup.Get("CacheNideName")
|
||||||
Case McLoginType.Auth
|
Case McLoginType.Auth
|
||||||
@@ -390,7 +390,7 @@ NextInner:
|
|||||||
If Setup.Get("CacheMsV2Name") <> "" Then Return Setup.Get("CacheMsV2Name")
|
If Setup.Get("CacheMsV2Name") <> "" Then Return Setup.Get("CacheMsV2Name")
|
||||||
If Setup.Get("CacheNideName") <> "" Then Return Setup.Get("CacheNideName")
|
If Setup.Get("CacheNideName") <> "" Then Return Setup.Get("CacheNideName")
|
||||||
If Setup.Get("CacheAuthName") <> "" Then Return Setup.Get("CacheAuthName")
|
If Setup.Get("CacheAuthName") <> "" Then Return Setup.Get("CacheAuthName")
|
||||||
If Setup.Get("LoginLegacyName") <> "" Then Return Setup.Get("LoginLegacyName").ToString.Before("¨")
|
If Setup.Get("LoginLegacyName") <> "" Then Return Setup.Get("LoginLegacyName").ToString.BeforeFirst("¨")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Function
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -501,7 +501,7 @@ NextInner:
|
|||||||
#Region "分方式登录模块"
|
#Region "分方式登录模块"
|
||||||
|
|
||||||
'各个登录方式的主对象与输入构造
|
'各个登录方式的主对象与输入构造
|
||||||
Public McLoginMsLoader As New LoaderTask(Of McLoginMs, McLoginResult)("Loader Login Ms", AddressOf McLoginMsStart)
|
Public McLoginMsLoader As New LoaderTask(Of McLoginMs, McLoginResult)("Loader Login Ms", AddressOf McLoginMsStart) With {.ReloadTimeout = 1}
|
||||||
Public McLoginLegacyLoader As New LoaderTask(Of McLoginLegacy, McLoginResult)("Loader Login Legacy", AddressOf McLoginLegacyStart)
|
Public McLoginLegacyLoader As New LoaderTask(Of McLoginLegacy, McLoginResult)("Loader Login Legacy", AddressOf McLoginLegacyStart)
|
||||||
Public McLoginNideLoader As New LoaderTask(Of McLoginServer, McLoginResult)("Loader Login Nide", AddressOf McLoginServerStart) With {.ReloadTimeout = 1000 * 60 * 10}
|
Public McLoginNideLoader As New LoaderTask(Of McLoginServer, McLoginResult)("Loader Login Nide", AddressOf McLoginServerStart) With {.ReloadTimeout = 1000 * 60 * 10}
|
||||||
Public McLoginAuthLoader As New LoaderTask(Of McLoginServer, McLoginResult)("Loader Login Auth", AddressOf McLoginServerStart) With {.ReloadTimeout = 1000 * 60 * 10}
|
Public McLoginAuthLoader As New LoaderTask(Of McLoginServer, McLoginResult)("Loader Login Auth", AddressOf McLoginServerStart) With {.ReloadTimeout = 1000 * 60 * 10}
|
||||||
|
|||||||
@@ -1291,8 +1291,11 @@ OnLoaded:
|
|||||||
|
|
||||||
'单独列出收藏的版本
|
'单独列出收藏的版本
|
||||||
Dim StaredVersions As New List(Of McVersion)
|
Dim StaredVersions As New List(Of McVersion)
|
||||||
For Each Version As McVersion In VersionList
|
For Each Version As McVersion In VersionList.ToList
|
||||||
If Version.IsStar AndAlso Not Version.DisplayType = McVersionCardType.Hidden Then StaredVersions.Add(Version)
|
If Version.IsStar AndAlso Not Version.DisplayType = McVersionCardType.Hidden Then
|
||||||
|
StaredVersions.Add(Version)
|
||||||
|
VersionList.Remove(Version)
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
If StaredVersions.Any Then VersionListOriginal.Add(McVersionCardType.Star, StaredVersions)
|
If StaredVersions.Any Then VersionListOriginal.Add(McVersionCardType.Star, StaredVersions)
|
||||||
|
|
||||||
|
|||||||
@@ -688,7 +688,7 @@ Finished:
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public ReadOnly Property CanUpdate As Boolean
|
Public ReadOnly Property CanUpdate As Boolean
|
||||||
Get
|
Get
|
||||||
Return ChangelogUrls.Any()
|
Return Not Setup.Get("UiHiddenFunctionModUpdate") AndAlso ChangelogUrls.Any()
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -702,7 +702,7 @@ Finished:
|
|||||||
Dim Info As New FileInfo(Path)
|
Dim Info As New FileInfo(Path)
|
||||||
Dim CacheKey As String = GetHash($"{RawPath}-{Info.LastWriteTime.ToLongTimeString}-{Info.Length}-C")
|
Dim CacheKey As String = GetHash($"{RawPath}-{Info.LastWriteTime.ToLongTimeString}-{Info.Length}-C")
|
||||||
Dim Cached As String = ReadIni(PathTemp & "Cache\ModHash.ini", CacheKey)
|
Dim Cached As String = ReadIni(PathTemp & "Cache\ModHash.ini", CacheKey)
|
||||||
If Cached <> "" Then
|
If Cached <> "" AndAlso RegexCheck(Cached, "^\d+$") Then '#5062
|
||||||
_CurseForgeHash = Cached
|
_CurseForgeHash = Cached
|
||||||
Return _CurseForgeHash
|
Return _CurseForgeHash
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
|
Imports System.Linq.Expressions
|
||||||
|
|
||||||
Public Module ModModpack
|
Public Module ModModpack
|
||||||
|
|
||||||
@@ -9,13 +10,22 @@ Public Module ModModpack
|
|||||||
Public Sub ModpackInstall()
|
Public Sub ModpackInstall()
|
||||||
Dim File As String = SelectFile("整合包文件(*.rar;*.zip;*.mrpack)|*.rar;*.zip;*.mrpack", "选择整合包压缩文件") '选择整合包文件
|
Dim File As String = SelectFile("整合包文件(*.rar;*.zip;*.mrpack)|*.rar;*.zip;*.mrpack", "选择整合包压缩文件") '选择整合包文件
|
||||||
If String.IsNullOrEmpty(File) Then Exit Sub
|
If String.IsNullOrEmpty(File) Then Exit Sub
|
||||||
RunInThread(Sub() ModpackInstall(File))
|
RunInThread(
|
||||||
|
Sub()
|
||||||
|
Try
|
||||||
|
ModpackInstall(File)
|
||||||
|
Catch ex As CancelledException
|
||||||
|
Catch ex As Exception
|
||||||
|
Log(ex, "手动安装整合包失败", LogLevel.Msgbox)
|
||||||
|
End Try
|
||||||
|
End Sub)
|
||||||
End Sub
|
End Sub
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 安装一个给定的整合包文件,返回启动的安装加载器,如果未成功启动则返回 Nothing。
|
''' 构建并启动安装给定的整合包文件的加载器,并返回该加载器。若失败则抛出异常。
|
||||||
''' 必须在工作线程执行。
|
''' 必须在工作线程执行。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Function ModpackInstall(File As String, Optional VersionName As String = Nothing, Optional ShowHint As Boolean = True, Optional Logo As String = Nothing) As LoaderCombo(Of String)
|
''' <exception cref="CancelledException" />
|
||||||
|
Public Function ModpackInstall(File As String, Optional VersionName As String = Nothing, Optional Logo As String = Nothing) As LoaderCombo(Of String)
|
||||||
Log("[ModPack] 整合包安装请求:" & If(File, "null"))
|
Log("[ModPack] 整合包安装请求:" & If(File, "null"))
|
||||||
Dim Archive As ZipArchive = Nothing
|
Dim Archive As ZipArchive = Nothing
|
||||||
Dim ArchiveBaseFolder As String = ""
|
Dim ArchiveBaseFolder As String = ""
|
||||||
@@ -23,7 +33,7 @@ Public Module ModModpack
|
|||||||
'获取整合包种类与关键 Json
|
'获取整合包种类与关键 Json
|
||||||
Dim PackType As Integer = -1
|
Dim PackType As Integer = -1
|
||||||
Try
|
Try
|
||||||
Archive = New ZipArchive(New FileStream(File, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
Archive = New ZipArchive(New FileStream(File, FileMode.Open, FileAccess.Read, FileShare.Read))
|
||||||
'从根目录判断整合包类型
|
'从根目录判断整合包类型
|
||||||
If Archive.GetEntry("mcbbs.packmeta") IsNot Nothing Then PackType = 3 : Exit Try 'MCBBS 整合包(优先于 manifest.json 判断)
|
If Archive.GetEntry("mcbbs.packmeta") IsNot Nothing Then PackType = 3 : Exit Try 'MCBBS 整合包(优先于 manifest.json 判断)
|
||||||
If Archive.GetEntry("mmc-pack.json") IsNot Nothing Then PackType = 2 : Exit Try 'MMC 整合包(优先于 manifest.json 判断,#4194)
|
If Archive.GetEntry("mmc-pack.json") IsNot Nothing Then PackType = 2 : Exit Try 'MMC 整合包(优先于 manifest.json 判断,#4194)
|
||||||
@@ -37,11 +47,11 @@ Public Module ModModpack
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Archive.GetEntry("modpack.json") IsNot Nothing Then PackType = 1 : Exit Try 'HMCL 整合包
|
If Archive.GetEntry("modpack.json") IsNot Nothing Then PackType = 1 : Exit Try 'HMCL 整合包
|
||||||
|
If Archive.GetEntry("modpack.zip") IsNot Nothing OrElse Archive.GetEntry("modpack.mrpack") IsNot Nothing Then PackType = 9 : Exit Try '带启动器的压缩包
|
||||||
'从一级目录判断整合包类型
|
'从一级目录判断整合包类型
|
||||||
For Each Entry In Archive.Entries
|
For Each Entry In Archive.Entries
|
||||||
Dim FullNames As String() = Entry.FullName.Split("/")
|
Dim FullNames As String() = Entry.FullName.Split("/")
|
||||||
ArchiveBaseFolder = FullNames(0) & "/"
|
ArchiveBaseFolder = FullNames(0) & "/"
|
||||||
If Entry.FullName.EndsWithF("/versions/") AndAlso FullNames.Count = 3 Then PackType = 9 : Exit Try '压缩包
|
|
||||||
'确定为一级目录下
|
'确定为一级目录下
|
||||||
If FullNames.Count <> 2 Then Continue For
|
If FullNames.Count <> 2 Then Continue For
|
||||||
'判断是否为关键文件
|
'判断是否为关键文件
|
||||||
@@ -57,17 +67,15 @@ Public Module ModModpack
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If FullNames(1) = "modpack.json" Then PackType = 1 : Exit Try 'HMCL 整合包
|
If FullNames(1) = "modpack.json" Then PackType = 1 : Exit Try 'HMCL 整合包
|
||||||
|
If FullNames(1) = "modpack.zip" OrElse FullNames(1) = "modpack.mrpack" Then PackType = 9 : Exit Try '带启动器的压缩包
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If GetExceptionDetail(ex, True).Contains("Error.WinIOError") Then
|
If GetExceptionDetail(ex, True).Contains("Error.WinIOError") Then
|
||||||
Log(ex, "打开整合包文件失败", If(ShowHint, LogLevel.Hint, LogLevel.Normal))
|
Throw New Exception("打开整合包文件失败", ex)
|
||||||
Return Nothing
|
|
||||||
ElseIf File.EndsWithF(".rar", True) Then
|
ElseIf File.EndsWithF(".rar", True) Then
|
||||||
Log(ex, "PCL 无法处理 rar 格式的压缩包,请在解压后重新压缩为 zip 格式再试", If(ShowHint, LogLevel.Hint, LogLevel.Normal))
|
Throw New Exception("PCL 无法处理 rar 格式的压缩包,请在解压后重新压缩为 zip 格式再试", ex)
|
||||||
Return Nothing
|
|
||||||
Else
|
Else
|
||||||
Log(ex, "打开整合包文件失败,文件可能损坏或为不支持的压缩包格式", If(ShowHint, LogLevel.Hint, LogLevel.Normal))
|
Throw New Exception("打开整合包文件失败,文件可能损坏或为不支持的压缩包格式", ex)
|
||||||
Return Nothing
|
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
'执行对应的安装方法
|
'执行对应的安装方法
|
||||||
@@ -88,21 +96,12 @@ Public Module ModModpack
|
|||||||
Log("[ModPack] 整合包种类:Modrinth")
|
Log("[ModPack] 整合包种类:Modrinth")
|
||||||
Return InstallPackModrinth(File, Archive, ArchiveBaseFolder, VersionName, Logo)
|
Return InstallPackModrinth(File, Archive, ArchiveBaseFolder, VersionName, Logo)
|
||||||
Case 9
|
Case 9
|
||||||
Log("[ModPack] 整合包种类:压缩包")
|
Log("[ModPack] 整合包种类:带启动器的压缩包")
|
||||||
Archive.Dispose()
|
Return InstallPackLauncherPack(File, Archive, ArchiveBaseFolder)
|
||||||
Archive = Nothing
|
|
||||||
Return InstallPackCompress(File, ArchiveBaseFolder)
|
|
||||||
Case Else
|
Case Else
|
||||||
If ShowHint Then
|
Log("[ModPack] 整合包种类:未能识别,假定为压缩包")
|
||||||
Hint("未能识别该整合包的种类,无法安装!", HintType.Critical)
|
Return InstallPackCompress(File, Archive)
|
||||||
Else
|
|
||||||
Log("[ModPack] 未能识别该整合包的种类,无法安装!")
|
|
||||||
End If
|
|
||||||
Return Nothing
|
|
||||||
End Select
|
End Select
|
||||||
Catch ex As Exception
|
|
||||||
Log(ex, "准备安装整合包失败", LogLevel.Feedback)
|
|
||||||
Return Nothing
|
|
||||||
Finally
|
Finally
|
||||||
If Archive IsNot Nothing Then Archive.Dispose()
|
If Archive IsNot Nothing Then Archive.Dispose()
|
||||||
End Try
|
End Try
|
||||||
@@ -111,7 +110,7 @@ Public Module ModModpack
|
|||||||
'整合包缓存清理
|
'整合包缓存清理
|
||||||
Private IsInstallCacheCleared As Boolean = False
|
Private IsInstallCacheCleared As Boolean = False
|
||||||
Private IsInstallCacheClearing As Boolean = False
|
Private IsInstallCacheClearing As Boolean = False
|
||||||
Private Sub UnpackFiles(InstallTemp As String, FileAddress As String, Loader As LoaderBase)
|
Private Sub ExtractModpackFiles(InstallTemp As String, FileAddress As String, Loader As LoaderBase, LoaderProgressDelta As Double)
|
||||||
'清理缓存文件夹
|
'清理缓存文件夹
|
||||||
If Not IsInstallCacheCleared Then
|
If Not IsInstallCacheCleared Then
|
||||||
IsInstallCacheCleared = True
|
IsInstallCacheCleared = True
|
||||||
@@ -138,7 +137,7 @@ Public Module ModModpack
|
|||||||
Retry:
|
Retry:
|
||||||
'完全不知道为啥会出现文件正在被另一进程使用的问题,总之多试试
|
'完全不知道为啥会出现文件正在被另一进程使用的问题,总之多试试
|
||||||
DeleteDirectory(InstallTemp)
|
DeleteDirectory(InstallTemp)
|
||||||
ExtractFile(FileAddress, InstallTemp, Encode)
|
ExtractFile(FileAddress, InstallTemp, Encode, ProgressIncrementHandler:=Sub(Delta) Loader.Progress += Delta * LoaderProgressDelta)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "第 " & RetryCount & " 次解压尝试失败")
|
Log(ex, "第 " & RetryCount & " 次解压尝试失败")
|
||||||
If TypeOf ex Is ArgumentException Then
|
If TypeOf ex Is ArgumentException Then
|
||||||
@@ -151,7 +150,7 @@ Retry:
|
|||||||
RetryCount += 1
|
RetryCount += 1
|
||||||
GoTo Retry
|
GoTo Retry
|
||||||
Else
|
Else
|
||||||
Throw
|
Throw New Exception("解压整合包文件失败", ex)
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
@@ -166,20 +165,18 @@ Retry:
|
|||||||
Dim Json As JObject
|
Dim Json As JObject
|
||||||
Try
|
Try
|
||||||
Json = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "manifest.json").Open))
|
Json = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "manifest.json").Open))
|
||||||
If Json("minecraft") Is Nothing OrElse Json("minecraft")("version") Is Nothing Then Throw New Exception("整合包未提供 Minecraft 版本信息")
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "CurseForge 整合包安装信息存在问题", LogLevel.Hint)
|
Throw New Exception("CurseForge 整合包安装信息存在问题", ex)
|
||||||
Return Nothing
|
|
||||||
End Try
|
End Try
|
||||||
|
If Json("minecraft") Is Nothing OrElse Json("minecraft")("version") Is Nothing Then Throw New Exception("CurseForge 整合包未提供 Minecraft 版本信息")
|
||||||
|
|
||||||
'获取版本名
|
'获取版本名
|
||||||
Dim ShowRibble As Boolean = VersionName Is Nothing
|
|
||||||
If VersionName Is Nothing Then
|
If VersionName Is Nothing Then
|
||||||
VersionName = If(Json("name"), "")
|
VersionName = If(Json("name"), "")
|
||||||
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
||||||
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
||||||
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
||||||
If String.IsNullOrEmpty(VersionName) Then Return Nothing
|
If String.IsNullOrEmpty(VersionName) Then Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'获取 Mod API 版本信息
|
'获取 Mod API 版本信息
|
||||||
@@ -190,35 +187,19 @@ Retry:
|
|||||||
Dim Id As String = If(Entry("id"), "").ToString.ToLower
|
Dim Id As String = If(Entry("id"), "").ToString.ToLower
|
||||||
If Id.StartsWithF("forge-") Then
|
If Id.StartsWithF("forge-") Then
|
||||||
'Forge 指定
|
'Forge 指定
|
||||||
If Id.Contains("recommended") Then
|
If Id.Contains("recommended") Then Throw New Exception("该整合包版本过老,已不支持进行安装!")
|
||||||
Log("[ModPack] 该整合包版本过老,已不支持进行安装!", LogLevel.Hint)
|
Log("[ModPack] 整合包 Forge 版本:" & Id)
|
||||||
Return Nothing
|
ForgeVersion = Id.Replace("forge-", "")
|
||||||
End If
|
|
||||||
Try
|
|
||||||
Log("[ModPack] 整合包 Forge 版本:" & Id)
|
|
||||||
ForgeVersion = Id.Replace("forge-", "")
|
|
||||||
Exit For
|
|
||||||
Catch ex As Exception
|
|
||||||
Log(ex, "读取整合包 Forge 版本失败:" & Id)
|
|
||||||
End Try
|
|
||||||
ElseIf Id.StartsWithF("neoforge-") Then
|
ElseIf Id.StartsWithF("neoforge-") Then
|
||||||
'NeoForge 指定
|
'NeoForge 指定
|
||||||
Try
|
Log("[ModPack] 整合包 NeoForge 版本:" & Id)
|
||||||
Log("[ModPack] 整合包 NeoForge 版本:" & Id)
|
NeoForgeVersion = Id.Replace("neoforge-", "")
|
||||||
NeoForgeVersion = Id.Replace("neoforge-", "")
|
|
||||||
Exit For
|
|
||||||
Catch ex As Exception
|
|
||||||
Log(ex, "读取整合包 NeoForge 版本失败:" & Id)
|
|
||||||
End Try
|
|
||||||
ElseIf Id.StartsWithF("fabric-") Then
|
ElseIf Id.StartsWithF("fabric-") Then
|
||||||
'Fabric 指定
|
'Fabric 指定
|
||||||
Try
|
Log("[ModPack] 整合包 Fabric 版本:" & Id)
|
||||||
Log("[ModPack] 整合包 Fabric 版本:" & Id)
|
FabricVersion = Id.Replace("fabric-", "")
|
||||||
FabricVersion = Id.Replace("fabric-", "")
|
Else
|
||||||
Exit For
|
Log("[ModPack] 未知 Mod 加载器:" & Id)
|
||||||
Catch ex As Exception
|
|
||||||
Log(ex, "读取整合包 Fabric 版本失败:" & Id)
|
|
||||||
End Try
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'解压与配置文件
|
'解压与配置文件
|
||||||
@@ -228,17 +209,17 @@ Retry:
|
|||||||
If OverrideHome <> "" Then
|
If OverrideHome <> "" Then
|
||||||
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
||||||
Sub(Task As LoaderTask(Of String, Integer))
|
Sub(Task As LoaderTask(Of String, Integer))
|
||||||
UnpackFiles(InstallTemp, FileAddress, Task)
|
ExtractModpackFiles(InstallTemp, FileAddress, Task, 0.6)
|
||||||
Task.Progress = 0.5
|
Task.Progress = 0.6
|
||||||
Dim OverridePath As String = InstallTemp & ArchiveBaseFolder & OverrideHome
|
Dim OverridePath As String = InstallTemp & ArchiveBaseFolder & OverrideHome
|
||||||
'复制结果
|
'复制结果
|
||||||
If Directory.Exists(OverridePath) Then
|
If Directory.Exists(OverridePath) Then
|
||||||
CopyDirectory(OverridePath, PathMcFolder & "versions\" & VersionName)
|
CopyDirectory(OverridePath, PathMcFolder & "versions\" & VersionName, Sub(Delta) Task.Progress += Delta * 0.35)
|
||||||
Log($"[ModPack] 整合包 override 复制:{OverridePath} -> {PathMcFolder & "versions\" & VersionName}")
|
Log($"[ModPack] 整合包 override 复制:{OverridePath} -> {PathMcFolder & "versions\" & VersionName}")
|
||||||
Else
|
Else
|
||||||
Log($"[ModPack] 整合包中未找到 override 文件夹:{OverridePath}")
|
Log($"[ModPack] 整合包中未找到 override 文件夹:{OverridePath}")
|
||||||
End If
|
End If
|
||||||
Task.Progress = 0.9
|
Task.Progress = 0.95
|
||||||
'开启版本隔离
|
'开启版本隔离
|
||||||
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
||||||
End Sub) With {
|
End Sub) With {
|
||||||
@@ -260,9 +241,11 @@ Retry:
|
|||||||
'获取 Mod 下载信息
|
'获取 Mod 下载信息
|
||||||
ModDownloadLoaders.Add(New LoaderTask(Of Integer, JArray)("获取 Mod 下载信息",
|
ModDownloadLoaders.Add(New LoaderTask(Of Integer, JArray)("获取 Mod 下载信息",
|
||||||
Sub(Task As LoaderTask(Of Integer, JArray))
|
Sub(Task As LoaderTask(Of Integer, JArray))
|
||||||
Task.Output = GetJson(DlModRequest("https://api.curseforge.com/v1/mods/files", "POST", "{""fileIds"": [" & Join(ModList, ",") & "]}", "application/json"))("data")
|
'由于 MCIM 缺少下载信息,只使用官方源获取列表
|
||||||
|
'TODO: 在 MCIM 源稳定后回调回 DlModRequest
|
||||||
|
Task.Output = GetJson(NetRequestRetry("https://api.curseforge.com/v1/mods/files", "POST", "{""fileIds"": [" & Join(ModList, ",") & "]}", "application/json"))("data")
|
||||||
'如果文件已被删除,则 API 会跳过那一项
|
'如果文件已被删除,则 API 会跳过那一项
|
||||||
If ModList.Count > Task.Output.Count Then Throw New Exception("整合包所需要的部分 Mod 版本已被 Mod 作者删除,因此无法完成整合包安装,请联系整合包作者更新整合包中的 Mod 版本")
|
If ModList.Count > Task.Output.Count Then Throw New Exception("整合包中的部分 Mod 版本已被 Mod 作者删除,所以没法继续安装了,请向整合包作者反馈该问题")
|
||||||
End Sub) With {.ProgressWeight = ModList.Count / 10}) '每 10 Mod 需要 1s
|
End Sub) With {.ProgressWeight = ModList.Count / 10}) '每 10 Mod 需要 1s
|
||||||
'构造 NetFile
|
'构造 NetFile
|
||||||
ModDownloadLoaders.Add(New LoaderTask(Of JArray, List(Of NetFile))("构造 Mod 下载信息",
|
ModDownloadLoaders.Add(New LoaderTask(Of JArray, List(Of NetFile))("构造 Mod 下载信息",
|
||||||
@@ -320,7 +303,6 @@ Retry:
|
|||||||
.FabricVersion = FabricVersion
|
.FabricVersion = FabricVersion
|
||||||
}
|
}
|
||||||
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
||||||
If MergeLoaders Is Nothing Then Return Nothing
|
|
||||||
'构造 Libraries 加载器
|
'构造 Libraries 加载器
|
||||||
Dim LoadersLib As New List(Of LoaderBase)
|
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(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
LoadersLib.Add(New LoaderTask(Of String, List(Of NetFile))("分析游戏支持库文件(副加载器)", Sub(Task As LoaderTask(Of String, List(Of NetFile))) Task.Output = McLibFix(New McVersion(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
||||||
@@ -353,7 +335,7 @@ Retry:
|
|||||||
Dim LoaderName As String = "CurseForge 整合包安装:" & VersionName & " "
|
Dim LoaderName As String = "CurseForge 整合包安装:" & VersionName & " "
|
||||||
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
||||||
Hint("该整合包正在安装中!", HintType.Critical)
|
Hint("该整合包正在安装中!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'启动
|
'启动
|
||||||
@@ -361,7 +343,7 @@ Retry:
|
|||||||
Loader.Start(Request.TargetVersionFolder)
|
Loader.Start(Request.TargetVersionFolder)
|
||||||
LoaderTaskbarAdd(Loader)
|
LoaderTaskbarAdd(Loader)
|
||||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||||
If ShowRibble Then FrmMain.BtnExtraDownload.Ribble()
|
RunInUi(Sub() FrmMain.PageChange(FormMain.PageType.DownloadManager))
|
||||||
Return Loader
|
Return Loader
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -372,11 +354,10 @@ Retry:
|
|||||||
Dim Json As JObject
|
Dim Json As JObject
|
||||||
Try
|
Try
|
||||||
Json = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "modrinth.index.json").Open))
|
Json = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "modrinth.index.json").Open))
|
||||||
If Json("dependencies") Is Nothing OrElse Json("dependencies")("minecraft") Is Nothing Then Throw New Exception("整合包未提供 Minecraft 版本信息")
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "整合包安装信息存在问题", LogLevel.Hint)
|
Throw New Exception("Modrinth 整合包安装信息存在问题", ex)
|
||||||
Return Nothing
|
|
||||||
End Try
|
End Try
|
||||||
|
If Json("dependencies") Is Nothing OrElse Json("dependencies")("minecraft") Is Nothing Then Throw New Exception("Modrinth 整合包未提供 Minecraft 版本信息")
|
||||||
'获取 Mod API 版本信息
|
'获取 Mod API 版本信息
|
||||||
Dim MinecraftVersion As String = Nothing
|
Dim MinecraftVersion As String = Nothing
|
||||||
Dim ForgeVersion As String = Nothing
|
Dim ForgeVersion As String = Nothing
|
||||||
@@ -397,39 +378,40 @@ Retry:
|
|||||||
Log("[ModPack] 整合包 Fabric 版本:" & FabricVersion)
|
Log("[ModPack] 整合包 Fabric 版本:" & FabricVersion)
|
||||||
Case "quilt-loader" 'eg. 1.0.0
|
Case "quilt-loader" 'eg. 1.0.0
|
||||||
Hint("PCL 暂不支持安装需要 Quilt 的整合包!", HintType.Critical)
|
Hint("PCL 暂不支持安装需要 Quilt 的整合包!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
Case Else
|
Case Else
|
||||||
Hint($"无法安装整合包,其中出现了未知的 Mod 加载器 {Entry.Value}!", HintType.Critical)
|
Hint($"无法安装整合包,其中出现了未知的 Mod 加载器 {Entry.Value}!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
'获取版本名
|
'获取版本名
|
||||||
Dim ShowRibble As Boolean = VersionName Is Nothing
|
|
||||||
If VersionName Is Nothing Then
|
If VersionName Is Nothing Then
|
||||||
VersionName = If(Json("name"), "")
|
VersionName = If(Json("name"), "")
|
||||||
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
||||||
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
||||||
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
||||||
If String.IsNullOrEmpty(VersionName) Then Return Nothing
|
If String.IsNullOrEmpty(VersionName) Then Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
'解压和配置文件
|
'解压和配置文件
|
||||||
Dim InstallTemp As String = PathTemp & "PackInstall\" & RandomInteger(0, 100000) & "\"
|
Dim InstallTemp As String = PathTemp & "PackInstall\" & RandomInteger(0, 100000) & "\"
|
||||||
Dim InstallLoaders As New List(Of LoaderBase)
|
Dim InstallLoaders As New List(Of LoaderBase)
|
||||||
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
||||||
Sub(Task As LoaderTask(Of String, Integer))
|
Sub(Task As LoaderTask(Of String, Integer))
|
||||||
UnpackFiles(InstallTemp, FileAddress, Task)
|
ExtractModpackFiles(InstallTemp, FileAddress, Task, 0.6)
|
||||||
Task.Progress = 0.5
|
Task.Progress = 0.6
|
||||||
'复制 overrides 文件夹和 client-overrides 文件夹
|
'复制 overrides 文件夹和 client-overrides 文件夹
|
||||||
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "overrides") Then
|
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "overrides") Then
|
||||||
CopyDirectory(InstallTemp & ArchiveBaseFolder & "overrides", PathMcFolder & "versions\" & VersionName)
|
CopyDirectory(InstallTemp & ArchiveBaseFolder & "overrides", PathMcFolder & "versions\" & VersionName,
|
||||||
|
Sub(Delta) Task.Progress += Delta * 0.25)
|
||||||
Else
|
Else
|
||||||
Log("[ModPack] 整合包中未找到 override 目录,已跳过")
|
Log("[ModPack] 整合包中未找到 override 目录,已跳过")
|
||||||
End If
|
End If
|
||||||
Task.Progress = 0.8
|
Task.Progress = 0.85
|
||||||
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "client-overrides") Then
|
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "client-overrides") Then
|
||||||
CopyDirectory(InstallTemp & ArchiveBaseFolder & "client-overrides", PathMcFolder & "versions\" & VersionName)
|
CopyDirectory(InstallTemp & ArchiveBaseFolder & "client-overrides", PathMcFolder & "versions\" & VersionName,
|
||||||
|
Sub(Delta) Task.Progress += Delta * 0.1)
|
||||||
End If
|
End If
|
||||||
Task.Progress = 0.9
|
Task.Progress = 0.95
|
||||||
'开启版本隔离
|
'开启版本隔离
|
||||||
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
||||||
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
||||||
@@ -469,7 +451,6 @@ Retry:
|
|||||||
.FabricVersion = FabricVersion
|
.FabricVersion = FabricVersion
|
||||||
}
|
}
|
||||||
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
||||||
If MergeLoaders Is Nothing Then Return Nothing
|
|
||||||
'构造 Libraries 加载器
|
'构造 Libraries 加载器
|
||||||
Dim LoadersLib As New List(Of LoaderBase)
|
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(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
LoadersLib.Add(New LoaderTask(Of String, List(Of NetFile))("分析游戏支持库文件(副加载器)", Sub(Task As LoaderTask(Of String, List(Of NetFile))) Task.Output = McLibFix(New McVersion(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
||||||
@@ -502,7 +483,7 @@ Retry:
|
|||||||
Dim LoaderName As String = "Modrinth 整合包安装:" & VersionName & " "
|
Dim LoaderName As String = "Modrinth 整合包安装:" & VersionName & " "
|
||||||
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
||||||
Hint("该整合包正在安装中!", HintType.Critical)
|
Hint("该整合包正在安装中!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'启动
|
'启动
|
||||||
@@ -510,9 +491,8 @@ Retry:
|
|||||||
Loader.Start(Request.TargetVersionFolder)
|
Loader.Start(Request.TargetVersionFolder)
|
||||||
LoaderTaskbarAdd(Loader)
|
LoaderTaskbarAdd(Loader)
|
||||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||||
If ShowRibble Then FrmMain.BtnExtraDownload.Ribble()
|
RunInUi(Sub() FrmMain.PageChange(FormMain.PageType.DownloadManager))
|
||||||
Return Loader
|
Return Loader
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'HMCL
|
'HMCL
|
||||||
@@ -522,44 +502,39 @@ Retry:
|
|||||||
Try
|
Try
|
||||||
Json = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "modpack.json").Open, Encoding.UTF8))
|
Json = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "modpack.json").Open, Encoding.UTF8))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "整合包安装信息存在问题", LogLevel.Hint)
|
Throw New Exception("HMCL 整合包安装信息存在问题", ex)
|
||||||
Return Nothing
|
|
||||||
End Try
|
End Try
|
||||||
'获取版本名
|
'获取版本名
|
||||||
Dim VersionName As String = If(Json("name"), "")
|
Dim VersionName As String = If(Json("name"), "")
|
||||||
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
||||||
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
||||||
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
||||||
If String.IsNullOrEmpty(VersionName) Then Return Nothing
|
If String.IsNullOrEmpty(VersionName) Then Throw New CancelledException
|
||||||
'解压与配置文件
|
'解压与配置文件
|
||||||
Dim InstallTemp As String = PathTemp & "PackInstall\" & RandomInteger(0, 100000) & "\"
|
Dim InstallTemp As String = PathTemp & "PackInstall\" & RandomInteger(0, 100000) & "\"
|
||||||
Dim InstallLoaders As New List(Of LoaderBase)
|
Dim InstallLoaders As New List(Of LoaderBase)
|
||||||
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
||||||
Sub(Task As LoaderTask(Of String, Integer))
|
Sub(Task As LoaderTask(Of String, Integer))
|
||||||
UnpackFiles(InstallTemp, FileAddress, Task)
|
ExtractModpackFiles(InstallTemp, FileAddress, Task, 0.6)
|
||||||
Task.Progress = 0.5
|
Task.Progress = 0.6
|
||||||
'复制结果
|
'复制结果
|
||||||
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "minecraft") Then
|
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "minecraft") Then
|
||||||
CopyDirectory(InstallTemp & ArchiveBaseFolder & "minecraft", PathMcFolder & "versions\" & VersionName)
|
CopyDirectory(InstallTemp & ArchiveBaseFolder & "minecraft", PathMcFolder & "versions\" & VersionName, Sub(Delta) Task.Progress += Delta * 0.35)
|
||||||
Else
|
Else
|
||||||
Log("[ModPack] 整合包中未找到 minecraft override 目录,已跳过")
|
Log("[ModPack] 整合包中未找到 minecraft override 目录,已跳过")
|
||||||
End If
|
End If
|
||||||
Task.Progress = 0.9
|
Task.Progress = 0.95
|
||||||
'开启版本隔离
|
'开启版本隔离
|
||||||
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
||||||
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
||||||
'构造加载器
|
'构造加载器
|
||||||
If Json("gameVersion") Is Nothing Then
|
If Json("gameVersion") Is Nothing Then Throw New Exception("该 HMCL 整合包未提供游戏版本信息,无法安装!")
|
||||||
Hint("该整合包未提供游戏版本信息,无法安装!", HintType.Critical)
|
|
||||||
Return Nothing
|
|
||||||
End If
|
|
||||||
Dim Request As New McInstallRequest With {
|
Dim Request As New McInstallRequest With {
|
||||||
.TargetVersionName = VersionName,
|
.TargetVersionName = VersionName,
|
||||||
.TargetVersionFolder = $"{PathMcFolder}versions\{VersionName}\",
|
.TargetVersionFolder = $"{PathMcFolder}versions\{VersionName}\",
|
||||||
.MinecraftName = Json("gameVersion").ToString
|
.MinecraftName = Json("gameVersion").ToString
|
||||||
}
|
}
|
||||||
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
||||||
If MergeLoaders Is Nothing Then Return Nothing
|
|
||||||
'构造 Libraries 加载器(为了使得 Mods 下载结束后再构造,这样才会下载 JumpLoader 文件)
|
'构造 Libraries 加载器(为了使得 Mods 下载结束后再构造,这样才会下载 JumpLoader 文件)
|
||||||
Dim LoadersLib As New List(Of LoaderBase)
|
Dim LoadersLib As New List(Of LoaderBase)
|
||||||
LoadersLib.Add(New LoaderTask(Of String, String)("重命名版本 Json(副加载器)",
|
LoadersLib.Add(New LoaderTask(Of String, String)("重命名版本 Json(副加载器)",
|
||||||
@@ -589,7 +564,7 @@ Retry:
|
|||||||
Dim LoaderName As String = "HMCL 整合包安装:" & VersionName & " "
|
Dim LoaderName As String = "HMCL 整合包安装:" & VersionName & " "
|
||||||
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
||||||
Hint("该整合包正在安装中!", HintType.Critical)
|
Hint("该整合包正在安装中!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'启动
|
'启动
|
||||||
@@ -598,7 +573,7 @@ Retry:
|
|||||||
Loader.Start(Request.TargetVersionFolder)
|
Loader.Start(Request.TargetVersionFolder)
|
||||||
LoaderTaskbarAdd(Loader)
|
LoaderTaskbarAdd(Loader)
|
||||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||||
FrmMain.BtnExtraDownload.Ribble()
|
RunInUi(Sub() FrmMain.PageChange(FormMain.PageType.DownloadManager))
|
||||||
Return Loader
|
Return Loader
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -610,30 +585,29 @@ Retry:
|
|||||||
PackJson = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "mmc-pack.json").Open, Encoding.UTF8))
|
PackJson = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "mmc-pack.json").Open, Encoding.UTF8))
|
||||||
PackInstance = ReadFile(Archive.GetEntry(ArchiveBaseFolder & "instance.cfg").Open, Encoding.UTF8)
|
PackInstance = ReadFile(Archive.GetEntry(ArchiveBaseFolder & "instance.cfg").Open, Encoding.UTF8)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "整合包安装信息存在问题", LogLevel.Hint)
|
Throw New Exception("MMC 整合包安装信息存在问题", ex)
|
||||||
Return Nothing
|
|
||||||
End Try
|
End Try
|
||||||
'获取版本名
|
'获取版本名
|
||||||
Dim VersionName As String = If(RegexSeek(PackInstance, "(?<=\nname\=)[^\n]+"), "")
|
Dim VersionName As String = If(RegexSeek(PackInstance, "(?<=\nname\=)[^\n]+"), "")
|
||||||
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
||||||
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
||||||
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
||||||
If String.IsNullOrEmpty(VersionName) Then Return Nothing
|
If String.IsNullOrEmpty(VersionName) Then Throw New CancelledException
|
||||||
'解压、配置设置文件
|
'解压、配置设置文件
|
||||||
Dim InstallTemp As String = $"{PathTemp}PackInstall\{RandomInteger(0, 100000)}\"
|
Dim InstallTemp As String = $"{PathTemp}PackInstall\{RandomInteger(0, 100000)}\"
|
||||||
Dim SetupFile As String = $"{PathMcFolder}versions\{VersionName}\PCL\Setup.ini"
|
Dim SetupFile As String = $"{PathMcFolder}versions\{VersionName}\PCL\Setup.ini"
|
||||||
Dim InstallLoaders As New List(Of LoaderBase)
|
Dim InstallLoaders As New List(Of LoaderBase)
|
||||||
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
||||||
Sub(Task As LoaderTask(Of String, Integer))
|
Sub(Task As LoaderTask(Of String, Integer))
|
||||||
UnpackFiles(InstallTemp, FileAddress, Task)
|
ExtractModpackFiles(InstallTemp, FileAddress, Task, 0.6)
|
||||||
Task.Progress = 0.5
|
Task.Progress = 0.6
|
||||||
'复制结果
|
'复制结果
|
||||||
If Directory.Exists(InstallTemp & ArchiveBaseFolder & ".minecraft") Then
|
If Directory.Exists(InstallTemp & ArchiveBaseFolder & ".minecraft") Then
|
||||||
CopyDirectory(InstallTemp & ArchiveBaseFolder & ".minecraft", PathMcFolder & "versions\" & VersionName)
|
CopyDirectory(InstallTemp & ArchiveBaseFolder & ".minecraft", PathMcFolder & "versions\" & VersionName, Sub(Delta) Task.Progress += Delta * 0.35)
|
||||||
Else
|
Else
|
||||||
Log("[ModPack] 整合包中未找到 override .minecraft 目录,已跳过")
|
Log("[ModPack] 整合包中未找到 override .minecraft 目录,已跳过")
|
||||||
End If
|
End If
|
||||||
Task.Progress = 0.9
|
Task.Progress = 0.95
|
||||||
'开启版本隔离
|
'开启版本隔离
|
||||||
WriteIni(SetupFile, "VersionArgumentIndie", 1)
|
WriteIni(SetupFile, "VersionArgumentIndie", 1)
|
||||||
'读取 MMC 设置文件(#2655)
|
'读取 MMC 设置文件(#2655)
|
||||||
@@ -676,10 +650,7 @@ Retry:
|
|||||||
End Try
|
End Try
|
||||||
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
||||||
'构造版本安装请求
|
'构造版本安装请求
|
||||||
If PackJson("components") Is Nothing Then
|
If PackJson("components") Is Nothing Then Throw New Exception("该 MMC 整合包未提供游戏版本信息,无法安装!")
|
||||||
Hint("该整合包未提供游戏版本信息,无法安装!", HintType.Critical)
|
|
||||||
Return Nothing
|
|
||||||
End If
|
|
||||||
Dim Request As New McInstallRequest With {.TargetVersionName = VersionName, .TargetVersionFolder = $"{PathMcFolder}versions\{VersionName}\"}
|
Dim Request As New McInstallRequest With {.TargetVersionName = VersionName, .TargetVersionFolder = $"{PathMcFolder}versions\{VersionName}\"}
|
||||||
For Each Component In PackJson("components")
|
For Each Component In PackJson("components")
|
||||||
Select Case If(Component("uid"), "").ToString
|
Select Case If(Component("uid"), "").ToString
|
||||||
@@ -695,12 +666,11 @@ Retry:
|
|||||||
Request.FabricVersion = Component("version")
|
Request.FabricVersion = Component("version")
|
||||||
Case "org.quiltmc.quilt-loader" 'eg. 1.0.0
|
Case "org.quiltmc.quilt-loader" 'eg. 1.0.0
|
||||||
Hint("PCL 暂不支持安装需要 Quilt 的整合包!", HintType.Critical)
|
Hint("PCL 暂不支持安装需要 Quilt 的整合包!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
'构造加载器
|
'构造加载器
|
||||||
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
||||||
If MergeLoaders Is Nothing Then Return Nothing
|
|
||||||
'构造 Libraries 加载器
|
'构造 Libraries 加载器
|
||||||
Dim LoadersLib As New List(Of LoaderBase)
|
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(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
LoadersLib.Add(New LoaderTask(Of String, List(Of NetFile))("分析游戏支持库文件(副加载器)", Sub(Task As LoaderTask(Of String, List(Of NetFile))) Task.Output = McLibFix(New McVersion(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
||||||
@@ -715,7 +685,7 @@ Retry:
|
|||||||
Dim LoaderName As String = "MMC 整合包安装:" & VersionName & " "
|
Dim LoaderName As String = "MMC 整合包安装:" & VersionName & " "
|
||||||
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
||||||
Hint("该整合包正在安装中!", HintType.Critical)
|
Hint("该整合包正在安装中!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'启动
|
'启动
|
||||||
@@ -723,7 +693,7 @@ Retry:
|
|||||||
Loader.Start(Request.TargetVersionFolder)
|
Loader.Start(Request.TargetVersionFolder)
|
||||||
LoaderTaskbarAdd(Loader)
|
LoaderTaskbarAdd(Loader)
|
||||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||||
FrmMain.BtnExtraDownload.Ribble()
|
RunInUi(Sub() FrmMain.PageChange(FormMain.PageType.DownloadManager))
|
||||||
Return Loader
|
Return Loader
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -736,51 +706,44 @@ Retry:
|
|||||||
Dim Entry = If(Archive.GetEntry(ArchiveBaseFolder & "mcbbs.packmeta"), Archive.GetEntry(ArchiveBaseFolder & "manifest.json"))
|
Dim Entry = If(Archive.GetEntry(ArchiveBaseFolder & "mcbbs.packmeta"), Archive.GetEntry(ArchiveBaseFolder & "manifest.json"))
|
||||||
Json = GetJson(ReadFile(Entry.Open, Encoding.UTF8))
|
Json = GetJson(ReadFile(Entry.Open, Encoding.UTF8))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "整合包安装信息存在问题", LogLevel.Hint)
|
Throw New Exception("MCBBS 整合包安装信息存在问题", ex)
|
||||||
Return Nothing
|
|
||||||
End Try
|
End Try
|
||||||
'获取版本名
|
'获取版本名
|
||||||
Dim ShowRibble As Boolean = VersionName Is Nothing
|
|
||||||
If VersionName Is Nothing Then
|
If VersionName Is Nothing Then
|
||||||
VersionName = If(Json("name"), "")
|
VersionName = If(Json("name"), "")
|
||||||
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
||||||
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
If Validate.Validate(VersionName) <> "" Then VersionName = ""
|
||||||
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
If VersionName = "" Then VersionName = MyMsgBoxInput("输入版本名称", "", "", New ObjectModel.Collection(Of Validate) From {Validate})
|
||||||
If String.IsNullOrEmpty(VersionName) Then Return Nothing
|
If String.IsNullOrEmpty(VersionName) Then Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
'解压与配置文件
|
'解压与配置文件
|
||||||
Dim InstallTemp As String = PathTemp & "PackInstall\" & RandomInteger(0, 100000) & "\"
|
Dim InstallTemp As String = PathTemp & "PackInstall\" & RandomInteger(0, 100000) & "\"
|
||||||
Dim InstallLoaders As New List(Of LoaderBase)
|
Dim InstallLoaders As New List(Of LoaderBase)
|
||||||
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
InstallLoaders.Add(New LoaderTask(Of String, Integer)("解压整合包文件",
|
||||||
Sub(Task As LoaderTask(Of String, Integer))
|
Sub(Task As LoaderTask(Of String, Integer))
|
||||||
UnpackFiles(InstallTemp, FileAddress, Task)
|
ExtractModpackFiles(InstallTemp, FileAddress, Task, 0.6)
|
||||||
Task.Progress = 0.5
|
Task.Progress = 0.6
|
||||||
'复制结果
|
'复制结果
|
||||||
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "overrides") Then
|
If Directory.Exists(InstallTemp & ArchiveBaseFolder & "overrides") Then
|
||||||
CopyDirectory(InstallTemp & ArchiveBaseFolder & "overrides", PathMcFolder & "versions\" & VersionName)
|
CopyDirectory(InstallTemp & ArchiveBaseFolder & "overrides", PathMcFolder & "versions\" & VersionName,
|
||||||
|
Sub(Delta) Task.Progress += 0.35 * Delta)
|
||||||
Else
|
Else
|
||||||
Log("[ModPack] 整合包中未找到 overrides 目录,已跳过")
|
Log("[ModPack] 整合包中未找到 overrides 目录,已跳过")
|
||||||
End If
|
End If
|
||||||
Task.Progress = 0.9
|
Task.Progress = 0.95
|
||||||
'开启版本隔离
|
'开启版本隔离
|
||||||
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
WriteIni(PathMcFolder & "versions\" & VersionName & "\PCL\Setup.ini", "VersionArgumentIndie", 1)
|
||||||
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
End Sub) With {.ProgressWeight = New FileInfo(FileAddress).Length / 1024 / 1024 / 6, .Block = False}) '每 6M 需要 1s
|
||||||
'构造加载器
|
'构造加载器
|
||||||
If Json("addons") Is Nothing Then
|
If Json("addons") Is Nothing Then Throw New Exception("该 MCBBS 整合包未提供游戏版本附加信息,无法安装!")
|
||||||
Hint("该整合包未提供游戏版本附加信息,无法安装!", HintType.Critical)
|
|
||||||
Return Nothing
|
|
||||||
End If
|
|
||||||
Dim Addons As New Dictionary(Of String, String)
|
Dim Addons As New Dictionary(Of String, String)
|
||||||
For Each Entry In Json("addons")
|
For Each Entry In Json("addons")
|
||||||
Addons.Add(Entry("id"), Entry("version"))
|
Addons.Add(Entry("id"), Entry("version"))
|
||||||
Next
|
Next
|
||||||
If Not Addons.ContainsKey("game") Then
|
If Not Addons.ContainsKey("game") Then Throw New Exception("该 MCBBS 整合包未提供游戏版本信息,无法安装!")
|
||||||
Hint("该整合包未提供游戏版本信息,无法安装!", HintType.Critical)
|
|
||||||
Return Nothing
|
|
||||||
End If
|
|
||||||
If Addons.ContainsKey("quilt") Then
|
If Addons.ContainsKey("quilt") Then
|
||||||
Hint("PCL 暂不支持安装需要 Quilt 的整合包!", HintType.Critical)
|
Hint("PCL 暂不支持安装需要 Quilt 的整合包!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
Dim Request As New McInstallRequest With {
|
Dim Request As New McInstallRequest With {
|
||||||
.TargetVersionName = VersionName,
|
.TargetVersionName = VersionName,
|
||||||
@@ -792,7 +755,6 @@ Retry:
|
|||||||
.FabricVersion = If(Addons.ContainsKey("fabric"), Addons("fabric"), Nothing)
|
.FabricVersion = If(Addons.ContainsKey("fabric"), Addons("fabric"), Nothing)
|
||||||
}
|
}
|
||||||
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
Dim MergeLoaders As List(Of LoaderBase) = McInstallLoader(Request, True)
|
||||||
If MergeLoaders Is Nothing Then Return Nothing
|
|
||||||
'构造 Libraries 加载器
|
'构造 Libraries 加载器
|
||||||
Dim LoadersLib As New List(Of LoaderBase)
|
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(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
LoadersLib.Add(New LoaderTask(Of String, List(Of NetFile))("分析游戏支持库文件(副加载器)", Sub(Task As LoaderTask(Of String, List(Of NetFile))) Task.Output = McLibFix(New McVersion(VersionName))) With {.ProgressWeight = 1, .Show = False})
|
||||||
@@ -807,7 +769,7 @@ Retry:
|
|||||||
Dim LoaderName As String = "MCBBS 整合包安装:" & VersionName & " "
|
Dim LoaderName As String = "MCBBS 整合包安装:" & VersionName & " "
|
||||||
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
If LoaderTaskbar.Any(Function(l) l.Name = LoaderName) Then
|
||||||
Hint("该整合包正在安装中!", HintType.Critical)
|
Hint("该整合包正在安装中!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'启动
|
'启动
|
||||||
@@ -816,31 +778,101 @@ Retry:
|
|||||||
Loader.Start(Request.TargetVersionFolder)
|
Loader.Start(Request.TargetVersionFolder)
|
||||||
LoaderTaskbarAdd(Loader)
|
LoaderTaskbarAdd(Loader)
|
||||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||||
If ShowRibble Then FrmMain.BtnExtraDownload.Ribble()
|
RunInUi(Sub() FrmMain.PageChange(FormMain.PageType.DownloadManager))
|
||||||
|
Return Loader
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'带启动器的压缩包
|
||||||
|
Private Function InstallPackLauncherPack(FileAddress As String, Archive As Compression.ZipArchive, ArchiveBaseFolder As String) As LoaderCombo(Of String)
|
||||||
|
'获取解压路径
|
||||||
|
MyMsgBox("接下来请选择一个空文件夹,它会被安装到这个文件夹里。", "安装", "继续", ForceWait:=True)
|
||||||
|
Dim TargetFolder As String = SelectFolder("选择安装目标(必须是一个空文件夹)")
|
||||||
|
If String.IsNullOrEmpty(TargetFolder) Then Throw New CancelledException
|
||||||
|
If TargetFolder.Contains("!") OrElse TargetFolder.Contains(";") Then Hint("Minecraft 文件夹路径中不能含有感叹号或分号!", HintType.Critical) : Throw New CancelledException
|
||||||
|
If Directory.GetFileSystemEntries(TargetFolder).Length > 0 Then Hint("请选择一个空文件夹作为安装目标!", HintType.Critical) : Throw New CancelledException
|
||||||
|
'解压
|
||||||
|
Dim Loader As New LoaderCombo(Of String)("解压压缩包", {
|
||||||
|
New LoaderTask(Of String, Integer)("解压压缩包",
|
||||||
|
Sub(Task As LoaderTask(Of String, Integer))
|
||||||
|
ExtractModpackFiles(TargetFolder, FileAddress, Task, 0.9)
|
||||||
|
Thread.Sleep(400) '避免文件争用
|
||||||
|
'查找解压后的 exe 文件
|
||||||
|
Dim Launcher As String = Nothing
|
||||||
|
For Each ExeFile In Directory.GetFiles(TargetFolder, "*.exe", SearchOption.AllDirectories)
|
||||||
|
Dim Info = FileVersionInfo.GetVersionInfo(ExeFile)
|
||||||
|
Log($"[Modpack] 文件 {ExeFile} 的产品名标识为 {Info.ProductName}")
|
||||||
|
If Info.ProductName = "Plain Craft Launcher" Then
|
||||||
|
Launcher = ExeFile
|
||||||
|
ElseIf (Info.ProductName.ContainsF("Launcher", True) OrElse Info.ProductName.ContainsF("启动器", True)) AndAlso
|
||||||
|
Not Info.ProductName = "Plain Craft Launcher Admin Manager" Then
|
||||||
|
If Launcher Is Nothing Then Launcher = ExeFile
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Task.Progress = 0.95
|
||||||
|
'尝试使用附带的启动器打开
|
||||||
|
If Launcher IsNot Nothing Then
|
||||||
|
Log("[Modpack] 找到压缩包中附带的启动器:" & Launcher)
|
||||||
|
If MyMsgBox($"整合包中似乎自带了启动器,是否换用它继续安装?{vbCrLf}通常推荐这样做,以获得最佳体验。{vbCrLf}即将打开:{Launcher}", "换用整合包启动器?", "继续", "取消") = 1 Then
|
||||||
|
ShellOnly(Launcher, "--wait")
|
||||||
|
Log("[Modpack] 为换用整合包中的启动器启动,强制结束程序")
|
||||||
|
FrmMain.EndProgram(False)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Log("[Modpack] 未找到压缩包中附带的启动器")
|
||||||
|
End If
|
||||||
|
'加入文件夹列表
|
||||||
|
Dim VersionName As String = GetFolderNameFromPath(TargetFolder)
|
||||||
|
PageSelectLeft.AddFolder(
|
||||||
|
TargetFolder & ArchiveBaseFolder.Replace("/", "\").TrimStart("\"), '格式例如:包裹文件夹\.minecraft\(最短为空字符串)
|
||||||
|
VersionName, False)
|
||||||
|
'调用 modpack 文件进行安装
|
||||||
|
Dim ModpackFile = Directory.GetFiles(TargetFolder, "modpack.*", SearchOption.AllDirectories).First
|
||||||
|
Log("[Modpack] 调用 modpack 文件继续安装:" & ModpackFile)
|
||||||
|
ModpackInstall(ModpackFile, VersionName)
|
||||||
|
End Sub)
|
||||||
|
})
|
||||||
|
Loader.Start(TargetFolder)
|
||||||
|
LoaderTaskbarAdd(Loader)
|
||||||
|
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||||
|
FrmMain.BtnExtraDownload.Ribble()
|
||||||
Return Loader
|
Return Loader
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'普通压缩包
|
'普通压缩包
|
||||||
Private Function InstallPackCompress(FileAddress As String, ArchiveBaseFolder As String) As LoaderCombo(Of String)
|
Private Function InstallPackCompress(FileAddress As String, Archive As Compression.ZipArchive) As LoaderCombo(Of String)
|
||||||
MyMsgBox("请在接下来打开的窗口中选择安装目标文件夹,它必须是一个空文件夹。", "安装提示", "继续", ForceWait:=True)
|
'尝试定位 .minecraft 文件夹:寻找形如 “/versions/XXX/XXX.json” 的路径
|
||||||
|
Dim Match As RegularExpressions.Match = Nothing
|
||||||
|
Dim Regex As New RegularExpressions.Regex("^.*\/(?=versions\/(?<ver>[^\/]+)\/(\k<ver>)\.json$)", RegularExpressions.RegexOptions.IgnoreCase)
|
||||||
|
For Each Entry In Archive.Entries
|
||||||
|
Dim EntryMatch = Regex.Match("/" & Entry.FullName)
|
||||||
|
If EntryMatch.Success Then
|
||||||
|
Match = EntryMatch
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Match Is Nothing Then Throw New Exception("未能找到适合的文件结构,这可能不是一个 MC 压缩包") '没有匹配
|
||||||
|
Dim ArchiveBaseFolder As String = Match.Value.Replace("/", "\").TrimStart("\") '格式例如:包裹文件夹\.minecraft\(最短为空字符串)
|
||||||
|
Dim VersionName As String = Match.Groups(1).Value
|
||||||
|
Log("[ModPack] 检测到压缩包的 .minecraft 根目录:" & ArchiveBaseFolder & ",命中的版本名:" & VersionName)
|
||||||
'获取解压路径
|
'获取解压路径
|
||||||
|
MyMsgBox("接下来请选择一个空文件夹,它会被安装到这个文件夹里。", "安装", "继续", ForceWait:=True)
|
||||||
Dim TargetFolder As String = SelectFolder("选择安装目标(必须是一个空文件夹)")
|
Dim TargetFolder As String = SelectFolder("选择安装目标(必须是一个空文件夹)")
|
||||||
If String.IsNullOrEmpty(TargetFolder) Then Return Nothing
|
If String.IsNullOrEmpty(TargetFolder) Then Throw New CancelledException
|
||||||
If TargetFolder.Contains("!") OrElse TargetFolder.Contains(";") Then Hint("Minecraft 文件夹路径中不能含有感叹号或分号!", HintType.Critical) : Return Nothing
|
If TargetFolder.Contains("!") OrElse TargetFolder.Contains(";") Then Hint("Minecraft 文件夹路径中不能含有感叹号或分号!", HintType.Critical) : Throw New CancelledException
|
||||||
If Directory.GetFileSystemEntries(TargetFolder).Length > 0 Then Hint("请选择一个空文件夹作为安装目标!", HintType.Critical) : Return Nothing
|
If Directory.GetFileSystemEntries(TargetFolder).Length > 0 Then Hint("请选择一个空文件夹作为安装目标!", HintType.Critical) : Throw New CancelledException
|
||||||
'要求显示名称
|
|
||||||
Dim NewName As String = MyMsgBoxInput("输入显示名称", "输入该文件夹在左边栏列表中显示的名称。", GetFolderNameFromPath(TargetFolder),
|
|
||||||
New ObjectModel.Collection(Of Validate) From {New ValidateNullOrWhiteSpace, New ValidateLength(1, 30), New ValidateExcept({">", "|"})})
|
|
||||||
If String.IsNullOrWhiteSpace(NewName) Then Return Nothing
|
|
||||||
'解压
|
'解压
|
||||||
Dim Loader As New LoaderCombo(Of String)("安装压缩包", {
|
Dim Loader As New LoaderCombo(Of String)("解压压缩包", {
|
||||||
New LoaderTask(Of String, Integer)("安装压缩包",
|
New LoaderTask(Of String, Integer)("解压压缩包",
|
||||||
Sub()
|
Sub(Task As LoaderTask(Of String, Integer))
|
||||||
UnpackFiles(TargetFolder, FileAddress, Nothing)
|
ExtractModpackFiles(TargetFolder, FileAddress, Task, 0.95)
|
||||||
PageSelectLeft.AddFolder(TargetFolder, NewName, False) '加入文件夹列表
|
'加入文件夹列表
|
||||||
End Sub)
|
PageSelectLeft.AddFolder(TargetFolder & ArchiveBaseFolder, GetFolderNameFromPath(TargetFolder), False)
|
||||||
})
|
Thread.Sleep(400) '避免文件争用
|
||||||
Loader.Start()
|
RunInUi(Sub() FrmMain.PageChange(FormMain.PageType.VersionSelect))
|
||||||
|
End Sub)
|
||||||
|
}) With {.OnStateChanged = AddressOf McInstallState}
|
||||||
|
Loader.Start(TargetFolder)
|
||||||
LoaderTaskbarAdd(Loader)
|
LoaderTaskbarAdd(Loader)
|
||||||
FrmMain.BtnExtraDownload.ShowRefresh()
|
FrmMain.BtnExtraDownload.ShowRefresh()
|
||||||
FrmMain.BtnExtraDownload.Ribble()
|
FrmMain.BtnExtraDownload.Ribble()
|
||||||
|
|||||||
@@ -139,7 +139,6 @@
|
|||||||
Dim LocalTemp1 As String = PathTemp & "CustomEvent\" & RawFileName
|
Dim LocalTemp1 As String = PathTemp & "CustomEvent\" & RawFileName
|
||||||
Dim LocalTemp2 As String = PathTemp & "CustomEvent\" & RawFileName.Replace(".json", ".xaml")
|
Dim LocalTemp2 As String = PathTemp & "CustomEvent\" & RawFileName.Replace(".json", ".xaml")
|
||||||
Log("[Event] 转换网络资源:" & RelativeUrl & " -> " & LocalTemp1)
|
Log("[Event] 转换网络资源:" & RelativeUrl & " -> " & LocalTemp1)
|
||||||
Hint("正在获取资源,请稍候……")
|
|
||||||
Try
|
Try
|
||||||
NetDownload(RelativeUrl, LocalTemp1)
|
NetDownload(RelativeUrl, LocalTemp1)
|
||||||
NetDownload(RelativeUrl.Replace(".json", ".xaml"), LocalTemp1.Replace(".json", ".xaml"))
|
NetDownload(RelativeUrl.Replace(".json", ".xaml"), LocalTemp1.Replace(".json", ".xaml"))
|
||||||
|
|||||||
@@ -443,6 +443,10 @@ EndHint:
|
|||||||
#Region "帮助"
|
#Region "帮助"
|
||||||
|
|
||||||
Public Class HelpEntry
|
Public Class HelpEntry
|
||||||
|
''' <summary>
|
||||||
|
''' 原始信息路径。用于刷新。
|
||||||
|
''' </summary>
|
||||||
|
Public RawPath As String
|
||||||
|
|
||||||
'基础
|
'基础
|
||||||
|
|
||||||
@@ -501,6 +505,7 @@ EndHint:
|
|||||||
''' 从文件初始化 HelpEntry 对象,失败会抛出异常。
|
''' 从文件初始化 HelpEntry 对象,失败会抛出异常。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub New(FilePath As String)
|
Public Sub New(FilePath As String)
|
||||||
|
RawPath = FilePath
|
||||||
Dim JsonData As JObject = GetJson(HelpArgumentReplace(ReadFile(FilePath)))
|
Dim JsonData As JObject = GetJson(HelpArgumentReplace(ReadFile(FilePath)))
|
||||||
If JsonData Is Nothing Then Throw New FileNotFoundException("未找到帮助文件:" & FilePath, FilePath)
|
If JsonData Is Nothing Then Throw New FileNotFoundException("未找到帮助文件:" & FilePath, FilePath)
|
||||||
'加载常规信息
|
'加载常规信息
|
||||||
@@ -598,7 +603,7 @@ EndHint:
|
|||||||
'加载忽略列表
|
'加载忽略列表
|
||||||
Log("[Help] 发现 .helpignore 文件:" & File.FullName)
|
Log("[Help] 发现 .helpignore 文件:" & File.FullName)
|
||||||
For Each Line In ReadFile(File.FullName).Split(vbCrLf.ToCharArray)
|
For Each Line In ReadFile(File.FullName).Split(vbCrLf.ToCharArray)
|
||||||
Dim RealString As String = Line.Before("#").Trim
|
Dim RealString As String = Line.BeforeFirst("#").Trim
|
||||||
If String.IsNullOrWhiteSpace(RealString) Then Continue For
|
If String.IsNullOrWhiteSpace(RealString) Then Continue For
|
||||||
IgnoreList.Add(RealString)
|
IgnoreList.Add(RealString)
|
||||||
If ModeDebug Then Log("[Help] > " & RealString)
|
If ModeDebug Then Log("[Help] > " & RealString)
|
||||||
|
|||||||
@@ -51,6 +51,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
' 方法是按如下所示使用“*”
|
' 方法是按如下所示使用“*”
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.8.9.0")>
|
<Assembly: AssemblyVersion("2.8.10.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.8.9.0")>
|
<Assembly: AssemblyFileVersion("2.8.10.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("")>
|
<Assembly: NeutralResourcesLanguage("")>
|
||||||
|
|||||||
@@ -236,7 +236,15 @@ Public Module ModDownloadLib
|
|||||||
Sub(Task As LoaderTask(Of String, List(Of NetFile)))
|
Sub(Task As LoaderTask(Of String, List(Of NetFile)))
|
||||||
'分析服务端 JAR 文件下载地址
|
'分析服务端 JAR 文件下载地址
|
||||||
Dim McVersion As New McVersion(VersionFolder)
|
Dim McVersion As New McVersion(VersionFolder)
|
||||||
If McVersion.JsonObject("downloads") Is Nothing OrElse McVersion.JsonObject("downloads")("server") Is Nothing OrElse McVersion.JsonObject("downloads")("server")("url") Is Nothing Then Throw New Exception($"{Id} 版本没有提供服务端文件")
|
If McVersion.JsonObject("downloads") Is Nothing OrElse McVersion.JsonObject("downloads")("server") Is Nothing OrElse McVersion.JsonObject("downloads")("server")("url") Is Nothing Then
|
||||||
|
File.Delete(VersionFolder & Id & ".json")
|
||||||
|
If Not New DirectoryInfo(VersionFolder).GetFileSystemInfos.Any() Then Directory.Delete(VersionFolder)
|
||||||
|
Task.Output = New List(Of NetFile)
|
||||||
|
Hint($"Mojang 没有给 Minecraft {Id} 提供官方服务端下载,没法下,撤退!", HintType.Critical)
|
||||||
|
Thread.Sleep(2000) '等玩家把上一个提示看完
|
||||||
|
Task.Abort()
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
Dim JarUrl As String = McVersion.JsonObject("downloads")("server")("url")
|
Dim JarUrl As String = McVersion.JsonObject("downloads")("server")("url")
|
||||||
Dim Checker As New FileChecker(MinSize:=1024, ActualSize:=If(McVersion.JsonObject("downloads")("server")("size"), -1), Hash:=McVersion.JsonObject("downloads")("server")("sha1"))
|
Dim Checker As New FileChecker(MinSize:=1024, ActualSize:=If(McVersion.JsonObject("downloads")("server")("size"), -1), Hash:=McVersion.JsonObject("downloads")("server")("sha1"))
|
||||||
Task.Output = New List(Of NetFile) From {New NetFile(DlSourceLauncherOrMetaGet(JarUrl), VersionFolder & Id & "-server.jar", Checker)}
|
Task.Output = New List(Of NetFile) From {New NetFile(DlSourceLauncherOrMetaGet(JarUrl), VersionFolder & Id & "-server.jar", Checker)}
|
||||||
@@ -551,10 +559,12 @@ pause"
|
|||||||
Task.Progress = 0.1
|
Task.Progress = 0.1
|
||||||
Dim Sources As New List(Of String)
|
Dim Sources As New List(Of String)
|
||||||
'BMCLAPI 源
|
'BMCLAPI 源
|
||||||
|
Dim BmclapiInherit As String = DownloadInfo.Inherit
|
||||||
|
If BmclapiInherit = "1.8" OrElse BmclapiInherit = "1.9" Then BmclapiInherit &= ".0" '#4281
|
||||||
If DownloadInfo.IsPreview Then
|
If DownloadInfo.IsPreview Then
|
||||||
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & DownloadInfo.Inherit & "/HD_U_" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", "").Replace(" ", "/"))
|
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & BmclapiInherit & "/HD_U_" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", "").Replace(" ", "/"))
|
||||||
Else
|
Else
|
||||||
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & DownloadInfo.Inherit & "/HD_U/" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", ""))
|
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & BmclapiInherit & "/HD_U/" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", ""))
|
||||||
End If
|
End If
|
||||||
'官方源
|
'官方源
|
||||||
Dim PageData As String
|
Dim PageData As String
|
||||||
@@ -562,12 +572,10 @@ pause"
|
|||||||
PageData = NetGetCodeByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile, New UTF8Encoding(False), 15000, "text/html", True)
|
PageData = NetGetCodeByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile, New UTF8Encoding(False), 15000, "text/html", True)
|
||||||
Task.Progress = 0.8
|
Task.Progress = 0.8
|
||||||
Sources.Add("https://optifine.net/" & RegexSearch(PageData, "downloadx\?f=[^""']+")(0))
|
Sources.Add("https://optifine.net/" & RegexSearch(PageData, "downloadx\?f=[^""']+")(0))
|
||||||
Log("[Download] OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址:" & Sources(0))
|
Log("[Download] OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址:" & Sources.Last)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "获取 OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址失败")
|
Log(ex, "获取 OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址失败")
|
||||||
End Try
|
End Try
|
||||||
'OptiFine 中文镜像源
|
|
||||||
Sources.Add("https://optifine.cn/download/" & DownloadInfo.NameFile)
|
|
||||||
'构造文件请求
|
'构造文件请求
|
||||||
Task.Output = New List(Of NetFile) From {New NetFile(Sources.ToArray, Target, New FileChecker(MinSize:=300 * 1024))}
|
Task.Output = New List(Of NetFile) From {New NetFile(Sources.ToArray, Target, New FileChecker(MinSize:=300 * 1024))}
|
||||||
End Sub) With {.ProgressWeight = 8})
|
End Sub) With {.ProgressWeight = 8})
|
||||||
@@ -714,10 +722,12 @@ Retry:
|
|||||||
Sub(Task As LoaderTask(Of DlOptiFineListEntry, List(Of NetFile)))
|
Sub(Task As LoaderTask(Of DlOptiFineListEntry, List(Of NetFile)))
|
||||||
Dim Sources As New List(Of String)
|
Dim Sources As New List(Of String)
|
||||||
'BMCLAPI 源
|
'BMCLAPI 源
|
||||||
|
Dim BmclapiInherit As String = DownloadInfo.Inherit
|
||||||
|
If BmclapiInherit = "1.8" OrElse BmclapiInherit = "1.9" Then BmclapiInherit &= ".0" '#4281
|
||||||
If DownloadInfo.IsPreview Then
|
If DownloadInfo.IsPreview Then
|
||||||
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & DownloadInfo.Inherit & "/HD_U_" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", "").Replace(" ", "/"))
|
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & BmclapiInherit & "/HD_U_" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", "").Replace(" ", "/"))
|
||||||
Else
|
Else
|
||||||
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & DownloadInfo.Inherit & "/HD_U/" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", ""))
|
Sources.Add("https://bmclapi2.bangbang93.com/optifine/" & BmclapiInherit & "/HD_U/" & DownloadInfo.NameDisplay.Replace(DownloadInfo.Inherit & " ", ""))
|
||||||
End If
|
End If
|
||||||
'官方源
|
'官方源
|
||||||
Dim PageData As String
|
Dim PageData As String
|
||||||
@@ -725,7 +735,7 @@ Retry:
|
|||||||
PageData = NetGetCodeByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile, New UTF8Encoding(False), 15000, "text/html", True)
|
PageData = NetGetCodeByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile, New UTF8Encoding(False), 15000, "text/html", True)
|
||||||
Task.Progress = 0.8
|
Task.Progress = 0.8
|
||||||
Sources.Add("https://optifine.net/" & RegexSearch(PageData, "downloadx\?f=[^""']+")(0))
|
Sources.Add("https://optifine.net/" & RegexSearch(PageData, "downloadx\?f=[^""']+")(0))
|
||||||
Log("[Download] OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址:" & Sources(0))
|
Log("[Download] OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址:" & Sources.Last)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "获取 OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址失败")
|
Log(ex, "获取 OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址失败")
|
||||||
End Try
|
End Try
|
||||||
@@ -1248,8 +1258,8 @@ Retry:
|
|||||||
End If
|
End If
|
||||||
If Not IsNeoForge AndAlso LoaderVersion.StartsWithF("1.") AndAlso LoaderVersion.Contains("-") Then
|
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)
|
'类似 1.19.3-41.2.8 格式,优先使用 Version 中要求的版本而非 Inherit(例如 1.19.3 却使用了 1.19 的 Forge)
|
||||||
Inherit = LoaderVersion.Before("-")
|
Inherit = LoaderVersion.BeforeFirst("-")
|
||||||
LoaderVersion = LoaderVersion.After("-")
|
LoaderVersion = LoaderVersion.AfterLast("-")
|
||||||
End If
|
End If
|
||||||
Dim LoaderName As String = If(IsNeoForge, "NeoForge", "Forge")
|
Dim LoaderName As String = If(IsNeoForge, "NeoForge", "Forge")
|
||||||
Dim IsCustomFolder As Boolean = McFolder <> PathMcFolder
|
Dim IsCustomFolder As Boolean = McFolder <> PathMcFolder
|
||||||
@@ -1309,7 +1319,7 @@ Retry:
|
|||||||
Loaders.Add(New LoaderDownload($"下载 {LoaderName} 主文件", New List(Of NetFile)) With {.ProgressWeight = 9})
|
Loaders.Add(New LoaderDownload($"下载 {LoaderName} 主文件", New List(Of NetFile)) With {.ProgressWeight = 9})
|
||||||
|
|
||||||
'安装(仅在新版安装时需要原版 Jar)
|
'安装(仅在新版安装时需要原版 Jar)
|
||||||
If IsNeoForge OrElse LoaderVersion.Before(".") >= 20 Then
|
If IsNeoForge OrElse LoaderVersion.BeforeFirst(".") >= 20 Then
|
||||||
Log($"[Download] 检测为{If(IsNeoForge, " Neo", "新版 ")}Forge:" & LoaderVersion)
|
Log($"[Download] 检测为{If(IsNeoForge, " Neo", "新版 ")}Forge:" & LoaderVersion)
|
||||||
Dim Libs As List(Of McLibToken) = Nothing
|
Dim Libs As List(Of McLibToken) = Nothing
|
||||||
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))($"分析 {LoaderName} 支持库文件",
|
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))($"分析 {LoaderName} 支持库文件",
|
||||||
@@ -1331,7 +1341,7 @@ Retry:
|
|||||||
Task.Progress = 0.4
|
Task.Progress = 0.4
|
||||||
Dim RawJson As JObject = GetJson(NetGetCodeByDownload(DlSourceLauncherOrMetaGet(DlClientListGet(Inherit)), IsJson:=True))
|
Dim RawJson As JObject = GetJson(NetGetCodeByDownload(DlSourceLauncherOrMetaGet(DlClientListGet(Inherit)), IsJson:=True))
|
||||||
'[net.minecraft:client:1.17.1-20210706.113038:mappings@txt] 或 @tsrg]
|
'[net.minecraft:client:1.17.1-20210706.113038:mappings@txt] 或 @tsrg]
|
||||||
Dim OriginalName As String = Json("data")("MOJMAPS")("client").ToString.Trim("[]".ToCharArray()).Before("@")
|
Dim OriginalName As String = Json("data")("MOJMAPS")("client").ToString.Trim("[]".ToCharArray()).BeforeFirst("@")
|
||||||
Dim Address = McLibGet(OriginalName).Replace(".jar", "-mappings." & Json("data")("MOJMAPS")("client").ToString.Trim("[]".ToCharArray()).Split("@")(1))
|
Dim Address = McLibGet(OriginalName).Replace(".jar", "-mappings." & Json("data")("MOJMAPS")("client").ToString.Trim("[]".ToCharArray()).Split("@")(1))
|
||||||
Dim ClientMappings As JToken = RawJson("downloads")("client_mappings")
|
Dim ClientMappings As JToken = RawJson("downloads")("client_mappings")
|
||||||
Libs.Add(New McLibToken With {
|
Libs.Add(New McLibToken With {
|
||||||
@@ -1865,7 +1875,7 @@ Retry:
|
|||||||
Public Function FabricApiDownloadListItem(Entry As CompFile, OnClick As MyListItem.ClickEventHandler) As MyListItem
|
Public Function FabricApiDownloadListItem(Entry As CompFile, OnClick As MyListItem.ClickEventHandler) As MyListItem
|
||||||
'建立控件
|
'建立控件
|
||||||
Dim NewItem As New MyListItem With {
|
Dim NewItem As New MyListItem With {
|
||||||
.Title = Entry.DisplayName.Split("]")(1).Replace("Fabric API ", "").Replace(" build ", ".").Before("+").Trim, .SnapsToDevicePixels = True, .Height = 42, .Type = MyListItem.CheckType.Clickable, .Tag = Entry,
|
.Title = Entry.DisplayName.Split("]")(1).Replace("Fabric API ", "").Replace(" build ", ".").BeforeFirst("+").Trim, .SnapsToDevicePixels = True, .Height = 42, .Type = MyListItem.CheckType.Clickable, .Tag = Entry,
|
||||||
.Info = Entry.StatusDescription & ",发布于 " & Entry.ReleaseDate.ToString("yyyy'/'MM'/'dd HH':'mm"),
|
.Info = Entry.StatusDescription & ",发布于 " & Entry.ReleaseDate.ToString("yyyy'/'MM'/'dd HH':'mm"),
|
||||||
.Logo = PathImage & "Blocks/Fabric.png"
|
.Logo = PathImage & "Blocks/Fabric.png"
|
||||||
}
|
}
|
||||||
@@ -2030,6 +2040,8 @@ Retry:
|
|||||||
FrmMain.BtnExtraDownload.Ribble()
|
FrmMain.BtnExtraDownload.Ribble()
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
|
Catch ex As CancelledException
|
||||||
|
Return False
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "开始合并安装失败", LogLevel.Feedback)
|
Log(ex, "开始合并安装失败", LogLevel.Feedback)
|
||||||
Return False
|
Return False
|
||||||
@@ -2037,8 +2049,8 @@ Retry:
|
|||||||
End Function
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 获取合并安装加载器列表,并进行前期的缓存清理与 Java 检查工作。
|
''' 获取合并安装加载器列表,并进行前期的缓存清理与 Java 检查工作。
|
||||||
''' 如果出现已知问题且已提示用户,则返回 Nothing。出现异常则直接抛出。
|
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
''' <exception cref="CancelledException" />
|
||||||
Public Function McInstallLoader(Request As McInstallRequest, Optional DontFixLibraries As Boolean = False) As List(Of LoaderBase)
|
Public Function McInstallLoader(Request As McInstallRequest, Optional DontFixLibraries As Boolean = False) As List(Of LoaderBase)
|
||||||
'获取缓存目录
|
'获取缓存目录
|
||||||
Dim PathInstallTemp As String
|
Dim PathInstallTemp As String
|
||||||
@@ -2050,11 +2062,10 @@ Retry:
|
|||||||
|
|
||||||
'清理缓存
|
'清理缓存
|
||||||
Try
|
Try
|
||||||
If Not IsInstallTempCleared Then
|
If IsInstallTempCleared Then Exit Try
|
||||||
IsInstallTempCleared = True
|
IsInstallTempCleared = True
|
||||||
DeleteDirectory(PathInstallTemp, True)
|
DeleteDirectory(PathInstallTemp, True)
|
||||||
Log("[Download] 已清理合并安装缓存")
|
Log("[Download] 已清理合并安装缓存")
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Log(ex, "清理合并安装缓存失败")
|
Log(ex, "清理合并安装缓存失败")
|
||||||
End Try
|
End Try
|
||||||
@@ -2065,7 +2076,7 @@ Retry:
|
|||||||
If Directory.Exists(TempMcFolder) Then DeleteDirectory(TempMcFolder)
|
If Directory.Exists(TempMcFolder) Then DeleteDirectory(TempMcFolder)
|
||||||
Dim OptiFineFolder As String = Nothing
|
Dim OptiFineFolder As String = Nothing
|
||||||
If Request.OptiFineVersion IsNot Nothing Then
|
If Request.OptiFineVersion IsNot Nothing Then
|
||||||
If Request.OptiFineVersion.Contains("_HD_U_") Then Request.OptiFineVersion = "HD_U_" & Request.OptiFineVersion.After("_HD_U_") '#735
|
If Request.OptiFineVersion.Contains("_HD_U_") Then Request.OptiFineVersion = "HD_U_" & Request.OptiFineVersion.AfterLast("_HD_U_") '#735
|
||||||
Request.OptiFineEntry = New DlOptiFineListEntry With {
|
Request.OptiFineEntry = New DlOptiFineListEntry With {
|
||||||
.NameDisplay = Request.MinecraftName & " " & Request.OptiFineVersion.Replace("HD_U_", "").Replace("_", "").Replace("pre", " pre"),
|
.NameDisplay = Request.MinecraftName & " " & Request.OptiFineVersion.Replace("HD_U_", "").Replace("_", "").Replace("pre", " pre"),
|
||||||
.Inherit = Request.MinecraftName,
|
.Inherit = Request.MinecraftName,
|
||||||
@@ -2110,7 +2121,7 @@ Retry:
|
|||||||
'重复版本检查
|
'重复版本检查
|
||||||
If File.Exists(OutputFolder & Request.TargetVersionName & ".json") Then
|
If File.Exists(OutputFolder & Request.TargetVersionName & ".json") Then
|
||||||
Hint("版本 " & Request.TargetVersionName & " 已经存在!", HintType.Critical)
|
Hint("版本 " & Request.TargetVersionName & " 已经存在!", HintType.Critical)
|
||||||
Return Nothing
|
Throw New CancelledException
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim LoaderList As New List(Of LoaderBase)
|
Dim LoaderList As New List(Of LoaderBase)
|
||||||
@@ -2166,7 +2177,7 @@ Retry:
|
|||||||
End Sub) With {.ProgressWeight = 2, .Block = True})
|
End Sub) With {.ProgressWeight = 2, .Block = True})
|
||||||
'补全文件
|
'补全文件
|
||||||
If Not DontFixLibraries AndAlso
|
If Not DontFixLibraries AndAlso
|
||||||
(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
|
(Request.OptiFineEntry IsNot Nothing OrElse (Request.ForgeVersion IsNot Nothing AndAlso Request.ForgeVersion.BeforeFirst(".") >= 20) OrElse Request.NeoForgeVersion IsNot Nothing OrElse Request.FabricVersion IsNot Nothing OrElse Request.LiteLoaderEntry IsNot Nothing) Then
|
||||||
Dim LoadersLib As New List(Of LoaderBase)
|
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 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})
|
LoadersLib.Add(New LoaderDownload("下载游戏支持库文件(副加载器)", New List(Of NetFile)) With {.ProgressWeight = 7, .Show = False})
|
||||||
|
|||||||
@@ -34,41 +34,65 @@
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
'结果 UI 化
|
'结果 UI 化
|
||||||
Private Class VersionSorterWithSelect
|
Private Class CardSorter
|
||||||
Implements IComparer(Of String)
|
Implements IComparer(Of String)
|
||||||
Public Top As String = ""
|
Public Topmost As String = ""
|
||||||
Public Function Compare(x As String, y As String) As Integer Implements IComparer(Of String).Compare
|
Public Function Compare(x As String, y As String) As Integer Implements IComparer(Of String).Compare
|
||||||
|
'相同
|
||||||
If x = y Then Return 0
|
If x = y Then Return 0
|
||||||
If x = Top Then Return -1
|
'置顶
|
||||||
If y = Top Then Return 1
|
If x = Topmost Then Return -1
|
||||||
|
If y = Topmost Then Return 1
|
||||||
|
'特殊版本
|
||||||
|
Dim IsXSpecial As Boolean = x.EndsWithF("版本")
|
||||||
|
Dim IsYSpecial As Boolean = y.EndsWithF("版本")
|
||||||
|
If IsXSpecial AndAlso IsYSpecial Then Return x.CompareTo(y)
|
||||||
|
If IsXSpecial Then Return 1
|
||||||
|
If IsYSpecial Then Return -1
|
||||||
|
'比较版本号
|
||||||
|
Dim VersionCodeSort = -VersionSortInteger(x.Replace(x.BeforeFirst(" ") & " ", ""), y.Replace(y.BeforeFirst(" ") & " ", ""))
|
||||||
|
If VersionCodeSort <> 0 Then Return VersionCodeSort
|
||||||
|
'比较全部
|
||||||
Return -VersionSortInteger(x, y)
|
Return -VersionSortInteger(x, y)
|
||||||
End Function
|
End Function
|
||||||
Public Sub New(Optional Top As String = "")
|
Public Sub New(Optional Topmost As String = "")
|
||||||
Me.Top = If(Top, "")
|
Me.Topmost = If(Topmost, "")
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Private Sub Load_OnFinish()
|
Private Sub Load_OnFinish()
|
||||||
Dim TargetCardName As String = If(TargetVersion <> "" OrElse TargetLoader <> CompModLoaderType.Any,
|
Dim TargetCardName As String = If(TargetVersion <> "" OrElse TargetLoader <> CompModLoaderType.Any,
|
||||||
$"所选版本:{TargetVersion} {If(TargetLoader <> CompModLoaderType.Any, TargetLoader, "")}", "")
|
$"所选版本:{If(TargetLoader <> CompModLoaderType.Any, TargetLoader.ToString & " ", "")}{TargetVersion}", "")
|
||||||
'初始化字典
|
'初始化字典
|
||||||
Dim Dict As New SortedDictionary(Of String, List(Of CompFile))(New VersionSorterWithSelect(TargetCardName))
|
Dim Dict As New SortedDictionary(Of String, List(Of CompFile))(New CardSorter(TargetCardName))
|
||||||
Dict.Add("未知版本", New List(Of CompFile))
|
Dict.Add("未知版本", New List(Of CompFile))
|
||||||
|
Dim SupportedLoaders As New List(Of Integer)([Enum].GetValues(GetType(CompModLoaderType)))
|
||||||
For Each Version As CompFile In CompFileLoader.Output
|
For Each Version As CompFile In CompFileLoader.Output
|
||||||
For Each GameVersion In Version.GameVersions
|
For Each GameVersion In Version.GameVersions
|
||||||
'决定添加到哪个版本
|
'决定添加到哪个卡片
|
||||||
Dim TargetCard As String
|
Dim Ver As String
|
||||||
If GameVersion Is Nothing Then
|
If GameVersion Is Nothing Then
|
||||||
TargetCard = "未知版本"
|
Ver = "未知版本"
|
||||||
ElseIf GameVersion.Contains("w") OrElse GameVersion.Contains("pre") OrElse GameVersion.Contains("rc") Then
|
ElseIf GameVersion.Contains("w") OrElse GameVersion.Contains("pre") OrElse GameVersion.Contains("rc") Then
|
||||||
TargetCard = "快照版本"
|
Ver = "快照版本"
|
||||||
ElseIf GameVersion.StartsWith("1.0") Then
|
ElseIf GameVersion.StartsWithF("1.0") Then
|
||||||
TargetCard = "远古版本"
|
Ver = "远古版本"
|
||||||
Else
|
Else
|
||||||
TargetCard = GameVersion
|
Ver = GameVersion
|
||||||
End If
|
End If
|
||||||
'实际进行添加
|
'遍历加入的加载器列表
|
||||||
If Not Dict.ContainsKey(TargetCard) Then Dict.Add(TargetCard, New List(Of CompFile))
|
Dim Loaders As New List(Of String)
|
||||||
If Not Dict(TargetCard).Contains(Version) Then Dict(TargetCard).Add(Version)
|
If Project.Type = CompType.Mod Then
|
||||||
|
For Each Loader In Version.ModLoaders
|
||||||
|
If SupportedLoaders.Contains(Loader) Then Loaders.Add(Loader.ToString & " ")
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not Loaders.Any() Then Loaders.Add("") '保底加一个空的,确保它在一张卡片里
|
||||||
|
'实际添加
|
||||||
|
For Each Loader In Loaders
|
||||||
|
Dim TargetCard As String = Loader & Ver
|
||||||
|
If Not Dict.ContainsKey(TargetCard) Then Dict.Add(TargetCard, New List(Of CompFile))
|
||||||
|
If Not Dict(TargetCard).Contains(Version) Then Dict(TargetCard).Add(Version)
|
||||||
|
Next
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
'添加筛选的版本的卡片
|
'添加筛选的版本的卡片
|
||||||
@@ -170,11 +194,7 @@
|
|||||||
Dim LogoFileAddress As String = MyImage.GetTempPath(CompItem.Logo)
|
Dim LogoFileAddress As String = MyImage.GetTempPath(CompItem.Logo)
|
||||||
Loaders.Add(New LoaderDownload("下载整合包文件", New List(Of NetFile) From {File.ToNetFile(Target)}) With {.ProgressWeight = 10, .Block = True})
|
Loaders.Add(New LoaderDownload("下载整合包文件", New List(Of NetFile) From {File.ToNetFile(Target)}) With {.ProgressWeight = 10, .Block = True})
|
||||||
Loaders.Add(New LoaderTask(Of Integer, Integer)("准备安装整合包",
|
Loaders.Add(New LoaderTask(Of Integer, Integer)("准备安装整合包",
|
||||||
Sub()
|
Sub() ModpackInstall(Target, VersionName, If(IO.File.Exists(LogoFileAddress), LogoFileAddress, Nothing))) With {.ProgressWeight = 0.1})
|
||||||
If ModpackInstall(Target, VersionName, Logo:=If(IO.File.Exists(LogoFileAddress), LogoFileAddress, Nothing)) Is Nothing Then
|
|
||||||
Throw New Exception("整合包安装出现异常!")
|
|
||||||
End If
|
|
||||||
End Sub) With {.ProgressWeight = 0.1})
|
|
||||||
|
|
||||||
'启动
|
'启动
|
||||||
Dim Loader As New LoaderCombo(Of String)(LoaderName, Loaders) With {.OnStateChanged =
|
Dim Loader As New LoaderCombo(Of String)(LoaderName, Loaders) With {.OnStateChanged =
|
||||||
@@ -277,7 +297,7 @@
|
|||||||
If Project.TranslatedName = Project.RawName Then
|
If Project.TranslatedName = Project.RawName Then
|
||||||
FileName = File.FileName
|
FileName = File.FileName
|
||||||
Else
|
Else
|
||||||
Dim ChineseName As String = Project.TranslatedName.Before(" (").Before(" - ").
|
Dim ChineseName As String = Project.TranslatedName.BeforeFirst(" (").BeforeFirst(" - ").
|
||||||
Replace("\", "\").Replace("/", "/").Replace("|", "|").Replace(":", ":").Replace("<", "<").Replace(">", ">").Replace("*", "*").Replace("?", "?").Replace("""", "").Replace(": ", ":")
|
Replace("\", "\").Replace("/", "/").Replace("|", "|").Replace(":", ":").Replace("<", "<").Replace(">", ">").Replace("*", "*").Replace("?", "?").Replace("""", "").Replace(": ", ":")
|
||||||
Select Case Setup.Get("ToolDownloadTranslate")
|
Select Case Setup.Get("ToolDownloadTranslate")
|
||||||
Case 0
|
Case 0
|
||||||
|
|||||||
@@ -1076,12 +1076,12 @@
|
|||||||
If DisplayName.StartsWith("[" & MinecraftVersion & "]") Then Return True
|
If DisplayName.StartsWith("[" & MinecraftVersion & "]") Then Return True
|
||||||
If Not DisplayName.Contains("/") OrElse Not DisplayName.Contains("]") Then Return False
|
If Not DisplayName.Contains("/") OrElse Not DisplayName.Contains("]") Then Return False
|
||||||
'直接的判断(例如 1.18.1/22w03a)
|
'直接的判断(例如 1.18.1/22w03a)
|
||||||
For Each Part As String In DisplayName.Before("]").TrimStart("[").Split("/")
|
For Each Part As String In DisplayName.BeforeFirst("]").TrimStart("[").Split("/")
|
||||||
If Part = MinecraftVersion Then Return True
|
If Part = MinecraftVersion Then Return True
|
||||||
Next
|
Next
|
||||||
'将版本名分割语素(例如 1.16.4/5)
|
'将版本名分割语素(例如 1.16.4/5)
|
||||||
Dim Lefts = RegexSearch(DisplayName.Before("]"), "[a-z/]+|[0-9/]+")
|
Dim Lefts = RegexSearch(DisplayName.BeforeFirst("]"), "[a-z/]+|[0-9/]+")
|
||||||
Dim Rights = RegexSearch(MinecraftVersion.Before("]"), "[a-z/]+|[0-9/]+")
|
Dim Rights = RegexSearch(MinecraftVersion.BeforeFirst("]"), "[a-z/]+|[0-9/]+")
|
||||||
'对每段进行判断
|
'对每段进行判断
|
||||||
Dim i As Integer = 0
|
Dim i As Integer = 0
|
||||||
While True
|
While True
|
||||||
|
|||||||
@@ -2,88 +2,90 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:PCL" AnimatedControl="{Binding ElementName=PanItem, Mode=OneWay}">
|
xmlns:local="clr-namespace:PCL" AnimatedControl="{Binding ElementName=PanItem, Mode=OneWay}">
|
||||||
<StackPanel Margin="0,12,0,0" Name="PanItem">
|
<local:MyScrollViewer PanningMode="VerticalOnly" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Style="{StaticResource ScrollViewerFullMargin}">
|
||||||
|
<StackPanel Margin="0,12,0,0" Name="PanItem">
|
||||||
|
|
||||||
<TextBlock x:Name="LabGame" Text="Minecraft" Margin="13,6,5,4" Opacity="0.6" FontSize="12" />
|
<TextBlock x:Name="LabGame" Text="Minecraft" Margin="13,6,5,4" Opacity="0.6" FontSize="12" />
|
||||||
<local:MyListItem x:Name="ItemInstall" Checked="True" IsScaleAnimationEnabled="False" Type="RadioBox" Tag="1" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="自动安装"
|
<local:MyListItem x:Name="ItemInstall" Checked="True" IsScaleAnimationEnabled="False" Type="RadioBox" Tag="1" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="自动安装"
|
||||||
LogoScale="0.87" Logo="M1091.291429 0H78.935771C35.34848 0.035109 0.029257 35.354331 0 78.935771v863.331475c0 43.534629 35.401143 78.994286 78.935771 78.994285H1091.291429c43.534629 0 78.994286-35.401143 78.994285-78.994285V78.871406C1170.156983 35.319223 1134.849463 0.064366 1091.291429 0z m-8.835658 87.771429v78.754377H87.771429v-78.760229h994.684342zM87.771429 933.425737V254.232869h994.684342v679.140205H87.771429v0.058515zM724.95104 340.00896l-206.19264 547.605943a43.903269 43.903269 0 0 1-82.154057-31.012572l206.139977-547.547428a43.944229 43.944229 0 0 1 82.20672 30.954057zM369.558674 545.909029l-85.489371 85.489371 85.489371 85.542034a43.885714 43.885714 0 0 1-62.025143 62.083657l-116.554605-116.560457a43.8272 43.8272 0 0 1 0-62.025143l116.560457-116.49024a43.885714 43.885714 0 0 1 62.019291 61.966629z m610.567315-37.566172a43.885714 43.885714 0 0 1 0 62.083657l-116.560458 116.560457a43.768686 43.768686 0 0 1-62.019291 0 43.885714 43.885714 0 0 1 0-62.083657l85.547886-85.547885-85.547886-85.542035a43.897417 43.897417 0 0 1 62.083657-62.083657l116.496092 116.618972z">
|
LogoScale="0.87" Logo="M1091.291429 0H78.935771C35.34848 0.035109 0.029257 35.354331 0 78.935771v863.331475c0 43.534629 35.401143 78.994286 78.935771 78.994285H1091.291429c43.534629 0 78.994286-35.401143 78.994285-78.994285V78.871406C1170.156983 35.319223 1134.849463 0.064366 1091.291429 0z m-8.835658 87.771429v78.754377H87.771429v-78.760229h994.684342zM87.771429 933.425737V254.232869h994.684342v679.140205H87.771429v0.058515zM724.95104 340.00896l-206.19264 547.605943a43.903269 43.903269 0 0 1-82.154057-31.012572l206.139977-547.547428a43.944229 43.944229 0 0 1 82.20672 30.954057zM369.558674 545.909029l-85.489371 85.489371 85.489371 85.542034a43.885714 43.885714 0 0 1-62.025143 62.083657l-116.554605-116.560457a43.8272 43.8272 0 0 1 0-62.025143l116.560457-116.49024a43.885714 43.885714 0 0 1 62.019291 61.966629z m610.567315-37.566172a43.885714 43.885714 0 0 1 0 62.083657l-116.560458 116.560457a43.768686 43.768686 0 0 1-62.019291 0 43.885714 43.885714 0 0 1 0-62.083657l85.547886-85.547885-85.547886-85.542035a43.897417 43.897417 0 0 1 62.083657-62.083657l116.496092 116.618972z">
|
||||||
<local:MyListItem.Buttons>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<x:Array Type="{x:Type local:MyIconButton}">
|
||||||
<local:MyIconButton Tag="1" 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="1" 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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<local:MyListItem x:Name="ItemHand" IsScaleAnimationEnabled="False" Type="RadioBox" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="手动安装包"
|
<local:MyListItem x:Name="ItemHand" IsScaleAnimationEnabled="False" Type="RadioBox" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="手动安装包"
|
||||||
LogoScale="1.02" Logo="M292.693 787.627c0 30.72-24.746 55.466-55.466 55.466s-55.467-24.746-55.467-55.466 24.747-55.467 55.467-55.467c30.72-0.853 55.466 24.747 55.466 55.467z M1000.96 241.493c-2.56-5.973-4.267-11.946-6.827-17.92-0.853-6.826-4.266-12.8-8.533-17.92-7.68-9.386-18.773-15.36-31.573-15.36-6.827 0-13.654 1.707-19.627 5.12l-15.36 15.36-17.067 17.067-21.333 21.333L749.227 381.44c-14.507 14.507-38.4 14.507-52.907 0l-54.613-54.613c-14.507-14.507-14.507-38.4 0-52.907l132.266-132.267 14.507-14.506 20.48-20.48 16.213-16.214c3.414-5.973 5.12-11.946 5.12-19.626 0-12.8-5.973-24.747-16.213-32.427-5.973-4.267-11.947-6.827-18.773-7.68-5.12-2.56-10.24-4.267-16.214-5.973-36.693-12.8-76.8-19.627-117.76-19.627-7.68 0-14.506 0-22.186 0.853-188.587 11.947-337.92 168.107-337.92 360.96 0 16.214 0.853 32.427 3.413 48.64L56.32 663.04c-73.387 74.24-73.387 193.707 0 267.093l33.28 33.28c73.387 73.387 193.707 73.387 267.093 0l240.64-241.493c21.334 4.267 42.667 5.973 64 5.973 190.294 0 346.454-146.773 360.107-333.653 0.853-8.533 0.853-17.92 0.853-27.307 0.854-44.373-6.826-86.186-21.333-125.44zM658.773 639.147c-28.16 0-54.613-4.267-79.36-11.094-4.266 7.68-10.24 14.507-16.213 21.334l-258.56 258.56c-43.52 43.52-115.2 43.52-158.72 0l-29.013-29.014c-43.52-44.373-43.52-115.2 0-158.72l212.48-212.48 46.08-46.08c5.973-5.973 12.8-11.093 19.626-15.36-8.533-26.453-12.8-54.613-12.8-83.626v-1.707c0-152.747 123.734-275.627 276.48-275.627 18.774 0 37.547 1.707 55.467 5.974L597.333 207.36c-52.053 52.053-52.053 137.387 0 189.44l29.867 29.867c52.053 52.053 137.387 52.053 189.44 0L930.987 312.32c2.56 16.213 4.266 33.28 4.266 50.347 0 152.746-123.733 276.48-276.48 276.48z" />
|
LogoScale="1.02" Logo="M292.693 787.627c0 30.72-24.746 55.466-55.466 55.466s-55.467-24.746-55.467-55.466 24.747-55.467 55.467-55.467c30.72-0.853 55.466 24.747 55.466 55.467z M1000.96 241.493c-2.56-5.973-4.267-11.946-6.827-17.92-0.853-6.826-4.266-12.8-8.533-17.92-7.68-9.386-18.773-15.36-31.573-15.36-6.827 0-13.654 1.707-19.627 5.12l-15.36 15.36-17.067 17.067-21.333 21.333L749.227 381.44c-14.507 14.507-38.4 14.507-52.907 0l-54.613-54.613c-14.507-14.507-14.507-38.4 0-52.907l132.266-132.267 14.507-14.506 20.48-20.48 16.213-16.214c3.414-5.973 5.12-11.946 5.12-19.626 0-12.8-5.973-24.747-16.213-32.427-5.973-4.267-11.947-6.827-18.773-7.68-5.12-2.56-10.24-4.267-16.214-5.973-36.693-12.8-76.8-19.627-117.76-19.627-7.68 0-14.506 0-22.186 0.853-188.587 11.947-337.92 168.107-337.92 360.96 0 16.214 0.853 32.427 3.413 48.64L56.32 663.04c-73.387 74.24-73.387 193.707 0 267.093l33.28 33.28c73.387 73.387 193.707 73.387 267.093 0l240.64-241.493c21.334 4.267 42.667 5.973 64 5.973 190.294 0 346.454-146.773 360.107-333.653 0.853-8.533 0.853-17.92 0.853-27.307 0.854-44.373-6.826-86.186-21.333-125.44zM658.773 639.147c-28.16 0-54.613-4.267-79.36-11.094-4.266 7.68-10.24 14.507-16.213 21.334l-258.56 258.56c-43.52 43.52-115.2 43.52-158.72 0l-29.013-29.014c-43.52-44.373-43.52-115.2 0-158.72l212.48-212.48 46.08-46.08c5.973-5.973 12.8-11.093 19.626-15.36-8.533-26.453-12.8-54.613-12.8-83.626v-1.707c0-152.747 123.734-275.627 276.48-275.627 18.774 0 37.547 1.707 55.467 5.974L597.333 207.36c-52.053 52.053-52.053 137.387 0 189.44l29.867 29.867c52.053 52.053 137.387 52.053 189.44 0L930.987 312.32c2.56 16.213 4.266 33.28 4.266 50.347 0 152.746-123.733 276.48-276.48 276.48z" />
|
||||||
<TextBlock x:Name="LabHand" Visibility="Collapsed" Text="▼ 手动安装包" Padding="11,18,5,4" Opacity="0.6" FontSize="12" />
|
<TextBlock x:Name="LabHand" Visibility="Collapsed" Text="▼ 手动安装包" Padding="11,18,5,4" Opacity="0.6" FontSize="12" />
|
||||||
<local:MyListItem x:Name="ItemClient" Visibility="Collapsed" IsScaleAnimationEnabled="False" Type="RadioBox" Tag="4" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Minecraft"
|
<local:MyListItem x:Name="ItemClient" Visibility="Collapsed" IsScaleAnimationEnabled="False" Type="RadioBox" Tag="4" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Minecraft"
|
||||||
LogoScale="0.98" Logo="M989.7 510.8l-202.3-101c-10.8-5.4-17.7-16.5-17.7-28.6V172.7c0-26.7-16.6-50.6-41.6-59.9L550.5 46.3c-24.2-9-50.8-9-74.9 0.1l-176.9 66.8c-24.9 9.4-41.4 33.2-41.4 59.9v207.1c0 12.1-6.9 23.2-17.7 28.6l-204 101.9C13.9 521.6 0.1 543.8 0.2 568.1l0.5 226c0 23.2 12.6 44.5 32.9 55.8l223.8 124.6 1.2 0.7c18.9 10.5 41.9 10.4 60.8-0.2l2-1.1L497 873.2c9.9-5.7 22.1-5.6 32 0.1l176.7 102.5c18.9 10.7 42 10.8 61 0.3l3-1.7L992.4 851c20.4-11.3 33-32.8 33-56l-0.3-226.9c0-24.3-13.7-46.5-35.4-57.3zM321 192l115.3 46.1c27 10.8 44.7 36.9 44.7 66v163c0 5.9-6.2 9.8-11.6 7.2L339 409.5c-10.9-5.4-17.7-16.5-17.8-28.6L321 192z m-63.7 703.4L82.5 809.6c-10.9-5.4-17.9-16.5-17.9-28.7l-0.4-189.5L217.9 668c24.1 12 39.4 36.7 39.4 63.6v163.8z m64-274.3c-20.1 10.1-43.7 10-63.8 0l-0.2-0.1-149.1-75 149.1-74.4 16.8-8.4c9.2-4.6 20-4.5 29.1 0.3l18.1 9.4 129.8 64.3c5.8 2.9 6 11.1 0.2 14.2l-130 69.7z m141.9 203.8l-141.8 70.6-0.8-163.6c-0.1-27 15.1-51.8 39.2-63.9l108.8-54.5c5.3-2.7 11.6 1.2 11.6 7.1l0.8 175.6c0 12.1-6.9 23.2-17.8 28.7zM385 144l128-48 128 48-103 38.6c-16.1 6-33.8 6-49.9 0L385 144z m320 48l0.6 187.8c0 12.2-6.8 23.3-17.7 28.7l-131.4 65.7c-5.3 2.7-11.6-1.2-11.6-7.2V304.1c0-29.1 17.7-55.2 44.7-66L705 192z m0.7 710.3l-143.8-77.2c-10.4-5.6-16.9-16.4-16.9-28.2v-176c0-5.9 6.3-9.8 11.6-7.2l109.3 54.6c24 12 39.2 36.5 39.3 63.4l0.5 170.6z m-2-280.5l-129.2-70.5c-5.7-3.1-5.5-11.3 0.3-14.2l131-65.3 16.1-8.5c9.1-4.8 19.9-4.9 29.1-0.3l18.7 9.3L916.9 546l-146.2 76.4c-21.1 11-46.2 10.8-67-0.6z m66 279.4l-0.6-169.1c-0.1-27 15.1-51.7 39.3-63.8L961 592v188.7c0 11.9-6.6 22.7-17 28.3l-174.3 92.2z">
|
LogoScale="0.98" Logo="M989.7 510.8l-202.3-101c-10.8-5.4-17.7-16.5-17.7-28.6V172.7c0-26.7-16.6-50.6-41.6-59.9L550.5 46.3c-24.2-9-50.8-9-74.9 0.1l-176.9 66.8c-24.9 9.4-41.4 33.2-41.4 59.9v207.1c0 12.1-6.9 23.2-17.7 28.6l-204 101.9C13.9 521.6 0.1 543.8 0.2 568.1l0.5 226c0 23.2 12.6 44.5 32.9 55.8l223.8 124.6 1.2 0.7c18.9 10.5 41.9 10.4 60.8-0.2l2-1.1L497 873.2c9.9-5.7 22.1-5.6 32 0.1l176.7 102.5c18.9 10.7 42 10.8 61 0.3l3-1.7L992.4 851c20.4-11.3 33-32.8 33-56l-0.3-226.9c0-24.3-13.7-46.5-35.4-57.3zM321 192l115.3 46.1c27 10.8 44.7 36.9 44.7 66v163c0 5.9-6.2 9.8-11.6 7.2L339 409.5c-10.9-5.4-17.7-16.5-17.8-28.6L321 192z m-63.7 703.4L82.5 809.6c-10.9-5.4-17.9-16.5-17.9-28.7l-0.4-189.5L217.9 668c24.1 12 39.4 36.7 39.4 63.6v163.8z m64-274.3c-20.1 10.1-43.7 10-63.8 0l-0.2-0.1-149.1-75 149.1-74.4 16.8-8.4c9.2-4.6 20-4.5 29.1 0.3l18.1 9.4 129.8 64.3c5.8 2.9 6 11.1 0.2 14.2l-130 69.7z m141.9 203.8l-141.8 70.6-0.8-163.6c-0.1-27 15.1-51.8 39.2-63.9l108.8-54.5c5.3-2.7 11.6 1.2 11.6 7.1l0.8 175.6c0 12.1-6.9 23.2-17.8 28.7zM385 144l128-48 128 48-103 38.6c-16.1 6-33.8 6-49.9 0L385 144z m320 48l0.6 187.8c0 12.2-6.8 23.3-17.7 28.7l-131.4 65.7c-5.3 2.7-11.6-1.2-11.6-7.2V304.1c0-29.1 17.7-55.2 44.7-66L705 192z m0.7 710.3l-143.8-77.2c-10.4-5.6-16.9-16.4-16.9-28.2v-176c0-5.9 6.3-9.8 11.6-7.2l109.3 54.6c24 12 39.2 36.5 39.3 63.4l0.5 170.6z m-2-280.5l-129.2-70.5c-5.7-3.1-5.5-11.3 0.3-14.2l131-65.3 16.1-8.5c9.1-4.8 19.9-4.9 29.1-0.3l18.7 9.3L916.9 546l-146.2 76.4c-21.1 11-46.2 10.8-67-0.6z m66 279.4l-0.6-169.1c-0.1-27 15.1-51.7 39.3-63.8L961 592v188.7c0 11.9-6.6 22.7-17 28.3l-174.3 92.2z">
|
||||||
<!--Logo="M469.333333 213.333333V128a42.666667 42.666667 0 1 1 85.333334 0v85.333333h127.829333C847.722667 213.333333 981.333333 347.029333 981.333333 512.149333v319.936A106.496 106.496 0 0 1 874.730667 938.666667h-85.461334c-48.661333 0-107.221333-29.290667-136.469333-68.266667l-64-85.333333c-6.144-8.170667-23.957333-17.066667-34.24-17.066667h-85.12c-10.282667 0-28.096 8.896-34.24 17.066667l-64 85.333333c-29.226667 38.976-87.808 68.266667-136.469333 68.266667H149.269333A106.496 106.496 0 0 1 42.666667 832.085333V512.149333C42.666667 347.029333 176.277333 213.333333 341.504 213.333333H469.333333z m213.162667 85.333334H341.504A213.333333 213.333333 0 0 0 128 512.149333v319.936c0 11.818667 9.450667 21.248 21.269333 21.248h85.461334c21.802667 0 55.082667-16.64 68.202666-34.133333l64-85.333333c22.272-29.696 65.408-51.2 102.506667-51.2h85.12c37.098667 0 80.213333 21.504 102.506667 51.2l64 85.333333c13.12 17.493333 46.4 34.133333 68.202666 34.133333h85.461334a21.162667 21.162667 0 0 0 21.269333-21.248V512.149333A213.333333 213.333333 0 0 0 682.496 298.666667zM362.666667 469.333333h42.666666a42.666667 42.666667 0 1 1 0 85.333334h-42.666666v42.666666a42.666667 42.666667 0 1 1-85.333334 0v-42.666666h-42.666666a42.666667 42.666667 0 1 1 0-85.333334h42.666666v-42.666666a42.666667 42.666667 0 1 1 85.333334 0v42.666666z m341.333333-21.333333a42.666667 42.666667 0 1 1 0-85.333333 42.666667 42.666667 0 0 1 0 85.333333z m0 213.333333a42.666667 42.666667 0 1 1 0-85.333333 42.666667 42.666667 0 0 1 0 85.333333z m-106.666667-106.666666a42.666667 42.666667 0 1 1 0-85.333334 42.666667 42.666667 0 0 1 0 85.333334z m213.333334 0a42.666667 42.666667 0 1 1 0-85.333334 42.666667 42.666667 0 0 1 0 85.333334z">-->
|
<!--Logo="M469.333333 213.333333V128a42.666667 42.666667 0 1 1 85.333334 0v85.333333h127.829333C847.722667 213.333333 981.333333 347.029333 981.333333 512.149333v319.936A106.496 106.496 0 0 1 874.730667 938.666667h-85.461334c-48.661333 0-107.221333-29.290667-136.469333-68.266667l-64-85.333333c-6.144-8.170667-23.957333-17.066667-34.24-17.066667h-85.12c-10.282667 0-28.096 8.896-34.24 17.066667l-64 85.333333c-29.226667 38.976-87.808 68.266667-136.469333 68.266667H149.269333A106.496 106.496 0 0 1 42.666667 832.085333V512.149333C42.666667 347.029333 176.277333 213.333333 341.504 213.333333H469.333333z m213.162667 85.333334H341.504A213.333333 213.333333 0 0 0 128 512.149333v319.936c0 11.818667 9.450667 21.248 21.269333 21.248h85.461334c21.802667 0 55.082667-16.64 68.202666-34.133333l64-85.333333c22.272-29.696 65.408-51.2 102.506667-51.2h85.12c37.098667 0 80.213333 21.504 102.506667 51.2l64 85.333333c13.12 17.493333 46.4 34.133333 68.202666 34.133333h85.461334a21.162667 21.162667 0 0 0 21.269333-21.248V512.149333A213.333333 213.333333 0 0 0 682.496 298.666667zM362.666667 469.333333h42.666666a42.666667 42.666667 0 1 1 0 85.333334h-42.666666v42.666666a42.666667 42.666667 0 1 1-85.333334 0v-42.666666h-42.666666a42.666667 42.666667 0 1 1 0-85.333334h42.666666v-42.666666a42.666667 42.666667 0 1 1 85.333334 0v42.666666z m341.333333-21.333333a42.666667 42.666667 0 1 1 0-85.333333 42.666667 42.666667 0 0 1 0 85.333333z m0 213.333333a42.666667 42.666667 0 1 1 0-85.333333 42.666667 42.666667 0 0 1 0 85.333333z m-106.666667-106.666666a42.666667 42.666667 0 1 1 0-85.333334 42.666667 42.666667 0 0 1 0 85.333334z m213.333334 0a42.666667 42.666667 0 1 1 0-85.333334 42.666667 42.666667 0 0 1 0 85.333334z">-->
|
||||||
<local:MyListItem.Buttons>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<x:Array Type="{x:Type local:MyIconButton}">
|
||||||
<local:MyIconButton Tag="4" 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="4" 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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<local:MyListItem x:Name="ItemOptiFine" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="5" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="OptiFine"
|
<local:MyListItem x:Name="ItemOptiFine" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="5" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="OptiFine"
|
||||||
LogoScale="1.00" Logo="M439.667 538.133l-323.311-174.763c-6.554-3.641-13.836-5.098-20.389-5.098-23.301 0-45.147 20.389-45.147 48.788v341.516c0 35.681 18.205 67.721 48.060 83.741l323.311 174.763c6.554 3.641 13.836 5.825 20.389 5.825 23.301 0 45.147-21.117 45.147-49.516v-341.516c0-34.953-18.205-67.721-48.060-83.741zM414.909 920.427l-281.805-152.189c-4.369-2.913-9.467-9.467-9.467-19.661v-298.553l281.805 152.189c5.825 3.641 9.467 11.651 9.467 19.661v298.553zM952.304 358.274c-6.554 0-13.836 1.456-20.389 5.098l-323.311 175.491c-29.855 16.020-48.060 48.788-48.060 84.468v340.059c0 28.399 21.845 49.516 45.147 49.516 6.554 0 13.836-1.456 20.389-5.098l323.311-175.491c29.127-16.020 48.060-48.060 48.060-83.741v-341.516c0-28.399-21.845-48.788-45.147-48.788zM924.634 747.849c0 10.194-5.098 17.476-9.467 19.661l-281.805 152.917v-297.097c0-10.194 5.098-17.476 9.467-19.661l281.805-153.646v297.825zM902.060 283.272c15.292-8.010 22.574-21.845 21.117-34.953 1.456-13.836-5.825-26.943-21.117-34.953l-329.136-171.85c-14.563-8.010-31.312-11.651-48.788-11.651 0 0 0 0 0 0 0 0 0 0 0 0s-34.224 3.641-49.516 11.651l-329.865 171.122c-15.292 8.010-21.845 21.845-21.117 35.681-0.729 13.107 5.825 26.943 21.117 34.953l329.136 171.122c14.563 8.010 32.039 11.651 49.516 11.651 0 0 0 0 0.729 0 0 0 0 0 0.729 0s34.224-3.641 49.516-11.651l327.68-171.122zM523.407 393.227c-5.825 0-11.651-1.456-16.020-3.641l-272.338-141.266 272.338-141.995c4.369-2.185 10.194-3.641 16.748-3.641 5.825 0 11.651 1.456 16.020 3.641l272.338 141.995-273.067 141.266c-3.641 2.185-9.467 3.641-16.020 3.641z">
|
LogoScale="1.00" Logo="M439.667 538.133l-323.311-174.763c-6.554-3.641-13.836-5.098-20.389-5.098-23.301 0-45.147 20.389-45.147 48.788v341.516c0 35.681 18.205 67.721 48.060 83.741l323.311 174.763c6.554 3.641 13.836 5.825 20.389 5.825 23.301 0 45.147-21.117 45.147-49.516v-341.516c0-34.953-18.205-67.721-48.060-83.741zM414.909 920.427l-281.805-152.189c-4.369-2.913-9.467-9.467-9.467-19.661v-298.553l281.805 152.189c5.825 3.641 9.467 11.651 9.467 19.661v298.553zM952.304 358.274c-6.554 0-13.836 1.456-20.389 5.098l-323.311 175.491c-29.855 16.020-48.060 48.788-48.060 84.468v340.059c0 28.399 21.845 49.516 45.147 49.516 6.554 0 13.836-1.456 20.389-5.098l323.311-175.491c29.127-16.020 48.060-48.060 48.060-83.741v-341.516c0-28.399-21.845-48.788-45.147-48.788zM924.634 747.849c0 10.194-5.098 17.476-9.467 19.661l-281.805 152.917v-297.097c0-10.194 5.098-17.476 9.467-19.661l281.805-153.646v297.825zM902.060 283.272c15.292-8.010 22.574-21.845 21.117-34.953 1.456-13.836-5.825-26.943-21.117-34.953l-329.136-171.85c-14.563-8.010-31.312-11.651-48.788-11.651 0 0 0 0 0 0 0 0 0 0 0 0s-34.224 3.641-49.516 11.651l-329.865 171.122c-15.292 8.010-21.845 21.845-21.117 35.681-0.729 13.107 5.825 26.943 21.117 34.953l329.136 171.122c14.563 8.010 32.039 11.651 49.516 11.651 0 0 0 0 0.729 0 0 0 0 0 0.729 0s34.224-3.641 49.516-11.651l327.68-171.122zM523.407 393.227c-5.825 0-11.651-1.456-16.020-3.641l-272.338-141.266 272.338-141.995c4.369-2.185 10.194-3.641 16.748-3.641 5.825 0 11.651 1.456 16.020 3.641l272.338 141.995-273.067 141.266c-3.641 2.185-9.467 3.641-16.020 3.641z">
|
||||||
<!--Logo="M12 0l-11 6v12.131l11 5.869 11-5.869v-12.066l-11-6.065zm-1 21.2l-6.664-3.555 4.201-2.801c1.08-.719-.066-2.359-1.243-1.575l-4.294 2.862v-7.901l8 4.363v8.607zm-6.867-14.63l6.867-3.746v4.426c0 1.323 2 1.324 2 0v-4.415l6.91 3.811-7.905 4.218-7.872-4.294zm8.867 6.03l8-4.269v7.8l-4.263-2.842c-1.181-.785-2.323.855-1.245 1.574l4.172 2.781-6.664 3.556v-8.6z">-->
|
<!--Logo="M12 0l-11 6v12.131l11 5.869 11-5.869v-12.066l-11-6.065zm-1 21.2l-6.664-3.555 4.201-2.801c1.08-.719-.066-2.359-1.243-1.575l-4.294 2.862v-7.901l8 4.363v8.607zm-6.867-14.63l6.867-3.746v4.426c0 1.323 2 1.324 2 0v-4.415l6.91 3.811-7.905 4.218-7.872-4.294zm8.867 6.03l8-4.269v7.8l-4.263-2.842c-1.181-.785-2.323.855-1.245 1.574l4.172 2.781-6.664 3.556v-8.6z">-->
|
||||||
<local:MyListItem.Buttons>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<x:Array Type="{x:Type local:MyIconButton}">
|
||||||
<local:MyIconButton Tag="5" 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="5" 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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<local:MyListItem x:Name="ItemForge" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="6" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Forge"
|
<local:MyListItem x:Name="ItemForge" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="6" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Forge"
|
||||||
LogoScale="1.00" Logo="M402.807089 481.189274c-12.040221-6.991228-27.412326-2.797719-34.397415 9.242502l-8.387018 14.512529c-6.987135 12.035104-2.793626 27.40721 9.246595 34.392298 12.040221 6.985088 27.408233 2.797719 34.393321-9.242502l8.387018-14.511505C418.930301 503.437997 414.842193 488.063845 402.807089 481.189274L402.807089 481.189274zM495.028467 919.955342 59.056024 919.955342c-18.485003 0-33.532721 15.046694-33.532721 33.536814 0 18.485003 15.046694 33.532721 33.532721 33.532721l435.972443 0c18.49012 0 33.537837-15.046694 33.537837-33.532721C528.566304 935.002037 513.518586 919.955342 495.028467 919.955342L495.028467 919.955342zM997.431901 660.155295 590.482469 446.039729l90.935082-157.474544c18.485003-32.031531 7.520277-73.090669-24.51023-91.581812L395.496589 46.070268c-32.031531-18.485003-73.094762-7.520277-91.579765 24.51023L18.74697 564.277644c-18.485003 32.031531-7.521301 73.089645 24.51023 91.579765l261.408685 150.907988c32.031531 18.491143 73.095785 7.526417 91.581812-24.505114l91.364871-158.330028 392.332527 239.48128c16.016789 9.247618 36.544311 3.76372 45.792952-12.249999l83.838454-145.219429C1019.033895 689.930435 1013.444597 669.39882 997.431901 660.155295L997.431901 660.155295zM355.078041 719.704552c-9.242502 16.012695-29.774117 21.497617-45.787836 12.251022L105.923448 614.57826c-16.016789-9.242502-21.497617-29.774117-12.255115-45.787836l251.522524-435.653171c9.246595-16.012695 29.774117-21.497617 45.792952-12.249999l203.25624 117.376291c16.018835 9.242502 21.497617 29.774117 12.255115 45.786813L355.078041 719.704552 355.078041 719.704552zM884.568391 788.601712 522.115382 564.492538l33.537837-58.048067L934.875147 701.539844 884.568391 788.601712 884.568391 788.601712zM520.184403 277.8174c-12.040221-6.987135-27.41335-2.792603-34.399461 9.246595l-75.456552 130.702807c-6.985088 12.040221-2.791579 27.412326 9.242502 34.397415 12.040221 6.987135 27.412326 2.791579 34.397415-9.242502l75.458599-130.706901C536.307615 300.174594 532.219507 284.807604 520.184403 277.8174L520.184403 277.8174zM520.184403 277.8174">
|
LogoScale="1.00" Logo="M402.807089 481.189274c-12.040221-6.991228-27.412326-2.797719-34.397415 9.242502l-8.387018 14.512529c-6.987135 12.035104-2.793626 27.40721 9.246595 34.392298 12.040221 6.985088 27.408233 2.797719 34.393321-9.242502l8.387018-14.511505C418.930301 503.437997 414.842193 488.063845 402.807089 481.189274L402.807089 481.189274zM495.028467 919.955342 59.056024 919.955342c-18.485003 0-33.532721 15.046694-33.532721 33.536814 0 18.485003 15.046694 33.532721 33.532721 33.532721l435.972443 0c18.49012 0 33.537837-15.046694 33.537837-33.532721C528.566304 935.002037 513.518586 919.955342 495.028467 919.955342L495.028467 919.955342zM997.431901 660.155295 590.482469 446.039729l90.935082-157.474544c18.485003-32.031531 7.520277-73.090669-24.51023-91.581812L395.496589 46.070268c-32.031531-18.485003-73.094762-7.520277-91.579765 24.51023L18.74697 564.277644c-18.485003 32.031531-7.521301 73.089645 24.51023 91.579765l261.408685 150.907988c32.031531 18.491143 73.095785 7.526417 91.581812-24.505114l91.364871-158.330028 392.332527 239.48128c16.016789 9.247618 36.544311 3.76372 45.792952-12.249999l83.838454-145.219429C1019.033895 689.930435 1013.444597 669.39882 997.431901 660.155295L997.431901 660.155295zM355.078041 719.704552c-9.242502 16.012695-29.774117 21.497617-45.787836 12.251022L105.923448 614.57826c-16.016789-9.242502-21.497617-29.774117-12.255115-45.787836l251.522524-435.653171c9.246595-16.012695 29.774117-21.497617 45.792952-12.249999l203.25624 117.376291c16.018835 9.242502 21.497617 29.774117 12.255115 45.786813L355.078041 719.704552 355.078041 719.704552zM884.568391 788.601712 522.115382 564.492538l33.537837-58.048067L934.875147 701.539844 884.568391 788.601712 884.568391 788.601712zM520.184403 277.8174c-12.040221-6.987135-27.41335-2.792603-34.399461 9.246595l-75.456552 130.702807c-6.985088 12.040221-2.791579 27.412326 9.242502 34.397415 12.040221 6.987135 27.412326 2.791579 34.397415-9.242502l75.458599-130.706901C536.307615 300.174594 532.219507 284.807604 520.184403 277.8174L520.184403 277.8174zM520.184403 277.8174">
|
||||||
<!--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">-->
|
<!--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>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<x:Array Type="{x:Type local:MyIconButton}">
|
||||||
<local:MyIconButton Tag="6" 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="6" 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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<local:MyListItem x:Name="ItemNeoForge" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="7" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="NeoForge"
|
<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">
|
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>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<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" />
|
<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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<local:MyListItem x:Name="ItemFabric" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="8" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="Fabric"
|
<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">
|
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>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<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" />
|
<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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<local:MyListItem x:Name="ItemLiteLoader" Visibility="Collapsed" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="9" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="LiteLoader"
|
<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">
|
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>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<x:Array Type="{x:Type local:MyIconButton}">
|
||||||
<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" />
|
<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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<TextBlock Text="资源" Margin="13,18,5,4" Opacity="0.6" FontSize="12" />
|
<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"
|
<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">
|
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>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<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" />
|
<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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
<local:MyListItem x:Name="ItemPack" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="12" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="整合包"
|
<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">
|
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>
|
<local:MyListItem.Buttons>
|
||||||
<x:Array Type="{x:Type local:MyIconButton}">
|
<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" />
|
<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>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</local:MyScrollViewer>
|
||||||
</local:MyPageLeft>
|
</local:MyPageLeft>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Public Class PageDownloadLeft
|
Public Class PageDownloadLeft
|
||||||
|
Implements IRefreshable
|
||||||
|
|
||||||
#Region "页面切换"
|
#Region "页面切换"
|
||||||
|
|
||||||
@@ -91,7 +92,13 @@
|
|||||||
|
|
||||||
'强制刷新
|
'强制刷新
|
||||||
Public Sub Refresh(sender As Object, e As EventArgs) '由边栏按钮匿名调用
|
Public Sub Refresh(sender As Object, e As EventArgs) '由边栏按钮匿名调用
|
||||||
Select Case Val(sender.Tag)
|
Refresh(Val(sender.Tag))
|
||||||
|
End Sub
|
||||||
|
Public Sub Refresh() Implements IRefreshable.Refresh
|
||||||
|
Refresh(FrmMain.PageCurrentSub)
|
||||||
|
End Sub
|
||||||
|
Public Sub Refresh(SubType As FormMain.PageSubType)
|
||||||
|
Select Case SubType
|
||||||
Case FormMain.PageSubType.DownloadInstall
|
Case FormMain.PageSubType.DownloadInstall
|
||||||
DlClientListLoader.Start(IsForceRestart:=True)
|
DlClientListLoader.Start(IsForceRestart:=True)
|
||||||
DlOptiFineListLoader.Start(IsForceRestart:=True)
|
DlOptiFineListLoader.Start(IsForceRestart:=True)
|
||||||
|
|||||||
@@ -36,17 +36,14 @@
|
|||||||
<local:MyComboBoxItem Content="1.21.3" />
|
<local:MyComboBoxItem Content="1.21.3" />
|
||||||
<local:MyComboBoxItem Content="1.21.1" />
|
<local:MyComboBoxItem Content="1.21.1" />
|
||||||
<local:MyComboBoxItem Content="1.20.6" />
|
<local:MyComboBoxItem Content="1.20.6" />
|
||||||
<local:MyComboBoxItem Content="1.20.4" />
|
|
||||||
<local:MyComboBoxItem Content="1.20.1" />
|
<local:MyComboBoxItem Content="1.20.1" />
|
||||||
<local:MyComboBoxItem Content="1.19.4" />
|
<local:MyComboBoxItem Content="1.19.4" />
|
||||||
<local:MyComboBoxItem Content="1.19.2" />
|
<local:MyComboBoxItem Content="1.19.2" />
|
||||||
<local:MyComboBoxItem Content="1.18.2" />
|
<local:MyComboBoxItem Content="1.18.2" />
|
||||||
<local:MyComboBoxItem Content="1.17.1" />
|
<local:MyComboBoxItem Content="1.17.1" />
|
||||||
<local:MyComboBoxItem Content="1.16.5" />
|
<local:MyComboBoxItem Content="1.16.5" />
|
||||||
<local:MyComboBoxItem Content="1.15.2" />
|
|
||||||
<local:MyComboBoxItem Content="1.14.4" />
|
<local:MyComboBoxItem Content="1.14.4" />
|
||||||
<local:MyComboBoxItem Content="1.12.2" />
|
<local:MyComboBoxItem Content="1.12.2" />
|
||||||
<local:MyComboBoxItem Content="1.11.2" />
|
|
||||||
<local:MyComboBoxItem Content="1.10.2" />
|
<local:MyComboBoxItem Content="1.10.2" />
|
||||||
<local:MyComboBoxItem Content="1.8.9" />
|
<local:MyComboBoxItem Content="1.8.9" />
|
||||||
<local:MyComboBoxItem Content="1.7.10" />
|
<local:MyComboBoxItem Content="1.7.10" />
|
||||||
|
|||||||
@@ -8,14 +8,12 @@
|
|||||||
<StackPanel Orientation="Vertical" Margin="5">
|
<StackPanel Orientation="Vertical" Margin="5">
|
||||||
<local:MyCard Margin="20,20,20,0" Grid.IsSharedSizeScope="True" Title="OptiFine 简介" x:Name="CardTip">
|
<local:MyCard Margin="20,20,20,0" Grid.IsSharedSizeScope="True" Title="OptiFine 简介" x:Name="CardTip">
|
||||||
<StackPanel Margin="25,40,15,20">
|
<StackPanel Margin="25,40,15,20">
|
||||||
<TextBlock Name="LabConnect" Margin="0,0,0,11" Text="OptiFine 又名高清修复,它让你可以安装光影、使用高清材质,并且可以大幅提高游戏性能。" TextWrapping="Wrap" />
|
<TextBlock Name="LabConnect" Margin="0,0,0,11" Text="OptiFine 又称为高清修复,以允许安装光影、使用高清材质、提高游戏性能,但与 Mod 的兼容性不佳。" TextWrapping="Wrap" />
|
||||||
<Grid Height="35">
|
<Grid Height="35">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<local:MyButton x:Name="BtnChina" Grid.Column="0" MinWidth="140" Text="打开中文网" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" ColorType="Highlight" />
|
<local:MyButton x:Name="BtnWeb" Grid.Column="0" MinWidth="140" Text="打开官网" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" />
|
||||||
<local:MyButton x:Name="BtnWeb" Grid.Column="1" MinWidth="140" Text="打开官网" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</local:MyCard>
|
</local:MyCard>
|
||||||
|
|||||||
@@ -49,8 +49,5 @@
|
|||||||
Private Sub BtnWeb_Click(sender As Object, e As EventArgs) Handles BtnWeb.Click
|
Private Sub BtnWeb_Click(sender As Object, e As EventArgs) Handles BtnWeb.Click
|
||||||
OpenWebsite("https://www.optifine.net/")
|
OpenWebsite("https://www.optifine.net/")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnChina_Click(sender As Object, e As EventArgs) Handles BtnChina.Click
|
|
||||||
OpenWebsite("https://optifine.cn/home")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -35,17 +35,14 @@
|
|||||||
<local:MyComboBoxItem Content="1.21.3" />
|
<local:MyComboBoxItem Content="1.21.3" />
|
||||||
<local:MyComboBoxItem Content="1.21.1" />
|
<local:MyComboBoxItem Content="1.21.1" />
|
||||||
<local:MyComboBoxItem Content="1.20.6" />
|
<local:MyComboBoxItem Content="1.20.6" />
|
||||||
<local:MyComboBoxItem Content="1.20.4" />
|
|
||||||
<local:MyComboBoxItem Content="1.20.1" />
|
<local:MyComboBoxItem Content="1.20.1" />
|
||||||
<local:MyComboBoxItem Content="1.19.4" />
|
<local:MyComboBoxItem Content="1.19.4" />
|
||||||
<local:MyComboBoxItem Content="1.19.2" />
|
<local:MyComboBoxItem Content="1.19.2" />
|
||||||
<local:MyComboBoxItem Content="1.18.2" />
|
<local:MyComboBoxItem Content="1.18.2" />
|
||||||
<local:MyComboBoxItem Content="1.17.1" />
|
<local:MyComboBoxItem Content="1.17.1" />
|
||||||
<local:MyComboBoxItem Content="1.16.5" />
|
<local:MyComboBoxItem Content="1.16.5" />
|
||||||
<local:MyComboBoxItem Content="1.15.2" />
|
|
||||||
<local:MyComboBoxItem Content="1.14.4" />
|
<local:MyComboBoxItem Content="1.14.4" />
|
||||||
<local:MyComboBoxItem Content="1.12.2" />
|
<local:MyComboBoxItem Content="1.12.2" />
|
||||||
<local:MyComboBoxItem Content="1.11.2" />
|
|
||||||
<local:MyComboBoxItem Content="1.10.2" />
|
<local:MyComboBoxItem Content="1.10.2" />
|
||||||
<local:MyComboBoxItem Content="1.8.9" />
|
<local:MyComboBoxItem Content="1.8.9" />
|
||||||
<local:MyComboBoxItem Content="1.7.10" />
|
<local:MyComboBoxItem Content="1.7.10" />
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
<TextBlock Grid.Row="0" FontSize="23" TextTrimming="None" Foreground="{DynamicResource ColorBrush2}" HorizontalAlignment="Left" Name="LabTitle" Margin="7,-1,70,9" Text="测试标题文本" VerticalAlignment="Top" SnapsToDevicePixels="False" UseLayoutRounding="False" />
|
||||||
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
<Rectangle x:Name="ShapeLine" Grid.Row="1" Height="2" Fill="{Binding Foreground, ElementName=LabTitle}" />
|
||||||
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanCaption" Margin="0,0,0,17" Padding="7,0,15,0"
|
<my:MyScrollViewer Grid.Row="3" VerticalAlignment="Top" x:Name="PanCaption" Margin="0,0,0,17" Padding="7,0,15,0"
|
||||||
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMuity="0.7">
|
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DeltaMult="0.7">
|
||||||
<TextBlock VerticalAlignment="Top" TextTrimming="None" TextWrapping="Wrap" Name="LabCaption" FontSize="15" LineHeight="18"
|
<TextBlock VerticalAlignment="Top" TextTrimming="None" TextWrapping="Wrap" Name="LabCaption" FontSize="15" LineHeight="18"
|
||||||
Foreground="#FF5C5C5C" FontWeight="Normal" Padding="1" />
|
Foreground="#FF5C5C5C" FontWeight="Normal" Padding="1" />
|
||||||
</my:MyScrollViewer>
|
</my:MyScrollViewer>
|
||||||
|
|||||||
@@ -26,21 +26,15 @@
|
|||||||
If File.Exists(Path & "modpack.zip") Then PackInstallPath = Path & "modpack.zip"
|
If File.Exists(Path & "modpack.zip") Then PackInstallPath = Path & "modpack.zip"
|
||||||
If File.Exists(Path & "modpack.mrpack") Then PackInstallPath = Path & "modpack.mrpack"
|
If File.Exists(Path & "modpack.mrpack") Then PackInstallPath = Path & "modpack.mrpack"
|
||||||
If PackInstallPath IsNot Nothing Then
|
If PackInstallPath IsNot Nothing Then
|
||||||
If MyMsgBox($"PCL 即将在当前文件夹下自动安装整合包。", "自动安装", "继续", "取消") = 1 Then
|
Log("[Launch] 需自动安装整合包:" & PackInstallPath, LogLevel.Debug)
|
||||||
'确认自动安装
|
Setup.Set("LaunchFolderSelect", "$.minecraft\")
|
||||||
Log("[Launch] 需自动安装整合包:" & PackInstallPath, LogLevel.Debug)
|
If Not Directory.Exists(Path & ".minecraft\") Then
|
||||||
Setup.Set("LaunchFolderSelect", "$.minecraft\")
|
Directory.CreateDirectory(Path & ".minecraft\")
|
||||||
If Not Directory.Exists(Path & ".minecraft\") Then
|
Directory.CreateDirectory(Path & ".minecraft\versions\")
|
||||||
Directory.CreateDirectory(Path & ".minecraft\")
|
McFolderLauncherProfilesJsonCreate(Path & ".minecraft\")
|
||||||
Directory.CreateDirectory(Path & ".minecraft\versions\")
|
|
||||||
McFolderLauncherProfilesJsonCreate(Path & ".minecraft\")
|
|
||||||
End If
|
|
||||||
McFolderListLoader.WaitForExit(IsForceRestart:=True)
|
|
||||||
Else
|
|
||||||
'取消自动安装
|
|
||||||
Log("[Launch] 取消自动安装整合包:" & PackInstallPath, LogLevel.Debug)
|
|
||||||
PackInstallPath = Nothing
|
|
||||||
End If
|
End If
|
||||||
|
PageSelectLeft.AddFolder(Path & ".minecraft\", GetFolderNameFromPath(Path), False)
|
||||||
|
McFolderListLoader.WaitForExit()
|
||||||
End If
|
End If
|
||||||
'确认 Minecraft 文件夹存在
|
'确认 Minecraft 文件夹存在
|
||||||
PathMcFolder = Setup.Get("LaunchFolderSelect").ToString.Replace("$", Path)
|
PathMcFolder = Setup.Get("LaunchFolderSelect").ToString.Replace("$", Path)
|
||||||
@@ -58,18 +52,19 @@
|
|||||||
If Setup.Get("SystemDebugDelay") Then Thread.Sleep(RandomInteger(500, 3000))
|
If Setup.Get("SystemDebugDelay") Then Thread.Sleep(RandomInteger(500, 3000))
|
||||||
'自动整合包安装
|
'自动整合包安装
|
||||||
If PackInstallPath IsNot Nothing Then
|
If PackInstallPath IsNot Nothing Then
|
||||||
Dim InstallLoader = ModpackInstall(PackInstallPath)
|
Try
|
||||||
If InstallLoader Is Nothing Then
|
Dim InstallLoader = ModpackInstall(PackInstallPath, GetFolderNameFromPath(Path))
|
||||||
Log("[Launch] 自动安装整合包失败:" & PackInstallPath)
|
Log("[Launch] 自动安装整合包已开始:" & PackInstallPath)
|
||||||
Else
|
|
||||||
Log("[Launch] 自动安装整合包开始:" & PackInstallPath)
|
|
||||||
RunInUi(Sub() FrmMain.PageChange(FormMain.PageType.DownloadManager))
|
|
||||||
InstallLoader.WaitForExit()
|
InstallLoader.WaitForExit()
|
||||||
If InstallLoader.State = LoadState.Finished Then
|
If InstallLoader.State = LoadState.Finished Then
|
||||||
Log("[Launch] 自动安装整合包成功,删除安装包:" & PackInstallPath)
|
Log("[Launch] 自动安装整合包成功,删除安装包:" & PackInstallPath)
|
||||||
File.Delete(PackInstallPath)
|
File.Delete(PackInstallPath)
|
||||||
End If
|
End If
|
||||||
End If
|
Catch ex As CancelledException
|
||||||
|
Log(ex, "自动安装整合包被用户取消:" & PackInstallPath)
|
||||||
|
Catch ex As Exception
|
||||||
|
Log(ex, "自动安装整合包失败:" & PackInstallPath, LogLevel.Msgbox)
|
||||||
|
End Try
|
||||||
End If
|
End If
|
||||||
'确认 Minecraft 版本存在
|
'确认 Minecraft 版本存在
|
||||||
Dim Selection As String = Setup.Get("LaunchVersionSelect")
|
Dim Selection As String = Setup.Get("LaunchVersionSelect")
|
||||||
@@ -431,7 +426,7 @@ Finish:
|
|||||||
ElseIf Setup.Get("LoginLegacyName") = "" Then
|
ElseIf Setup.Get("LoginLegacyName") = "" Then
|
||||||
Return New EqualableList(Of String) From {0, ""}
|
Return New EqualableList(Of String) From {0, ""}
|
||||||
Else
|
Else
|
||||||
Return New EqualableList(Of String) From {0, If(Setup.Get("LoginLegacyName").ToString.Before("¨"), "")}
|
Return New EqualableList(Of String) From {0, If(Setup.Get("LoginLegacyName").ToString.BeforeFirst("¨"), "")}
|
||||||
End If
|
End If
|
||||||
Case 3
|
Case 3
|
||||||
Return New EqualableList(Of String) From {3, Setup.Get("LaunchSkinID")}
|
Return New EqualableList(Of String) From {3, Setup.Get("LaunchSkinID")}
|
||||||
|
|||||||
@@ -22,4 +22,4 @@
|
|||||||
</local:MyCard>
|
</local:MyCard>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</local:MyScrollViewer>
|
</local:MyScrollViewer>
|
||||||
</local:MyPageRight>
|
</local:MyPageRight>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
Public Class PageLaunchRight
|
Public Class PageLaunchRight
|
||||||
|
Implements IRefreshable
|
||||||
|
|
||||||
Private Sub Init() Handles Me.Loaded
|
Private Sub Init() Handles Me.Loaded
|
||||||
PanBack.ScrollToHome()
|
PanBack.ScrollToHome()
|
||||||
@@ -26,12 +27,6 @@
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 刷新自定义主页。
|
''' 刷新自定义主页。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Private Sub PressF5(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
|
||||||
If e.Key = Key.F5 Then
|
|
||||||
ForceRefresh()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub Refresh() Handles Me.Loaded
|
Private Sub Refresh() Handles Me.Loaded
|
||||||
RunInNewThread(
|
RunInNewThread(
|
||||||
Sub()
|
Sub()
|
||||||
@@ -98,7 +93,7 @@ Download:
|
|||||||
GoTo Download
|
GoTo Download
|
||||||
Case 3
|
Case 3
|
||||||
Log("[Page] 主页预设:简单主页")
|
Log("[Page] 主页预设:简单主页")
|
||||||
Url = "https://gitee.com/mfn233/PCL-Mainpage/raw/main/Custom.xaml"
|
Url = "https://raw.gitcode.com/mfn233/PCL-Mainpage/raw/main/Custom.xaml"
|
||||||
GoTo Download
|
GoTo Download
|
||||||
Case 4
|
Case 4
|
||||||
Log("[Page] 主页预设:每日整合包推荐")
|
Log("[Page] 主页预设:每日整合包推荐")
|
||||||
@@ -122,7 +117,7 @@ Download:
|
|||||||
GoTo Download
|
GoTo Download
|
||||||
Case 9
|
Case 9
|
||||||
Log("[Page] 主页预设:PCL 新功能说明书")
|
Log("[Page] 主页预设:PCL 新功能说明书")
|
||||||
Url = "https://gitee.com/wforstbreeze/whats-new-pcl/raw/main/Custom.xaml"
|
Url = "https://raw.gitcode.com/WForst-Breeze/WhatsNewPCL/raw/main/Custom.xaml"
|
||||||
GoTo Download
|
GoTo Download
|
||||||
Case 10
|
Case 10
|
||||||
Log("[Page] 主页预设:OpenMCIM Dashboard")
|
Log("[Page] 主页预设:OpenMCIM Dashboard")
|
||||||
@@ -144,10 +139,10 @@ Download:
|
|||||||
If Address.Contains(".xaml") Then
|
If Address.Contains(".xaml") Then
|
||||||
VersionAddress = Address.Replace(".xaml", ".xaml.ini")
|
VersionAddress = Address.Replace(".xaml", ".xaml.ini")
|
||||||
Else
|
Else
|
||||||
VersionAddress = Address.Before("?")
|
VersionAddress = Address.BeforeFirst("?")
|
||||||
If Not VersionAddress.EndsWith("/") Then VersionAddress += "/"
|
If Not VersionAddress.EndsWith("/") Then VersionAddress += "/"
|
||||||
VersionAddress += "version"
|
VersionAddress += "version"
|
||||||
If Address.Contains("?") Then VersionAddress += Address.After("?")
|
If Address.Contains("?") Then VersionAddress += Address.AfterLast("?")
|
||||||
End If
|
End If
|
||||||
'校验版本
|
'校验版本
|
||||||
Dim Version As String = ""
|
Dim Version As String = ""
|
||||||
@@ -189,7 +184,7 @@ Download:
|
|||||||
''' 立即强制刷新自定义主页。
|
''' 立即强制刷新自定义主页。
|
||||||
''' 必须在 UI 线程调用。
|
''' 必须在 UI 线程调用。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub ForceRefresh()
|
Public Sub ForceRefresh() Implements IRefreshable.Refresh
|
||||||
Log("[Page] 要求强制刷新自定义主页")
|
Log("[Page] 要求强制刷新自定义主页")
|
||||||
ClearCache()
|
ClearCache()
|
||||||
'实际的刷新
|
'实际的刷新
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
ComboName.ItemsSource = Nothing
|
ComboName.ItemsSource = Nothing
|
||||||
Else
|
Else
|
||||||
ComboName.ItemsSource = Setup.Get("LoginAuthEmail").ToString.Split("¨")
|
ComboName.ItemsSource = Setup.Get("LoginAuthEmail").ToString.Split("¨")
|
||||||
ComboName.Text = Setup.Get("LoginAuthEmail").ToString.Before("¨")
|
ComboName.Text = Setup.Get("LoginAuthEmail").ToString.BeforeFirst("¨")
|
||||||
If Setup.Get("LoginRemember") Then TextPass.Password = Setup.Get("LoginAuthPass").ToString.Before("¨").Trim
|
If Setup.Get("LoginRemember") Then TextPass.Password = Setup.Get("LoginAuthPass").ToString.BeforeFirst("¨").Trim
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
IsFirstLoad = False
|
IsFirstLoad = False
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Public Class PageLoginLegacy
|
|||||||
ComboName.ItemsSource = Nothing
|
ComboName.ItemsSource = Nothing
|
||||||
Else
|
Else
|
||||||
ComboName.ItemsSource = Setup.Get("LoginLegacyName").ToString.Split("¨")
|
ComboName.ItemsSource = Setup.Get("LoginLegacyName").ToString.Split("¨")
|
||||||
ComboName.Text = Setup.Get("LoginLegacyName").ToString.Before("¨").Trim
|
ComboName.Text = Setup.Get("LoginLegacyName").ToString.BeforeFirst("¨").Trim
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
IsReloaded = True
|
IsReloaded = True
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
ComboName.ItemsSource = Nothing
|
ComboName.ItemsSource = Nothing
|
||||||
Else
|
Else
|
||||||
ComboName.ItemsSource = Setup.Get("LoginNideEmail").ToString.Split("¨")
|
ComboName.ItemsSource = Setup.Get("LoginNideEmail").ToString.Split("¨")
|
||||||
ComboName.Text = Setup.Get("LoginNideEmail").ToString.Before("¨")
|
ComboName.Text = Setup.Get("LoginNideEmail").ToString.BeforeFirst("¨")
|
||||||
If Setup.Get("LoginRemember") Then TextPass.Password = Setup.Get("LoginNidePass").ToString.Before("¨").Trim
|
If Setup.Get("LoginRemember") Then TextPass.Password = Setup.Get("LoginNidePass").ToString.BeforeFirst("¨").Trim
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
IsFirstLoad = False
|
IsFirstLoad = False
|
||||||
|
|||||||
@@ -104,108 +104,126 @@
|
|||||||
</local:MyCard>
|
</local:MyCard>
|
||||||
<local:MyCard Margin="0,0,0,15" Title="赞助者">
|
<local:MyCard Margin="0,0,0,15" Title="赞助者">
|
||||||
<StackPanel Margin="25,40,10,20">
|
<StackPanel Margin="25,40,10,20">
|
||||||
<TextBlock HorizontalAlignment="Left" Text="以下是 2024 年 9 月的高级赞助者们!感谢各位对 PCL 和伟大的咕咕咕事业的支持!" Margin="0,0,25,5.5" TextTrimming="None" TextWrapping="WrapWithOverflow" />
|
<TextBlock HorizontalAlignment="Left" Text="以下是 2024 年 10 月的高级赞助者们!感谢各位对 PCL 和伟大的咕咕咕事业的支持!" Margin="0,0,25,5.5" TextTrimming="None" TextWrapping="WrapWithOverflow" />
|
||||||
<WrapPanel Margin="0,0,0,10">
|
<WrapPanel Margin="0,0,0,10">
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="花卉" />
|
<TextBlock Width="120" Margin="0,1.5" Text="枫星Maplestar" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="hmmmfffll" />
|
<TextBlock Width="120" Margin="0,1.5" Text="52Mirai" />
|
||||||
<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="ulifx" />
|
<TextBlock Width="120" Margin="0,1.5" Text="羽惜天麟" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="DXX" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Dune" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="小曲" />
|
<TextBlock Width="120" Margin="0,1.5" Text="流萤天下第一" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="0飞霜墨染0" />
|
<TextBlock Width="120" Margin="0,1.5" Text="展望" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="Aminos1337" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Masker" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="死亡旋风大魔王" />
|
<TextBlock Width="120" Margin="0,1.5" Text="at" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="风见翎" />
|
<TextBlock Width="120" Margin="0,1.5" Text="xxkundddd" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="水阔鱼" />
|
<TextBlock Width="120" Margin="0,1.5" Text="bigdaddyeges" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="无名氏" />
|
<TextBlock Width="120" Margin="0,1.5" Text="梦淮黎" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="绘梨衣のGodzilla" />
|
<TextBlock Width="120" Margin="0,1.5" Text="半夏" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="521HERTZ" />
|
<TextBlock Width="120" Margin="0,1.5" Text="酥小梨" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="momotsuki" />
|
<TextBlock Width="120" Margin="0,1.5" Text="juju" />
|
||||||
<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="crush" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="playalone" />
|
<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="N55Nebula" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="雨季丶看花落丬" />
|
<TextBlock Width="120" Margin="0,1.5" Text="YFY" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="greenClemente" />
|
<TextBlock Width="120" Margin="0,1.5" Text="睛魄" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="nfd" />
|
<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="冰魄凝华Iris" />
|
<TextBlock Width="120" Margin="0,1.5" Text="2273445145" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="TNT" />
|
<TextBlock Width="120" Margin="0,1.5" Text="晚安" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="jokeresin" />
|
<TextBlock Width="120" Margin="0,1.5" Text="韶英儿" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="冻冻莓" />
|
<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="寰辰" />
|
<TextBlock Width="120" Margin="0,1.5" Text="空白格" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="大智" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Asphyxia" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="晚吟" />
|
<TextBlock Width="120" Margin="0,1.5" Text="凡人my" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="e_2" />
|
<TextBlock Width="240" Margin="0,1.5" Text="ChancellerPaperplane" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="墨辞" />
|
<TextBlock Width="120" Margin="0,1.5" Text="孤沵老狐狸" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="CongYiXu1259" />
|
<TextBlock Width="120" Margin="0,1.5" Text="5YUZ1" />
|
||||||
<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="龙说sake" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="Corazon" />
|
<TextBlock Width="120" Margin="0,1.5" Text="浮尘" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="断幕" />
|
<TextBlock Width="120" Margin="0,1.5" Text="nbs" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="wuying" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Eclysia" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="JH_R" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="小破球行星发动机" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="Lei Xuanhua" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="2776251567" />
|
||||||
|
<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="69543" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="sunke" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="HLX" />
|
||||||
<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="Hikari" />
|
<TextBlock Width="120" Margin="0,1.5" Text="小猫妖与小家伙" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="小辉joyb_" />
|
<TextBlock Width="120" Margin="0,1.5" Text="白鸽" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="bluck" />
|
<TextBlock Width="120" Margin="0,1.5" Text="yanZzai烟崽" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="风人过" />
|
<TextBlock Width="120" Margin="0,1.5" Text="TNT_Wb4a" />
|
||||||
<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="YLF零度" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Yesaz0erq" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="ADB114514" />
|
<TextBlock Width="120" Margin="0,1.5" Text="shirotree" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="晓乐" />
|
<TextBlock Width="120" Margin="0,1.5" Text="千变Alter" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="Raze" />
|
<TextBlock Width="120" Margin="0,1.5" Text="绅士瑄" />
|
||||||
<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="社÷老登" />
|
<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="240" Margin="0,1.5" Text="FSL Launcher - 小黄菌" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Mostima" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="华燃王小灭" />
|
<TextBlock Width="120" Margin="0,1.5" Text="钻石Daiyamondo" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="Charlotte_Caius" />
|
<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="15971025751" />
|
||||||
<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="祈绫参_UPE" />
|
<TextBlock Width="120" Margin="0,1.5" Text="哈哈哈" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="卖梦的人" />
|
<TextBlock Width="120" Margin="0,1.5" Text="nono" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="rking" />
|
<TextBlock Width="120" Margin="0,1.5" Text="CATTEA" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="柠果籽" />
|
<TextBlock Width="120" Margin="0,1.5" Text="黑白灰" />
|
||||||
<TextBlock Width="240" Margin="0,1.5" Text="真我 · 人之律者爱莉希雅" />
|
<TextBlock Width="120" Margin="0,1.5" Text="天狐空幻" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="KevinREL" />
|
<TextBlock Width="120" Margin="0,1.5" Text="老山羊很年轻" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="LEIBI" />
|
<TextBlock Width="120" Margin="0,1.5" Text="John" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="GNFDF" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Violet" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="朱重八" />
|
<TextBlock Width="120" Margin="0,1.5" Text="放空" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="TONYAF" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Grape" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="Reshiram???" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Elysium" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="克罗44" />
|
<TextBlock Width="120" Margin="0,1.5" Text="shwolf.P" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="社恐的波奇酱" />
|
<TextBlock Width="120" Margin="0,1.5" Text="月语" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="Xylophone233" />
|
<TextBlock Width="120" Margin="0,1.5" Text="龙之啊" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="陌上如玉" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Parapha" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="lili66" />
|
<TextBlock Width="120" Margin="0,1.5" Text="辞华久韵" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="小派呀" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Mad_Creeper" />
|
||||||
<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="jiandan7005" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="做好事不留名的好心人" />
|
<TextBlock Width="120" Margin="0,1.5" Text="Able" />
|
||||||
<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="Scarilent" />
|
||||||
<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="awa" />
|
<TextBlock Width="120" Margin="0,1.5" Text="吃不饱的小云云" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="CaTy" />
|
<TextBlock Width="120" Margin="0,1.5" Text="朱羽凌" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="zhifeiwen" />
|
<TextBlock Width="120" Margin="0,1.5" Text="RandomQAQ" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="磁爆步兵" />
|
<TextBlock Width="120" Margin="0,1.5" Text="修格斯" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="双开门冰箱AK15" />
|
<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="lupeihao" />
|
<TextBlock Width="120" Margin="0,1.5" Text="不愿逆流" />
|
||||||
<TextBlock Width="120" Margin="0,1.5" Text="木子" />
|
<TextBlock Width="240" Margin="0,1.5" Text="XKSYA-玩我的世界也学习c++" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="Knight" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="上官子羽" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="alanlayeLT" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="艾伦希伯来" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="z1500" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="Furina_de35" />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="归一." />
|
||||||
|
<TextBlock Width="120" Margin="0,1.5" Text="逝夏" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<Grid Height="35">
|
<Grid Height="35">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Public Class PageOtherHelp
|
Public Class PageOtherHelp
|
||||||
|
Implements IRefreshable
|
||||||
|
|
||||||
#Region "初始化"
|
#Region "初始化"
|
||||||
|
|
||||||
@@ -79,31 +80,35 @@
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Public Shared Sub EnterHelpPage(Location As String)
|
Public Shared Sub EnterHelpPage(Location As String)
|
||||||
RunInThread(Sub()
|
RunInThread(
|
||||||
If Not HelpLoader.State = LoadState.Finished Then HelpLoader.WaitForExit(GetUuid)
|
Sub()
|
||||||
Dim Entry As New HelpEntry(Location)
|
If Not HelpLoader.State = LoadState.Finished Then HelpLoader.WaitForExit(GetUuid)
|
||||||
RunInUi(Sub()
|
Dim Entry As New HelpEntry(Location)
|
||||||
Dim FrmHelpDetail As New PageOtherHelpDetail
|
RunInUi(
|
||||||
If FrmHelpDetail.Init(Entry) Then
|
Sub()
|
||||||
FrmMain.PageChange(New FormMain.PageStackData With {.Page = FormMain.PageType.HelpDetail, .Additional = {Entry, FrmHelpDetail}})
|
Dim FrmHelpDetail As New PageOtherHelpDetail
|
||||||
Else
|
If FrmHelpDetail.Init(Entry) Then
|
||||||
Log("[Help] 已取消进入帮助项目,这一般是由于 xaml 初始化失败,且用户在弹窗中手动放弃", LogLevel.Debug)
|
FrmMain.PageChange(New FormMain.PageStackData With {.Page = FormMain.PageType.HelpDetail, .Additional = {Entry, FrmHelpDetail}})
|
||||||
End If
|
Else
|
||||||
End Sub)
|
Log("[Help] 已取消进入帮助项目,这一般是由于 xaml 初始化失败,且用户在弹窗中手动放弃", LogLevel.Debug)
|
||||||
End Sub)
|
End If
|
||||||
|
End Sub)
|
||||||
|
End Sub)
|
||||||
End Sub
|
End Sub
|
||||||
Public Shared Sub EnterHelpPage(Entry As HelpEntry)
|
Public Shared Sub EnterHelpPage(Entry As HelpEntry)
|
||||||
RunInThread(Sub()
|
RunInThread(
|
||||||
If Not HelpLoader.State = LoadState.Finished Then HelpLoader.WaitForExit(GetUuid)
|
Sub()
|
||||||
RunInUi(Sub()
|
If Not HelpLoader.State = LoadState.Finished Then HelpLoader.WaitForExit(GetUuid)
|
||||||
Dim FrmHelpDetail As New PageOtherHelpDetail
|
RunInUi(
|
||||||
If FrmHelpDetail.Init(Entry) Then
|
Sub()
|
||||||
FrmMain.PageChange(New FormMain.PageStackData With {.Page = FormMain.PageType.HelpDetail, .Additional = {Entry, FrmHelpDetail}})
|
Dim FrmHelpDetail As New PageOtherHelpDetail
|
||||||
Else
|
If FrmHelpDetail.Init(Entry) Then
|
||||||
Log("[Help] 已取消进入帮助项目,这一般是由于 xaml 初始化失败,且用户在弹窗中手动放弃", LogLevel.Debug)
|
FrmMain.PageChange(New FormMain.PageStackData With {.Page = FormMain.PageType.HelpDetail, .Additional = {Entry, FrmHelpDetail}})
|
||||||
End If
|
Else
|
||||||
End Sub)
|
Log("[Help] 已取消进入帮助项目,这一般是由于 xaml 初始化失败,且用户在弹窗中手动放弃", LogLevel.Debug)
|
||||||
End Sub)
|
End If
|
||||||
|
End Sub)
|
||||||
|
End Sub)
|
||||||
End Sub
|
End Sub
|
||||||
Public Shared Function GetHelpPage(Location As String) As PageOtherHelpDetail
|
Public Shared Function GetHelpPage(Location As String) As PageOtherHelpDetail
|
||||||
If Not HelpLoader.State = LoadState.Finished Then HelpLoader.WaitForExit(GetUuid)
|
If Not HelpLoader.State = LoadState.Finished Then HelpLoader.WaitForExit(GetUuid)
|
||||||
@@ -122,14 +127,15 @@
|
|||||||
If String.IsNullOrWhiteSpace(SearchBox.Text) Then
|
If String.IsNullOrWhiteSpace(SearchBox.Text) Then
|
||||||
'隐藏
|
'隐藏
|
||||||
AniStart({
|
AniStart({
|
||||||
AaOpacity(PanSearch, -PanSearch.Opacity, 100),
|
AaOpacity(PanSearch, -PanSearch.Opacity, 100),
|
||||||
AaCode(Sub()
|
AaCode(
|
||||||
PanSearch.Height = 0
|
Sub()
|
||||||
PanSearch.Visibility = Visibility.Collapsed
|
PanSearch.Height = 0
|
||||||
PanList.Visibility = Visibility.Visible
|
PanSearch.Visibility = Visibility.Collapsed
|
||||||
End Sub,, True),
|
PanList.Visibility = Visibility.Visible
|
||||||
AaOpacity(PanList, 1 - PanList.Opacity, 150, 30)
|
End Sub,, True),
|
||||||
}, "FrmOtherHelp Search Switch")
|
AaOpacity(PanList, 1 - PanList.Opacity, 150, 30)
|
||||||
|
}, "FrmOtherHelp Search Switch")
|
||||||
Else
|
Else
|
||||||
'构造请求
|
'构造请求
|
||||||
Dim QueryList As New List(Of SearchEntry(Of HelpEntry))
|
Dim QueryList As New List(Of SearchEntry(Of HelpEntry))
|
||||||
@@ -163,15 +169,19 @@
|
|||||||
End If
|
End If
|
||||||
'显示
|
'显示
|
||||||
AniStart({
|
AniStart({
|
||||||
AaOpacity(PanList, -PanList.Opacity, 100),
|
AaOpacity(PanList, -PanList.Opacity, 100),
|
||||||
AaCode(Sub()
|
AaCode(
|
||||||
PanList.Visibility = Visibility.Collapsed
|
Sub()
|
||||||
PanSearch.Visibility = Visibility.Visible
|
PanList.Visibility = Visibility.Collapsed
|
||||||
PanSearch.TriggerForceResize()
|
PanSearch.Visibility = Visibility.Visible
|
||||||
End Sub,, True),
|
PanSearch.TriggerForceResize()
|
||||||
AaOpacity(PanSearch, 1 - PanSearch.Opacity, 150, 30)
|
End Sub,, True),
|
||||||
}, "FrmOtherHelp Search Switch")
|
AaOpacity(PanSearch, 1 - PanSearch.Opacity, 150, 30)
|
||||||
|
}, "FrmOtherHelp Search Switch")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Refresh() Implements IRefreshable.Refresh
|
||||||
|
PageOtherLeft.RefreshHelp()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
Public Class PageOtherHelpDetail
|
Public Class PageOtherHelpDetail
|
||||||
|
Implements IRefreshable
|
||||||
Public Entry As HelpEntry
|
Public Entry As HelpEntry
|
||||||
|
|
||||||
|
Public Sub Refresh() Implements IRefreshable.Refresh
|
||||||
|
Init(New HelpEntry(Entry.RawPath))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub PageOtherHelpDetail_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub PageOtherHelpDetail_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
PanBack.ScrollToTop()
|
PanBack.ScrollToTop()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition Height="5" />
|
<RowDefinition Height="5" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<local:MyScrollViewer DeltaMuity="0.7" Grid.Row="1" MaxWidth="300" MinWidth="250" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Style="{StaticResource ScrollViewerFullMargin}">
|
<local:MyScrollViewer DeltaMult="0.7" Grid.Row="1" MaxWidth="300" MinWidth="250" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Style="{StaticResource ScrollViewerFullMargin}">
|
||||||
<StackPanel x:Name="PanList" />
|
<StackPanel x:Name="PanList" />
|
||||||
</local:MyScrollViewer>
|
</local:MyScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Public Class PageSelectLeft
|
Public Class PageSelectLeft
|
||||||
|
Implements IRefreshable
|
||||||
|
|
||||||
Private Sub PageSelectLeft_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub PageSelectLeft_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
AddHandler McFolderListLoader.PreviewFinish, Sub() If FrmSelectLeft IsNot Nothing Then RunInUiWait(AddressOf McFolderListUI)
|
AddHandler McFolderListLoader.PreviewFinish, Sub() If FrmSelectLeft IsNot Nothing Then RunInUiWait(AddressOf McFolderListUI)
|
||||||
@@ -295,7 +296,7 @@
|
|||||||
For i = 0 To Folders.Count - 1
|
For i = 0 To Folders.Count - 1
|
||||||
If Folders(i) = "" Then Exit For
|
If Folders(i) = "" Then Exit For
|
||||||
If Folders(i).ToString.EndsWith(Folder.Path) Then
|
If Folders(i).ToString.EndsWith(Folder.Path) Then
|
||||||
Name = Folders(i).ToString.Before(">")
|
Name = Folders(i).ToString.BeforeFirst(">")
|
||||||
Folders.RemoveAt(i)
|
Folders.RemoveAt(i)
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -347,8 +348,14 @@
|
|||||||
End Sub
|
End Sub
|
||||||
Public Sub Refresh_Click(sender As Object, e As RoutedEventArgs)
|
Public Sub Refresh_Click(sender As Object, e As RoutedEventArgs)
|
||||||
Dim Data As McFolder = CType(CType(CType(sender.Parent, ContextMenu).Parent, Primitives.Popup).PlacementTarget, MyListItem).Tag
|
Dim Data As McFolder = CType(CType(CType(sender.Parent, ContextMenu).Parent, Primitives.Popup).PlacementTarget, MyListItem).Tag
|
||||||
WriteIni(Data.Path & "PCL.ini", "VersionCache", "") '删除缓存以强制要求下一次加载时更新列表
|
RefreshCurrent(Data.Path)
|
||||||
If Data.Path = PathMcFolder Then LoaderFolderRun(McVersionListLoader, PathMcFolder, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\")
|
End Sub
|
||||||
|
Public Sub RefreshCurrent() Implements IRefreshable.Refresh
|
||||||
|
RefreshCurrent(PathMcFolder)
|
||||||
|
End Sub
|
||||||
|
Public Shared Sub RefreshCurrent(Folder As String)
|
||||||
|
WriteIni(Folder & "PCL.ini", "VersionCache", "") '删除缓存以强制要求下一次加载时更新列表
|
||||||
|
If Folder = PathMcFolder Then LoaderFolderRun(McVersionListLoader, PathMcFolder, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\")
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Rename_Click(sender As Object, e As RoutedEventArgs)
|
Public Sub Rename_Click(sender As Object, e As RoutedEventArgs)
|
||||||
Dim Folder As McFolder = CType(CType(CType(sender.Parent, ContextMenu).Parent, Primitives.Popup).PlacementTarget, MyListItem).Tag
|
Dim Folder As McFolder = CType(CType(CType(sender.Parent, ContextMenu).Parent, Primitives.Popup).PlacementTarget, MyListItem).Tag
|
||||||
|
|||||||
@@ -167,14 +167,16 @@
|
|||||||
ToolTipService.SetPlacement(BtnCont, Primitives.PlacementMode.Center)
|
ToolTipService.SetPlacement(BtnCont, Primitives.PlacementMode.Center)
|
||||||
ToolTipService.SetVerticalOffset(BtnCont, 30)
|
ToolTipService.SetVerticalOffset(BtnCont, 30)
|
||||||
ToolTipService.SetHorizontalOffset(BtnCont, 2)
|
ToolTipService.SetHorizontalOffset(BtnCont, 2)
|
||||||
AddHandler BtnCont.Click, Sub()
|
AddHandler BtnCont.Click,
|
||||||
PageVersionLeft.Version = Version
|
Sub()
|
||||||
FrmMain.PageChange(FormMain.PageType.VersionSetup, 0)
|
PageVersionLeft.Version = Version
|
||||||
End Sub
|
FrmMain.PageChange(FormMain.PageType.VersionSetup, 0)
|
||||||
AddHandler sender.MouseRightButtonUp, Sub()
|
End Sub
|
||||||
PageVersionLeft.Version = Version
|
AddHandler sender.MouseRightButtonUp,
|
||||||
FrmMain.PageChange(FormMain.PageType.VersionSetup, 0)
|
Sub()
|
||||||
End Sub
|
PageVersionLeft.Version = Version
|
||||||
|
FrmMain.PageChange(FormMain.PageType.VersionSetup, 0)
|
||||||
|
End Sub
|
||||||
sender.Buttons = {BtnStar, BtnDel, BtnCont}
|
sender.Buttons = {BtnStar, BtnDel, BtnCont}
|
||||||
Else
|
Else
|
||||||
Dim BtnCont As New MyIconButton With {.LogoScale = 1.15, .Logo = Logo.IconButtonOpen}
|
Dim BtnCont As New MyIconButton With {.LogoScale = 1.15, .Logo = Logo.IconButtonOpen}
|
||||||
@@ -182,12 +184,8 @@
|
|||||||
ToolTipService.SetPlacement(BtnCont, Primitives.PlacementMode.Center)
|
ToolTipService.SetPlacement(BtnCont, Primitives.PlacementMode.Center)
|
||||||
ToolTipService.SetVerticalOffset(BtnCont, 30)
|
ToolTipService.SetVerticalOffset(BtnCont, 30)
|
||||||
ToolTipService.SetHorizontalOffset(BtnCont, 2)
|
ToolTipService.SetHorizontalOffset(BtnCont, 2)
|
||||||
AddHandler BtnCont.Click, Sub()
|
AddHandler BtnCont.Click, Sub() PageVersionOverall.OpenVersionFolder(Version)
|
||||||
PageVersionOverall.OpenVersionFolder(Version)
|
AddHandler sender.MouseRightButtonUp, Sub() PageVersionOverall.OpenVersionFolder(Version)
|
||||||
End Sub
|
|
||||||
AddHandler sender.MouseRightButtonUp, Sub()
|
|
||||||
PageVersionOverall.OpenVersionFolder(Version)
|
|
||||||
End Sub
|
|
||||||
sender.Buttons = {BtnStar, BtnDel, BtnCont}
|
sender.Buttons = {BtnStar, BtnDel, BtnCont}
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -153,6 +153,7 @@
|
|||||||
{"UiHiddenPageSetup", New SetupEntry(False)},
|
{"UiHiddenPageSetup", New SetupEntry(False)},
|
||||||
{"UiHiddenPageOther", New SetupEntry(False)},
|
{"UiHiddenPageOther", New SetupEntry(False)},
|
||||||
{"UiHiddenFunctionSelect", New SetupEntry(False)},
|
{"UiHiddenFunctionSelect", New SetupEntry(False)},
|
||||||
|
{"UiHiddenFunctionModUpdate", New SetupEntry(False)},
|
||||||
{"UiHiddenFunctionHidden", New SetupEntry(False)},
|
{"UiHiddenFunctionHidden", New SetupEntry(False)},
|
||||||
{"UiHiddenSetupLaunch", New SetupEntry(False)},
|
{"UiHiddenSetupLaunch", New SetupEntry(False)},
|
||||||
{"UiHiddenSetupUi", New SetupEntry(False)},
|
{"UiHiddenSetupUi", New SetupEntry(False)},
|
||||||
@@ -632,6 +633,9 @@
|
|||||||
Public Sub UiHiddenFunctionSelect(Value As Boolean)
|
Public Sub UiHiddenFunctionSelect(Value As Boolean)
|
||||||
PageSetupUI.HiddenRefresh()
|
PageSetupUI.HiddenRefresh()
|
||||||
End Sub
|
End Sub
|
||||||
|
Public Sub UiHiddenFunctionModUpdate(Value As Boolean)
|
||||||
|
PageSetupUI.HiddenRefresh()
|
||||||
|
End Sub
|
||||||
Public Sub UiHiddenFunctionHidden(Value As Boolean)
|
Public Sub UiHiddenFunctionHidden(Value As Boolean)
|
||||||
PageSetupUI.HiddenRefresh()
|
PageSetupUI.HiddenRefresh()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -7,54 +7,7 @@
|
|||||||
PanScroll="{Binding ElementName=PanBack}">
|
PanScroll="{Binding ElementName=PanBack}">
|
||||||
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
|
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
|
||||||
<StackPanel x:Name="PanMain" Margin="25,10">
|
<StackPanel x:Name="PanMain" Margin="25,10">
|
||||||
<local:MyCard x:Name="CardSkin" Margin="0,15" Title="离线皮肤" CanSwap="True" IsSwaped="True">
|
<local:MyCard x:Name="CardArgument" Margin="0,15" Title="启动选项">
|
||||||
<StackPanel Margin="25,40,25,15">
|
|
||||||
<local:MyHint Text="由于技术问题,此功能只保证对 1.19.2 以前的版本有效!" IsWarn="True" Margin="0,0,0,10" />
|
|
||||||
<Grid Margin="-1,0,0,0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<local:MyRadioBox Text="随机" x:Name="RadioSkinType0" Height="22" Tag="LaunchSkinType/0" Grid.Column="0" ToolTip="随机选择一个默认皮肤" />
|
|
||||||
<local:MyRadioBox Text="Steve" x:Name="RadioSkinType1" Height="22" Tag="LaunchSkinType/1" Grid.Column="1" />
|
|
||||||
<local:MyRadioBox Text="Alex" x:Name="RadioSkinType2" Height="22" Tag="LaunchSkinType/2" Grid.Column="2" />
|
|
||||||
<local:MyRadioBox Text="正版皮肤" x:Name="RadioSkinType3" Height="22" Tag="LaunchSkinType/3" Grid.Column="3" ToolTip="使用某个正版玩家的皮肤" />
|
|
||||||
<local:MyRadioBox Text="自定义" x:Name="RadioSkinType4" Height="22" Tag="LaunchSkinType/4" Grid.Column="4" ToolTip="以资源包的形式加载自定义皮肤。
使用此方式更换的皮肤在多人游戏中仅自己可见,且会替换游戏中所有的角色。" />
|
|
||||||
</Grid>
|
|
||||||
<Grid x:Name="PanSkinID" Margin="0,14,0,2" Visibility="Collapsed">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Name" />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="正版玩家名" Margin="0,0,25,0" />
|
|
||||||
<local:MyTextBox x:Name="TextSkinID" Tag="LaunchSkinID" Grid.Column="1" MaxLength="50" />
|
|
||||||
<Grid Height="35" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,14,0,0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<local:MyButton x:Name="BtnSkinSave" Text="保存皮肤" MinWidth="140" Padding="13,0" Margin="0,0,20,0" Grid.Row="1" />
|
|
||||||
<local:MyButton x:Name="BtnSkinCache" Text="刷新缓存" MinWidth="140" Padding="13,0" Margin="0,0,20,0" ToolTip="刷新并重新下载 PCL 当前显示的皮肤" Grid.Row="1" Grid.Column="1" />
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
<Grid x:Name="PanSkinChange" Margin="0,14,0,2" Height="35" Visibility="Collapsed">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<local:MyButton x:Name="BtnSkinChange" Text="更改皮肤" MinWidth="140" Padding="13,0" Margin="0,0,20,0" />
|
|
||||||
<local:MyButton x:Name="BtnSkinDelete" Text="重置皮肤" MinWidth="140" Padding="13,0" Margin="0,0,20,0" ColorType="Red" Grid.Column="1" />
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
|
||||||
</local:MyCard>
|
|
||||||
<local:MyCard x:Name="CardArgument" Margin="0,0,0,15" Title="启动选项">
|
|
||||||
<StackPanel Margin="25,40,25,15">
|
<StackPanel Margin="25,40,25,15">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -217,6 +170,53 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</local:MyCard>
|
</local:MyCard>
|
||||||
|
<local:MyCard x:Name="CardSkin" Margin="0,0,0,15" Title="离线皮肤" CanSwap="True" IsSwaped="True">
|
||||||
|
<StackPanel Margin="25,40,25,15">
|
||||||
|
<local:MyHint Text="由于技术问题,此功能只保证对 1.19.2 以前的版本有效!" IsWarn="True" Margin="0,0,0,10" />
|
||||||
|
<Grid Margin="-1,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<local:MyRadioBox Text="随机" x:Name="RadioSkinType0" Height="22" Tag="LaunchSkinType/0" Grid.Column="0" ToolTip="随机选择一个默认皮肤" />
|
||||||
|
<local:MyRadioBox Text="Steve" x:Name="RadioSkinType1" Height="22" Tag="LaunchSkinType/1" Grid.Column="1" />
|
||||||
|
<local:MyRadioBox Text="Alex" x:Name="RadioSkinType2" Height="22" Tag="LaunchSkinType/2" Grid.Column="2" />
|
||||||
|
<local:MyRadioBox Text="正版皮肤" x:Name="RadioSkinType3" Height="22" Tag="LaunchSkinType/3" Grid.Column="3" ToolTip="使用某个正版玩家的皮肤" />
|
||||||
|
<local:MyRadioBox Text="自定义" x:Name="RadioSkinType4" Height="22" Tag="LaunchSkinType/4" Grid.Column="4" ToolTip="以资源包的形式加载自定义皮肤。
使用此方式更换的皮肤在多人游戏中仅自己可见,且会替换游戏中所有的角色。" />
|
||||||
|
</Grid>
|
||||||
|
<Grid x:Name="PanSkinID" Margin="0,14,0,2" Visibility="Collapsed">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Name" />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="正版玩家名" Margin="0,0,25,0" />
|
||||||
|
<local:MyTextBox x:Name="TextSkinID" Tag="LaunchSkinID" Grid.Column="1" MaxLength="50" />
|
||||||
|
<Grid Height="35" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,14,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<local:MyButton x:Name="BtnSkinSave" Text="保存皮肤" MinWidth="140" Padding="13,0" Margin="0,0,20,0" Grid.Row="1" />
|
||||||
|
<local:MyButton x:Name="BtnSkinCache" Text="刷新缓存" MinWidth="140" Padding="13,0" Margin="0,0,20,0" ToolTip="刷新并重新下载 PCL 当前显示的皮肤" Grid.Row="1" Grid.Column="1" />
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Grid x:Name="PanSkinChange" Margin="0,14,0,2" Height="35" Visibility="Collapsed">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<local:MyButton x:Name="BtnSkinChange" Text="更改皮肤" MinWidth="140" Padding="13,0" Margin="0,0,20,0" />
|
||||||
|
<local:MyButton x:Name="BtnSkinDelete" Text="重置皮肤" MinWidth="140" Padding="13,0" Margin="0,0,20,0" ColorType="Red" Grid.Column="1" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</local:MyCard>
|
||||||
<local:MyCard Margin="0,0,0,15" Title="高级启动选项" IsSwaped="True" CanSwap="True">
|
<local:MyCard Margin="0,0,0,15" Title="高级启动选项" IsSwaped="True" CanSwap="True">
|
||||||
<Grid Margin="25,40,25,15">
|
<Grid Margin="25,40,25,15">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
Private Shared Sub SliderChange(sender As MySlider, e As Object) Handles SliderRamCustom.Change
|
Private Shared Sub SliderChange(sender As MySlider, e As Object) Handles SliderRamCustom.Change
|
||||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Value)
|
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Value)
|
||||||
End Sub
|
End Sub
|
||||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboArgumentVisibie.SelectionChanged, ComboArgumentWindowType.SelectionChanged, ComboArgumentPriority.SelectionChanged
|
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboArgumentIndie.SelectionChanged, ComboArgumentVisibie.SelectionChanged, ComboArgumentWindowType.SelectionChanged, ComboArgumentPriority.SelectionChanged
|
||||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex)
|
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex)
|
||||||
End Sub
|
End Sub
|
||||||
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckAdvanceAssets.Change, CheckAdvanceJava.Change, CheckAdvanceRunWait.Change, CheckArgumentRam.Change
|
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckAdvanceAssets.Change, CheckAdvanceJava.Change, CheckAdvanceRunWait.Change, CheckArgumentRam.Change
|
||||||
@@ -551,17 +551,17 @@ PreFin:
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'版本隔离警告
|
'版本隔离警告
|
||||||
|
Private IsReverting As Boolean = False
|
||||||
Private Sub ComboArgumentIndie_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboArgumentIndie.SelectionChanged
|
Private Sub ComboArgumentIndie_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboArgumentIndie.SelectionChanged
|
||||||
If AniControlEnabled <> 0 Then Exit Sub
|
If AniControlEnabled <> 0 Then Exit Sub
|
||||||
|
If IsReverting Then Exit Sub
|
||||||
If MyMsgBox("调整版本隔离后,你可能得把游戏存档、Mod 等文件手动迁移到新的游戏文件夹中。" & vbCrLf &
|
If MyMsgBox("调整版本隔离后,你可能得把游戏存档、Mod 等文件手动迁移到新的游戏文件夹中。" & vbCrLf &
|
||||||
"如果修改后发现存档消失,把这项设置改回来就能恢复。" & vbCrLf &
|
"如果修改后发现存档消失,把这项设置改回来就能恢复。" & vbCrLf &
|
||||||
"如果你不会迁移存档,不建议修改这项设置!",
|
"如果你不会迁移存档,不建议修改这项设置!",
|
||||||
"警告", "我知道我在做什么", "取消", IsWarn:=True) = 2 Then
|
"警告", "我知道我在做什么", "取消", IsWarn:=True) = 2 Then
|
||||||
AniControlEnabled += 1
|
IsReverting = True
|
||||||
ComboArgumentIndie.SelectedItem = e.RemovedItems(0)
|
ComboArgumentIndie.SelectedItem = e.RemovedItems(0)
|
||||||
AniControlEnabled -= 1
|
IsReverting = False
|
||||||
Else
|
|
||||||
Setup.Set(sender.Tag, sender.SelectedIndex)
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -290,8 +290,9 @@
|
|||||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="3" Grid.Column="6" Text="新功能投票" x:Name="CheckHiddenOtherVote" Tag="UiHiddenOtherVote" />
|
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="3" Grid.Column="6" Text="新功能投票" x:Name="CheckHiddenOtherVote" Tag="UiHiddenOtherVote" />
|
||||||
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="特定功能" />
|
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="特定功能" />
|
||||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="4" Grid.Column="2" Text="邮箱隐藏" x:Name="CheckLauncherEmail" Tag="UiLauncherEmail" ToolTip="隐藏第三方登录的账号邮箱显示,并尽量将邮箱打码,以避免隐私泄露。
此选项的更改将在重启启动器后生效。" />
|
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="4" Grid.Column="2" Text="邮箱隐藏" x:Name="CheckLauncherEmail" Tag="UiLauncherEmail" ToolTip="隐藏第三方登录的账号邮箱显示,并尽量将邮箱打码,以避免隐私泄露。
此选项的更改将在重启启动器后生效。" />
|
||||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="4" Grid.Column="3" Text="版本选择" x:Name="CheckHiddenFunctionSelect" Tag="UiHiddenFunctionSelect" />
|
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="4" Grid.Column="3" Text="版本管理" x:Name="CheckHiddenFunctionSelect" Tag="UiHiddenFunctionSelect" ToolTip="隐藏启动按钮下方的版本选择与版本设置入口。" />
|
||||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="4" Grid.Column="4" Text="功能隐藏" x:Name="CheckHiddenFunctionHidden" Tag="UiHiddenFunctionHidden" ToolTip="仅隐藏本选项卡,设置的禁用内容依然有效。
可以在保留个性化设置页面的情况下避免隐藏设置被修改。" />
|
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="4" Grid.Column="4" Text="Mod 更新" x:Name="CheckHiddenFunctionModUpdate" Tag="UiHiddenFunctionModUpdate" ToolTip="禁止在 Mod 管理页面更新 Mod。" />
|
||||||
|
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="4" Grid.Column="5" Text="功能隐藏" x:Name="CheckHiddenFunctionHidden" Tag="UiHiddenFunctionHidden" ToolTip="仅隐藏本选项卡,设置的禁用内容依然有效。
可以在保留个性化设置页面的情况下避免隐藏设置被修改。" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</local:MyCard>
|
</local:MyCard>
|
||||||
|
|||||||
@@ -98,6 +98,7 @@
|
|||||||
CheckHiddenPageSetup.Checked = Setup.Get("UiHiddenPageSetup")
|
CheckHiddenPageSetup.Checked = Setup.Get("UiHiddenPageSetup")
|
||||||
CheckHiddenPageOther.Checked = Setup.Get("UiHiddenPageOther")
|
CheckHiddenPageOther.Checked = Setup.Get("UiHiddenPageOther")
|
||||||
CheckHiddenFunctionSelect.Checked = Setup.Get("UiHiddenFunctionSelect")
|
CheckHiddenFunctionSelect.Checked = Setup.Get("UiHiddenFunctionSelect")
|
||||||
|
CheckHiddenFunctionModUpdate.Checked = Setup.Get("UiHiddenFunctionModUpdate")
|
||||||
CheckHiddenFunctionHidden.Checked = Setup.Get("UiHiddenFunctionHidden")
|
CheckHiddenFunctionHidden.Checked = Setup.Get("UiHiddenFunctionHidden")
|
||||||
CheckHiddenSetupLaunch.Checked = Setup.Get("UiHiddenSetupLaunch")
|
CheckHiddenSetupLaunch.Checked = Setup.Get("UiHiddenSetupLaunch")
|
||||||
CheckHiddenSetupUI.Checked = Setup.Get("UiHiddenSetupUi")
|
CheckHiddenSetupUI.Checked = Setup.Get("UiHiddenSetupUi")
|
||||||
@@ -148,6 +149,7 @@
|
|||||||
Setup.Reset("UiHiddenPageSetup")
|
Setup.Reset("UiHiddenPageSetup")
|
||||||
Setup.Reset("UiHiddenPageOther")
|
Setup.Reset("UiHiddenPageOther")
|
||||||
Setup.Reset("UiHiddenFunctionSelect")
|
Setup.Reset("UiHiddenFunctionSelect")
|
||||||
|
Setup.Reset("UiHiddenFunctionModUpdate")
|
||||||
Setup.Reset("UiHiddenFunctionHidden")
|
Setup.Reset("UiHiddenFunctionHidden")
|
||||||
Setup.Reset("UiHiddenSetupLaunch")
|
Setup.Reset("UiHiddenSetupLaunch")
|
||||||
Setup.Reset("UiHiddenSetupUi")
|
Setup.Reset("UiHiddenSetupUi")
|
||||||
@@ -175,7 +177,7 @@
|
|||||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboBackgroundSuit.SelectionChanged, ComboCustomPreset.SelectionChanged
|
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboBackgroundSuit.SelectionChanged, ComboCustomPreset.SelectionChanged
|
||||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex)
|
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex)
|
||||||
End Sub
|
End Sub
|
||||||
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckMusicStop.Change, CheckMusicRandom.Change, CheckMusicAuto.Change, CheckBackgroundColorful.Change, CheckLogoLeft.Change, CheckLauncherLogo.Change, CheckHiddenFunctionHidden.Change, CheckHiddenFunctionSelect.Change, CheckHiddenPageDownload.Change, CheckHiddenPageLink.Change, CheckHiddenPageOther.Change, CheckHiddenPageSetup.Change, CheckHiddenSetupLaunch.Change, CheckHiddenSetupSystem.Change, CheckHiddenSetupLink.Change, CheckHiddenSetupUI.Change, CheckHiddenOtherAbout.Change, CheckHiddenOtherFeedback.Change, CheckHiddenOtherVote.Change, CheckHiddenOtherHelp.Change, CheckHiddenOtherTest.Change, CheckMusicStart.Change, CheckLauncherEmail.Change
|
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckMusicStop.Change, CheckMusicRandom.Change, CheckMusicAuto.Change, CheckBackgroundColorful.Change, CheckLogoLeft.Change, CheckLauncherLogo.Change, CheckHiddenFunctionHidden.Change, CheckHiddenFunctionSelect.Change, CheckHiddenFunctionModUpdate.Change, CheckHiddenPageDownload.Change, CheckHiddenPageLink.Change, CheckHiddenPageOther.Change, CheckHiddenPageSetup.Change, CheckHiddenSetupLaunch.Change, CheckHiddenSetupSystem.Change, CheckHiddenSetupLink.Change, CheckHiddenSetupUI.Change, CheckHiddenOtherAbout.Change, CheckHiddenOtherFeedback.Change, CheckHiddenOtherVote.Change, CheckHiddenOtherHelp.Change, CheckHiddenOtherTest.Change, CheckMusicStart.Change, CheckLauncherEmail.Change
|
||||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Checked)
|
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Checked)
|
||||||
End Sub
|
End Sub
|
||||||
Private Shared Sub TextBoxChange(sender As MyTextBox, e As Object) Handles TextLogoText.ValidatedTextChanged, TextCustomNet.ValidatedTextChanged
|
Private Shared Sub TextBoxChange(sender As MyTextBox, e As Object) Handles TextLogoText.ValidatedTextChanged, TextCustomNet.ValidatedTextChanged
|
||||||
|
|||||||
@@ -88,17 +88,7 @@
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Sub Refresh(sender As Object, e As EventArgs) '由边栏按钮匿名调用
|
Public Sub Refresh(sender As Object, e As EventArgs) '由边栏按钮匿名调用
|
||||||
'强制刷新
|
PageVersionMod.Refresh()
|
||||||
Try
|
|
||||||
CompProjectCache.Clear()
|
|
||||||
File.Delete(PathTemp & "Cache\LocalMod.json")
|
|
||||||
Log("[Mod] 由于点击刷新按钮,清理本地 Mod 信息缓存")
|
|
||||||
Catch ex As Exception
|
|
||||||
Log(ex, "强制刷新时清理本地 Mod 信息缓存失败")
|
|
||||||
End Try
|
|
||||||
If FrmVersionMod IsNot Nothing Then FrmVersionMod.ReloadModList(True) '无需 Else,还没加载刷个鬼的新
|
|
||||||
ItemMod.Checked = True
|
|
||||||
Hint("正在刷新……", Log:=False)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Reset(sender As Object, e As EventArgs)
|
Public Sub Reset(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Public Class PageVersionMod
|
Public Class PageVersionMod
|
||||||
|
Implements IRefreshable
|
||||||
|
|
||||||
#Region "初始化"
|
#Region "初始化"
|
||||||
|
|
||||||
@@ -37,6 +38,23 @@
|
|||||||
SearchBox.Text = ""
|
SearchBox.Text = ""
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
'强制刷新
|
||||||
|
Private Sub RefreshSelf() Implements IRefreshable.Refresh
|
||||||
|
Refresh()
|
||||||
|
End Sub
|
||||||
|
Public Shared Sub Refresh()
|
||||||
|
'强制刷新
|
||||||
|
Try
|
||||||
|
CompProjectCache.Clear()
|
||||||
|
File.Delete(PathTemp & "Cache\LocalMod.json")
|
||||||
|
Log("[Mod] 由于点击刷新按钮,清理本地 Mod 信息缓存")
|
||||||
|
Catch ex As Exception
|
||||||
|
Log(ex, "强制刷新时清理本地 Mod 信息缓存失败")
|
||||||
|
End Try
|
||||||
|
If FrmVersionMod IsNot Nothing Then FrmVersionMod.ReloadModList(True) '无需 Else,还没加载刷个鬼的新
|
||||||
|
FrmVersionLeft.ItemMod.Checked = True
|
||||||
|
Hint("正在刷新……", Log:=False)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub LoaderInit() Handles Me.Initialized
|
Private Sub LoaderInit() Handles Me.Initialized
|
||||||
PageLoaderInit(Load, PanLoad, PanAllBack, Nothing, McModLoader, AddressOf LoadUIFromLoaderOutput, AutoRun:=False)
|
PageLoaderInit(Load, PanLoad, PanAllBack, Nothing, McModLoader, AddressOf LoadUIFromLoaderOutput, AutoRun:=False)
|
||||||
@@ -136,13 +154,13 @@
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub RefreshUI()
|
Public Sub RefreshUI()
|
||||||
If PanList Is Nothing Then Exit Sub
|
If PanList Is Nothing Then Exit Sub
|
||||||
Dim ShowMods = GetShowingMods(True).ToList()
|
Dim ShowingMods = If(IsSearching, SearchResult, If(McModLoader.Output, New List(Of McMod))).Where(Function(m) CanPassFilter(m)).ToList
|
||||||
'重新列出列表
|
'重新列出列表
|
||||||
AniControlEnabled += 1
|
AniControlEnabled += 1
|
||||||
If ShowMods.Any() Then
|
If ShowingMods.Any() Then
|
||||||
PanList.Visibility = Visibility.Visible
|
PanList.Visibility = Visibility.Visible
|
||||||
PanList.Children.Clear()
|
PanList.Children.Clear()
|
||||||
For Each TargetMod In ShowMods
|
For Each TargetMod In ShowingMods
|
||||||
Dim Item As MyLocalModItem = ModItems(TargetMod.RawFileName)
|
Dim Item As MyLocalModItem = ModItems(TargetMod.RawFileName)
|
||||||
Item.Checked = SelectedMods.Contains(TargetMod.RawFileName) '更新选中状态
|
Item.Checked = SelectedMods.Contains(TargetMod.RawFileName) '更新选中状态
|
||||||
PanList.Children.Add(Item)
|
PanList.Children.Add(Item)
|
||||||
@@ -151,7 +169,7 @@
|
|||||||
PanList.Visibility = Visibility.Collapsed
|
PanList.Visibility = Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
AniControlEnabled -= 1
|
AniControlEnabled -= 1
|
||||||
SelectedMods = SelectedMods.Where(Function(m) ShowMods.Any(Function(s) s.RawFileName = m)).ToList '取消选中已经不显示的 Mod
|
SelectedMods = SelectedMods.Where(Function(m) ShowingMods.Any(Function(s) s.RawFileName = m)).ToList '取消选中已经不显示的 Mod
|
||||||
RefreshBars()
|
RefreshBars()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -169,7 +187,7 @@
|
|||||||
Dim DisabledCount As Integer = 0
|
Dim DisabledCount As Integer = 0
|
||||||
Dim UpdateCount As Integer = 0
|
Dim UpdateCount As Integer = 0
|
||||||
Dim UnavalialeCount As Integer = 0
|
Dim UnavalialeCount As Integer = 0
|
||||||
For Each ModItem In GetShowingMods(False)
|
For Each ModItem In If(IsSearching, SearchResult, If(McModLoader.Output, New List(Of McMod)))
|
||||||
AnyCount += 1
|
AnyCount += 1
|
||||||
If ModItem.CanUpdate Then UpdateCount += 1
|
If ModItem.CanUpdate Then UpdateCount += 1
|
||||||
If ModItem.State.Equals(McMod.McModState.Fine) Then EnabledCount += 1
|
If ModItem.State.Equals(McMod.McModState.Fine) Then EnabledCount += 1
|
||||||
@@ -298,7 +316,7 @@
|
|||||||
''' 全选。
|
''' 全选。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Private Sub BtnManageSelectAll_Click(sender As Object, e As MouseButtonEventArgs) Handles BtnManageSelectAll.Click
|
Private Sub BtnManageSelectAll_Click(sender As Object, e As MouseButtonEventArgs) Handles BtnManageSelectAll.Click
|
||||||
ChangeAllSelected(SelectedMods.Count < GetShowingMods(True).Count)
|
ChangeAllSelected(SelectedMods.Count < PanList.Children.Count)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -332,9 +350,11 @@
|
|||||||
Private Sub ChangeAllSelected(Value As Boolean)
|
Private Sub ChangeAllSelected(Value As Boolean)
|
||||||
AniControlEnabled += 1
|
AniControlEnabled += 1
|
||||||
SelectedMods.Clear()
|
SelectedMods.Clear()
|
||||||
For Each Item As MyLocalModItem In GetShowingMods(True).Where(Function(m) ModItems.ContainsKey(m.RawFileName)).Select(Function(m) ModItems(m.RawFileName))
|
For Each Item As MyLocalModItem In ModItems.Values
|
||||||
Item.Checked = Value
|
'#4992,Mod 从过滤器看可能不应在列表中,但因为刚切换状态所以依然保留在列表中,所以应该从列表 UI 判断,而非从过滤器判断
|
||||||
If Value Then SelectedMods.Add(Item.Entry.RawFileName)
|
Dim ShouldSelected As Boolean = Value AndAlso PanList.Children.Contains(Item)
|
||||||
|
Item.Checked = ShouldSelected
|
||||||
|
If ShouldSelected Then SelectedMods.Add(Item.Entry.RawFileName)
|
||||||
Next
|
Next
|
||||||
AniControlEnabled -= 1
|
AniControlEnabled -= 1
|
||||||
RefreshBars()
|
RefreshBars()
|
||||||
@@ -384,14 +404,6 @@
|
|||||||
Unavailable = 4
|
Unavailable = 4
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' 获取所有应该显示在 UI 中的 Mod。
|
|
||||||
''' </summary>
|
|
||||||
Private Function GetShowingMods(ApplyFilter As Boolean) As IEnumerable(Of McMod)
|
|
||||||
If McModLoader.Output Is Nothing Then Return New List(Of McMod)
|
|
||||||
Return If(IsSearching, SearchResult, McModLoader.Output).Where(Function(m) Not ApplyFilter OrElse CanPassFilter(m))
|
|
||||||
End Function
|
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 检查该 Mod 项是否符合当前筛选的类别。
|
''' 检查该 Mod 项是否符合当前筛选的类别。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
|||||||
@@ -488,15 +488,16 @@ PreFin:
|
|||||||
#Region "其他设置"
|
#Region "其他设置"
|
||||||
|
|
||||||
'版本隔离警告
|
'版本隔离警告
|
||||||
|
Private IsReverting As Boolean = False
|
||||||
Private Sub ComboArgumentIndie_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboArgumentIndie.SelectionChanged
|
Private Sub ComboArgumentIndie_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboArgumentIndie.SelectionChanged
|
||||||
If AniControlEnabled <> 0 Then Exit Sub
|
If AniControlEnabled <> 0 Then Exit Sub
|
||||||
If MyMsgBox("调整版本隔离后,你可能得把游戏存档、Mod 等文件手动迁移到新的游戏文件夹中。" & vbCrLf &
|
If MyMsgBox("调整版本隔离后,你可能得把游戏存档、Mod 等文件手动迁移到新的游戏文件夹中。" & vbCrLf &
|
||||||
"如果修改后发现存档消失,把这项设置改回来就能恢复。" & vbCrLf &
|
"如果修改后发现存档消失,把这项设置改回来就能恢复。" & vbCrLf &
|
||||||
"如果你不会迁移存档,不建议修改这项设置!",
|
"如果你不会迁移存档,不建议修改这项设置!",
|
||||||
"警告", "我知道我在做什么", "取消", IsWarn:=True) = 2 Then
|
"警告", "我知道我在做什么", "取消", IsWarn:=True) = 2 Then
|
||||||
AniControlEnabled += 1
|
IsReverting = True
|
||||||
ComboArgumentIndie.SelectedItem = e.RemovedItems(0)
|
ComboArgumentIndie.SelectedItem = e.RemovedItems(0)
|
||||||
AniControlEnabled -= 1
|
IsReverting = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user