Merge branch 'main' into fix#6230
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
Return LabTitle.Text
|
||||
End Get
|
||||
Set(value As String)
|
||||
If LabTitle.Text = value Then Exit Property
|
||||
If LabTitle.Text = value Then Return
|
||||
LabTitle.Text = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -30,7 +30,7 @@
|
||||
Return If(LabTitleRaw?.Text, "")
|
||||
End Get
|
||||
Set(value As String)
|
||||
If LabTitleRaw.Text = value Then Exit Property
|
||||
If LabTitleRaw.Text = value Then Return
|
||||
LabTitleRaw.Text = value
|
||||
LabTitleRaw.Visibility = If(value = "", Visibility.Collapsed, Visibility.Visible)
|
||||
End Set
|
||||
@@ -42,7 +42,7 @@
|
||||
Return LabInfo.Text
|
||||
End Get
|
||||
Set(value As String)
|
||||
If LabInfo.Text = value Then Exit Property
|
||||
If LabInfo.Text = value Then Return
|
||||
LabInfo.Text = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -88,7 +88,7 @@
|
||||
Private Sub Button_MouseUp(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseLeftButtonUp
|
||||
If IsMouseDown Then
|
||||
RaiseEvent Click(sender, e)
|
||||
If e.Handled Then Exit Sub
|
||||
If e.Handled Then Return
|
||||
Log("[Control] 按下资源工程列表项:" & LabTitle.Text)
|
||||
End If
|
||||
End Sub
|
||||
@@ -97,7 +97,7 @@
|
||||
Dim Titles As New List(Of String)
|
||||
If FrmMain.PageCurrent.Page = FormMain.PageType.CompDetail Then
|
||||
For Each Card As MyCard In FrmDownloadCompDetail.PanResults.Children
|
||||
If Card.Title <> "" AndAlso Not Card.IsSwaped Then Titles.Add(Card.Title)
|
||||
If Card.Title <> "" AndAlso Not Card.IsSwapped Then Titles.Add(Card.Title)
|
||||
Next
|
||||
Log("[Comp] 记录当前已展开的卡片:" & String.Join("、", Titles))
|
||||
FrmMain.PageCurrent.Additional(1) = Titles
|
||||
@@ -185,7 +185,7 @@
|
||||
''' </summary>
|
||||
Public Property CanInteraction As Boolean = True
|
||||
Public Sub RefreshColor(sender As Object, e As EventArgs) Handles Me.MouseEnter, Me.MouseLeave, Me.MouseLeftButtonDown, Me.MouseLeftButtonUp
|
||||
If Not CanInteraction Then Exit Sub
|
||||
If Not CanInteraction Then Return
|
||||
'判断当前颜色
|
||||
Dim StateNew As String, Time As Integer
|
||||
If IsMouseOver Then
|
||||
@@ -200,7 +200,7 @@
|
||||
StateNew = "Idle"
|
||||
Time = 180
|
||||
End If
|
||||
If StateLast = StateNew Then Exit Sub
|
||||
If StateLast = StateNew Then Return
|
||||
StateLast = StateNew
|
||||
'触发颜色动画
|
||||
If IsLoaded AndAlso AniControlEnabled = 0 Then '防止默认属性变更触发动画
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="版本" Margin="0,0,18,0" />
|
||||
<local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" IsEditable="True" MaxDropDownHeight="320">
|
||||
<local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" />
|
||||
<local:MyComboBoxItem Content="1.21.5" />
|
||||
<local:MyComboBoxItem Content="1.21.8" />
|
||||
<local:MyComboBoxItem Content="1.21.1" />
|
||||
<local:MyComboBoxItem Content="1.20.6" />
|
||||
<local:MyComboBoxItem Content="1.20.1" />
|
||||
@@ -71,7 +71,7 @@
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<StackPanel x:Name="PanContent">
|
||||
<local:MyHint x:Name="HintError" Text="无法连接到 Modrinth,所以目前仅显示了来自 CurseForge 的内容,结果可能不全。
请尝试使用 VPN 或加速器以改善网络。" IsWarn="True" Margin="0,0,0,15" />
|
||||
<local:MyHint x:Name="HintError" HasBorder="True" Text="无法连接到 Modrinth,所以目前仅显示了来自 CurseForge 的内容,搜索结果可能不全。
请稍后重试,或使用 VPN 以改善网络环境。" Theme="Yellow" Margin="0,0,0,15" />
|
||||
<local:MyCard x:Name="CardProjects" UseAnimation="False">
|
||||
<StackPanel x:Name="PanProjects" Margin="12" />
|
||||
</local:MyCard>
|
||||
|
||||
@@ -68,6 +68,10 @@ Public Class PageComp
|
||||
''' 在切换到页面时,应自动将筛选项设置为与该目标 MC 版本和加载器相同。
|
||||
''' </summary>
|
||||
Public Shared TargetVersion As McVersion = Nothing
|
||||
''' <summary>
|
||||
''' 在切换到该页面时自动设置的搜索框内的内容。
|
||||
''' </summary>
|
||||
Public Shared TargetName As String = Nothing
|
||||
|
||||
'在点击 MyCompItem 时会获取 Loader 的输入,以使资源详情页面可以应用相同的筛选项
|
||||
Public Loader As New LoaderTask(Of CompProjectRequest, Integer)("社区资源获取:XXX", AddressOf CompProjectsGet, AddressOf LoaderInput) With {.ReloadTimeout = 60 * 1000}
|
||||
@@ -94,6 +98,10 @@ Public Class PageComp
|
||||
ComboSearchLoader.SelectedItem = GetTargetItemByName("NeoForge")
|
||||
End If
|
||||
TargetVersion = Nothing
|
||||
If TargetName IsNot Nothing Then
|
||||
TextSearchName.Text = TargetName
|
||||
TargetName = Nothing
|
||||
End If
|
||||
'如果已经完成请求,则重新开始
|
||||
If IsLoaderInited Then StartNewSearch()
|
||||
ScrollToHome()
|
||||
@@ -108,19 +116,11 @@ Public Class PageComp
|
||||
Dim Request As New CompProjectRequest(PageType, Storage, (Page + 1) * PageSize)
|
||||
Dim GameVersion As String = If(TextSearchVersion.Text = "全部 (也可自行输入)", Nothing,
|
||||
If(TextSearchVersion.Text.Contains(".") OrElse TextSearchVersion.Text.Contains("w"), TextSearchVersion.Text, Nothing))
|
||||
Dim ModLoader As CompModLoaderType = CompModLoaderType.Any
|
||||
If PageType = CompType.Mod Then '只有 Mod 考虑加载器
|
||||
ModLoader = Val(ComboSearchLoader.SelectedItem.Tag)
|
||||
If GameVersion IsNot Nothing AndAlso GameVersion.Contains(".") AndAlso Val(GameVersion.Split(".")(1)) < 14 AndAlso '1.14-
|
||||
ModLoader = CompModLoaderType.Forge Then '选择了 Forge
|
||||
ModLoader = CompModLoaderType.Any '此时,视作没有筛选 Mod Loader(因为部分老 Mod 没有设置自己支持的加载器)
|
||||
End If
|
||||
End If
|
||||
With Request
|
||||
.SearchText = TextSearchName.Text
|
||||
.GameVersion = GameVersion
|
||||
.Tag = ComboSearchTag.SelectedItem.Tag
|
||||
.ModLoader = ModLoader
|
||||
.ModLoader = If(PageType = CompType.Mod, Val(ComboSearchLoader.SelectedItem.Tag), CompModLoaderType.Any)
|
||||
.Source = CType(Val(ComboSearchSource.SelectedItem.Tag), CompSourceType)
|
||||
End With
|
||||
Return Request
|
||||
@@ -188,7 +188,6 @@ Public Class PageComp
|
||||
End Sub
|
||||
|
||||
'切换页码
|
||||
|
||||
Private Sub BtnPageFirst_Click(sender As Object, e As RoutedEventArgs) Handles BtnPageFirst.Click
|
||||
ChangePage(0)
|
||||
End Sub
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
"Comp File",
|
||||
Sub(Task)
|
||||
LoadTargetFromAdditional()
|
||||
Task.Output = CompFilesGet(Project.Id, Project.FromCurseForge)
|
||||
Dim Result = CompFilesGet(Project.Id, Project.FromCurseForge)
|
||||
If Task.IsAborted Then Return
|
||||
Task.Output = Result
|
||||
End Sub)
|
||||
|
||||
'初始化加载器信息
|
||||
@@ -71,11 +73,14 @@
|
||||
'筛选类型相同的结果(Modrinth 会返回 Mod、服务端插件、数据包混合的列表)
|
||||
Private Function GetResults() As List(Of CompFile)
|
||||
Dim Results As List(Of CompFile) = CompFileLoader.Output
|
||||
If PageType = CompType.Any Then
|
||||
Results = Results.Where(Function(r) r.Type <> CompType.Plugin).ToList
|
||||
Else
|
||||
Results = Results.Where(Function(r) r.Type = PageType).ToList
|
||||
End If
|
||||
Select Case PageType
|
||||
Case CompType.Any
|
||||
Results = Results.Where(Function(r) r.Type <> CompType.Plugin).ToList
|
||||
Case CompType.Shader, CompType.ResourcePack
|
||||
'不筛选光影和资源包,否则原版光影会因为是资源包格式而被过滤(#6473)
|
||||
Case Else
|
||||
Results = Results.Where(Function(r) r.Type = PageType).ToList
|
||||
End Select
|
||||
Return Results
|
||||
End Function
|
||||
Private Sub Load_OnFinish()
|
||||
@@ -200,16 +205,16 @@
|
||||
CType(FrmMain.PageCurrent.Additional(1), List(Of String)).Contains(NewCard.Title)) Then
|
||||
MyCard.StackInstall(NewStack, If(PageType = CompType.ModPack, 9, 8), Pair.Key) '9 是安装,8 是另存为
|
||||
Else
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
End If
|
||||
'增加提示
|
||||
If Pair.Key = "其他版本" Then
|
||||
NewStack.Children.Add(New MyHint With {.Text = "由于版本信息更新缓慢,可能无法识别刚更新的 MC 版本,只需等待几天即可自动恢复正常。", .IsWarn = False, .Margin = New Thickness(0, 0, 0, 7)})
|
||||
NewStack.Children.Add(New MyHint With {.Text = "由于版本信息更新缓慢,可能无法识别刚更新的 MC 版本。几天后即可正常识别。", .Theme = MyHint.Themes.Yellow, .Margin = New Thickness(5, 0, 0, 8)})
|
||||
End If
|
||||
Next
|
||||
'如果只有一张卡片,展开第一张卡片
|
||||
If PanResults.Children.Count = 1 Then
|
||||
CType(PanResults.Children(0), MyCard).IsSwaped = False
|
||||
CType(PanResults.Children(0), MyCard).IsSwapped = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Log(ex, "可视化工程下载列表出错", LogLevel.Feedback)
|
||||
@@ -270,7 +275,7 @@
|
||||
Dim Validate As New ValidateFolderName(PathMcFolder & "versions")
|
||||
If Validate.Validate(PackName) <> "" Then PackName = ""
|
||||
Dim VersionName As String = MyMsgBoxInput("输入版本名称", "", PackName, New ObjectModel.Collection(Of Validate) From {Validate})
|
||||
If String.IsNullOrEmpty(VersionName) Then Exit Sub
|
||||
If String.IsNullOrEmpty(VersionName) Then Return
|
||||
|
||||
'构造步骤加载器
|
||||
Dim Loaders As New List(Of LoaderBase)
|
||||
@@ -289,7 +294,7 @@
|
||||
Case LoadState.Aborted
|
||||
Hint(MyLoader.Name & "已取消!", HintType.Info)
|
||||
Case LoadState.Loading
|
||||
Exit Sub '不重新加载版本列表
|
||||
Return '不重新加载版本列表
|
||||
End Select
|
||||
McInstallFailedClearFolder(MyLoader)
|
||||
End Sub}
|
||||
@@ -303,7 +308,7 @@
|
||||
End Try
|
||||
End Sub
|
||||
'资源下载;整合包另存为
|
||||
Public Shared CachedFolder As String = Nothing '仅在本次缓存的下载文件夹
|
||||
Public Shared CachedFolder As New Dictionary(Of CompType, String) '仅在本次缓存的下载文件夹
|
||||
Public Sub Save_Click(sender As Object, e As EventArgs)
|
||||
Dim File As CompFile = If(TypeOf sender Is MyListItem, sender, sender.Parent).Tag
|
||||
RunInNewThread(
|
||||
@@ -319,67 +324,72 @@
|
||||
End Select
|
||||
'确认默认保存位置
|
||||
Dim DefaultFolder As String = Nothing
|
||||
If File.Type = CompType.Mod Then
|
||||
'获取 Mod 所需的加载器种类
|
||||
Dim AllowForge As Boolean? = Nothing, AllowFabric As Boolean? = Nothing
|
||||
If File.ModLoaders.Any Then '从文件中获取
|
||||
AllowForge = File.ModLoaders.Contains(CompModLoaderType.Forge) OrElse File.ModLoaders.Contains(CompModLoaderType.NeoForge)
|
||||
AllowFabric = File.ModLoaders.Contains(CompModLoaderType.Fabric)
|
||||
ElseIf Project.ModLoaders.Any Then '从工程中获取
|
||||
AllowForge = Project.ModLoaders.Contains(CompModLoaderType.Forge) OrElse File.ModLoaders.Contains(CompModLoaderType.NeoForge)
|
||||
AllowFabric = Project.ModLoaders.Contains(CompModLoaderType.Fabric)
|
||||
If File.Type <> CompType.ModPack Then
|
||||
Dim SubFolder As String = Nothing
|
||||
Select Case Project.Type
|
||||
Case CompType.Mod : SubFolder = "mods\"
|
||||
Case CompType.ResourcePack : SubFolder = "resourcepacks\"
|
||||
Case CompType.Shader : SubFolder = "shaderpacks\"
|
||||
Case CompType.DataPack : SubFolder = "" '导航到版本根目录
|
||||
End Select
|
||||
Dim IsVersionSuitable As Func(Of McVersion, Boolean) = Nothing
|
||||
'获取资源所需的加载器
|
||||
Dim AllowedLoaders As New List(Of CompModLoaderType)
|
||||
If File.ModLoaders.Any Then
|
||||
AllowedLoaders = File.ModLoaders
|
||||
ElseIf Project.ModLoaders.Any Then
|
||||
AllowedLoaders = Project.ModLoaders
|
||||
End If
|
||||
If AllowForge IsNot Nothing AndAlso Not AllowForge AndAlso
|
||||
AllowFabric IsNot Nothing AndAlso Not AllowFabric Then
|
||||
AllowForge = Nothing : AllowFabric = Nothing
|
||||
End If
|
||||
Log("[Comp] 允许 Forge:" & If(AllowForge, "未知") & ",允许 Fabric:" & If(AllowFabric, "未知"))
|
||||
'判断某个版本是否符合要求
|
||||
Dim IsVersionSuitable As Func(Of McVersion, Boolean) =
|
||||
Log($"[Comp] {Desc}要求的加载器种类:" & If(AllowedLoaders.Any(), AllowedLoaders.Join(" / "), "无要求"))
|
||||
'判断某个版本是否符合资源要求
|
||||
IsVersionSuitable =
|
||||
Function(Version)
|
||||
If Not Version.IsLoaded Then Version.Load()
|
||||
If Not Version.Modable Then Return False
|
||||
If File.GameVersions.Any(Function(v) v.Contains(".")) AndAlso
|
||||
Not File.GameVersions.Any(Function(v) v.Contains(".") AndAlso v = Version.Version.McName) Then Return False
|
||||
If AllowForge Is Nothing OrElse AllowFabric Is Nothing Then Return True
|
||||
If AllowForge AndAlso (Version.Version.HasForge OrElse Version.Version.HasNeoForge) Then Return True
|
||||
If AllowFabric AndAlso Version.Version.HasFabric Then Return True
|
||||
'只对 Mod 和数据包进行版本检测
|
||||
If Project.Type = CompType.Mod OrElse Project.Type = CompType.DataPack Then
|
||||
If File.GameVersions.Any(Function(v) v.Contains(".")) AndAlso
|
||||
Not File.GameVersions.Any(Function(v) v.Contains(".") AndAlso v = Version.Version.McName) Then Return False
|
||||
End If
|
||||
'加载器
|
||||
If Not AllowedLoaders.Any() Then Return True '无要求
|
||||
If AllowedLoaders.Contains(CompModLoaderType.Forge) AndAlso Version.Version.HasForge Then Return True
|
||||
If AllowedLoaders.Contains(CompModLoaderType.Fabric) AndAlso Version.Version.HasFabric Then Return True
|
||||
If AllowedLoaders.Contains(CompModLoaderType.NeoForge) AndAlso Version.Version.HasNeoForge Then Return True
|
||||
If AllowedLoaders.Contains(CompModLoaderType.LiteLoader) AndAlso Version.Version.HasLiteLoader Then Return True
|
||||
Return False
|
||||
End Function
|
||||
'获取 Mod 默认下载位置
|
||||
If CachedFolder IsNot Nothing Then
|
||||
DefaultFolder = CachedFolder
|
||||
Log("[Comp] 使用上次下载时的文件夹作为默认下载位置")
|
||||
'获取常规资源默认下载位置
|
||||
If CachedFolder.ContainsKey(Project.Type) Then
|
||||
DefaultFolder = CachedFolder(Project.Type)
|
||||
Log($"[Comp] 使用上次下载时的文件夹作为默认下载位置:{DefaultFolder}")
|
||||
ElseIf McVersionCurrent IsNot Nothing AndAlso IsVersionSuitable(McVersionCurrent) Then
|
||||
DefaultFolder = McVersionCurrent.PathIndie & "mods\"
|
||||
DefaultFolder = $"{McVersionCurrent.PathIndie}{SubFolder}"
|
||||
Directory.CreateDirectory(DefaultFolder)
|
||||
Log("[Comp] 使用当前版本的 mods 文件夹作为默认下载位置(" & McVersionCurrent.Name & ")")
|
||||
Log($"[Comp] 使用当前版本作为默认下载位置:{DefaultFolder}")
|
||||
Else
|
||||
'查找所有可能的版本
|
||||
Dim NeedLoad As Boolean = McVersionListLoader.State <> LoadState.Finished
|
||||
If NeedLoad Then
|
||||
Hint("正在查找适合的游戏版本……")
|
||||
LoaderFolderRun(McVersionListLoader, PathMcFolder, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\", WaitForExit:=True)
|
||||
End If
|
||||
Dim SuitableVersions As New List(Of McVersion)
|
||||
For Each Version As McVersion In McVersionList.Values.SelectMany(Function(l) l)
|
||||
If IsVersionSuitable(Version) Then SuitableVersions.Add(Version)
|
||||
Next
|
||||
If Not SuitableVersions.Any() Then
|
||||
Dim SuitableVersions = McVersionList.Values.SelectMany(Function(l) l).Where(Function(v) IsVersionSuitable(v)).
|
||||
Select(Function(v) New DirectoryInfo($"{v.PathIndie}{SubFolder}"))
|
||||
If SuitableVersions.Any Then
|
||||
Dim SelectedVersion = SuitableVersions.
|
||||
OrderByDescending(Function(Dir) If(Dir.Exists, Dir.LastWriteTimeUtc, Date.MinValue)). '先按文件夹更改时间降序
|
||||
ThenByDescending(Function(Dir) If(Dir.Exists, Dir.GetFiles().Length, -1)). '再按文件夹中的文件数量降序
|
||||
First()
|
||||
DefaultFolder = SelectedVersion.FullName
|
||||
Directory.CreateDirectory(DefaultFolder)
|
||||
Log($"[Comp] 使用适合的游戏版本作为默认下载位置:{DefaultFolder}")
|
||||
Else
|
||||
DefaultFolder = PathMcFolder
|
||||
If NeedLoad Then
|
||||
Hint("当前 MC 文件夹中没有找到适合这个 Mod 的版本!")
|
||||
Hint("当前 MC 文件夹中没有找到适合此资源的版本!")
|
||||
Else
|
||||
Log("[Comp] 由于当前版本不兼容,使用当前的 MC 文件夹作为默认下载位置")
|
||||
End If
|
||||
Else '选择 Mod 数量最多的版本
|
||||
Dim SelectedVersion = SuitableVersions.OrderBy(
|
||||
Function(v)
|
||||
Dim Info As New DirectoryInfo(v.PathIndie & "mods\")
|
||||
Return If(Info.Exists, Info.GetFiles().Length, -1)
|
||||
End Function).LastOrDefault()
|
||||
DefaultFolder = SelectedVersion.PathIndie & "mods\"
|
||||
Directory.CreateDirectory(DefaultFolder)
|
||||
Log("[Comp] 使用适合的游戏版本作为默认下载位置(" & SelectedVersion.Name & ")")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -412,10 +422,10 @@
|
||||
If(File.Type = CompType.Mod,
|
||||
If(File.FileName.EndsWith(".litemod"), "*.litemod", "*.jar"),
|
||||
If(File.FileName.EndsWith(".mrpack"), "*.mrpack", "*.zip")), DefaultFolder)
|
||||
If Not Target.Contains("\") Then Exit Sub
|
||||
If Not Target.Contains("\") Then Return
|
||||
'构造步骤加载器
|
||||
Dim LoaderName As String = Desc & "下载:" & GetFileNameWithoutExtentionFromPath(Target) & " "
|
||||
If Target <> DefaultFolder AndAlso File.Type = CompType.Mod Then CachedFolder = GetPathFromFullPath(Target)
|
||||
If Target <> DefaultFolder Then CachedFolder(Project.Type) = GetPathFromFullPath(Target)
|
||||
Dim Loaders As New List(Of LoaderBase)
|
||||
Loaders.Add(New LoaderDownload("下载文件", New List(Of NetFile) From {File.ToNetFile(Target)}) With {.ProgressWeight = 6, .Block = True})
|
||||
'启动
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="战斗" Tag="/combat" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="实用" Tag="/utility" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="改良" Tag="/tweaks" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="神经病" Tag="/cursed" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="鬼畜" Tag="/cursed" />
|
||||
|
||||
<local:MyComboBoxItem Content="特性" IsEnabled="False" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="含实体" Tag="/entities" />
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="卡通风" Tag="/cartoon" />
|
||||
|
||||
<local:MyComboBoxItem Content="特性" IsEnabled="False" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="原版可用" Tag="/vanilla" ToolTip="作为资源包加载,可以直接在原版游戏里使用。" ToolTipService.HorizontalOffset="70" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="彩色光照" Tag="/colored-lighting" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="路径追踪" Tag="/path-tracing" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="PBR" Tag="/pbr" />
|
||||
@@ -26,6 +25,10 @@
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="低" Tag="/low" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="中" Tag="/medium" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="高" Tag="/high" />
|
||||
|
||||
|
||||
<local:MyComboBoxItem Content="加载器" IsEnabled="False" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="原版可用" Tag="/vanilla" ToolTip="作为资源包加载,可以直接在原版游戏里使用。" ToolTipService.HorizontalOffset="70" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="Iris" Tag="/iris" />
|
||||
<local:MyComboBoxItem Margin="15,0,0,0" Content="OptiFine" Tag="/optifine" />
|
||||
</local:PageComp>
|
||||
</local:MyPageRight>
|
||||
|
||||
@@ -217,14 +217,14 @@ Public Module ModDownloadLib
|
||||
Dim Id = Version.Title
|
||||
Dim JsonUrl = Version.Tag("url").ToString
|
||||
Dim VersionFolder As String = SelectFolder()
|
||||
If Not VersionFolder.Contains("\") Then Exit Sub
|
||||
If Not VersionFolder.Contains("\") Then Return
|
||||
VersionFolder = VersionFolder & Id & "\"
|
||||
|
||||
'重复任务检查
|
||||
For Each OngoingLoader In LoaderTaskbar.ToList()
|
||||
If OngoingLoader.Name <> $"Minecraft {Id} 服务端下载" Then Continue For
|
||||
Hint("该服务端正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
|
||||
Dim Loaders As New List(Of LoaderBase)
|
||||
@@ -244,7 +244,7 @@ Public Module ModDownloadLib
|
||||
Hint($"Mojang 没有给 Minecraft {Id} 提供官方服务端下载,没法下,撤退!", HintType.Critical)
|
||||
Thread.Sleep(2000) '等玩家把上一个提示看完
|
||||
Task.Abort()
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
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"))
|
||||
@@ -294,14 +294,14 @@ pause"
|
||||
Dim Id = Version.Title
|
||||
Dim JsonUrl = Version.Tag("url").ToString
|
||||
Dim VersionFolder As String = SelectFolder()
|
||||
If Not VersionFolder.Contains("\") Then Exit Sub
|
||||
If Not VersionFolder.Contains("\") Then Return
|
||||
VersionFolder = VersionFolder & Id & "\"
|
||||
|
||||
'重复任务检查
|
||||
For Each OngoingLoader In LoaderTaskbar.ToList()
|
||||
If OngoingLoader.Name <> $"Minecraft {Id} 下载" Then Continue For
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
|
||||
Dim Loaders As New List(Of LoaderBase)
|
||||
@@ -383,7 +383,7 @@ pause"
|
||||
WikiName = "Java版Pre-classic_" & Id
|
||||
Else
|
||||
Log("[Error] 未知的版本格式:" & Id & "。", LogLevel.Feedback)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
OpenWebsite("https://zh.minecraft.wiki/w/" & WikiName.Replace("_experimental-snapshot-", "-exp"))
|
||||
End Sub
|
||||
@@ -396,13 +396,13 @@ pause"
|
||||
Try
|
||||
Dim Id As String = DownloadInfo.NameVersion
|
||||
Dim Target As String = SelectSaveFile("选择保存位置", DownloadInfo.NameFile, "OptiFine Jar (*.jar)|*.jar")
|
||||
If Not Target.Contains("\") Then Exit Sub
|
||||
If Not Target.Contains("\") Then Return
|
||||
|
||||
'重复任务检查
|
||||
For Each OngoingLoader In LoaderTaskbar.ToList()
|
||||
If OngoingLoader.Name <> $"OptiFine {DownloadInfo.NameDisplay} 下载" Then Continue For
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
|
||||
Dim Loader As New LoaderCombo(Of DlOptiFineListEntry)("OptiFine " & DownloadInfo.NameDisplay & " 下载", McDownloadOptiFineSaveLoader(DownloadInfo, Target)) With {.OnStateChanged = AddressOf LoaderStateChangedHintOnly}
|
||||
@@ -434,7 +434,7 @@ pause"
|
||||
End Try
|
||||
'检查下载结果
|
||||
Java = JavaSelect("已取消安装。", New Version(1, 8, 0, 0))
|
||||
If Task.IsAborted Then Exit Sub
|
||||
If Task.IsAborted Then Return
|
||||
If Java Is Nothing Then Throw New Exception("由于未找到 Java,已取消安装。")
|
||||
End If
|
||||
End SyncLock
|
||||
@@ -570,7 +570,8 @@ pause"
|
||||
'官方源
|
||||
Dim PageData As String
|
||||
Try
|
||||
PageData = NetGetCodeByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile, New UTF8Encoding(False), 15000, "text/html", True)
|
||||
PageData = NetRequestByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile,
|
||||
Encoding:=New UTF8Encoding(False), Timeout:=15000, Accept:="text/html", UseBrowserUserAgent:=True)
|
||||
Task.Progress = 0.8
|
||||
Sources.Add("https://optifine.net/" & RegexSearch(PageData, "downloadx\?f=[^""']+")(0))
|
||||
Log("[Download] OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址:" & Sources.Last)
|
||||
@@ -584,7 +585,7 @@ pause"
|
||||
Loaders.Add(New LoaderTask(Of List(Of NetFile), Boolean)("等待原版下载",
|
||||
Sub(Task As LoaderTask(Of List(Of NetFile), Boolean))
|
||||
'等待原版文件下载完成
|
||||
If ClientDownloadLoader Is Nothing Then Exit Sub
|
||||
If ClientDownloadLoader Is Nothing Then Return
|
||||
Dim TargetLoaders As List(Of LoaderBase) =
|
||||
ClientDownloadLoader.GetLoaderList.Where(Function(l) l.Name = McDownloadClientLibName OrElse l.Name = McDownloadClientJsonName).
|
||||
Where(Function(l) l.State <> LoadState.Finished).ToList
|
||||
@@ -593,9 +594,9 @@ pause"
|
||||
TargetLoaders = TargetLoaders.Where(Function(l) l.State <> LoadState.Finished).ToList
|
||||
Thread.Sleep(50)
|
||||
Loop
|
||||
If Task.IsAborted Then Exit Sub
|
||||
If Task.IsAborted Then Return
|
||||
'拷贝原版文件
|
||||
If Not IsCustomFolder Then Exit Sub
|
||||
If Not IsCustomFolder Then Return
|
||||
SyncLock VanillaSyncLock
|
||||
Dim ClientName As String = GetFolderNameFromPath(ClientFolder)
|
||||
Directory.CreateDirectory(McFolder & "versions\" & DownloadInfo.Inherit)
|
||||
@@ -707,7 +708,7 @@ Retry:
|
||||
'下载支持库
|
||||
If FixLibrary Then
|
||||
Loaders.Add(New LoaderTask(Of String, List(Of NetFile))("分析 OptiFine 支持库文件",
|
||||
Sub(Task As LoaderTask(Of String, List(Of NetFile))) Task.Output = McLibFix(New McVersion(VersionFolder))) With {.ProgressWeight = 1, .Show = False})
|
||||
Sub(Task) Task.Output = McLibFix(New McVersion(VersionFolder))) With {.ProgressWeight = 1, .Show = False})
|
||||
Loaders.Add(New LoaderDownload("下载 OptiFine 支持库文件", New List(Of NetFile)) With {.ProgressWeight = 4})
|
||||
End If
|
||||
|
||||
@@ -733,7 +734,8 @@ Retry:
|
||||
'官方源
|
||||
Dim PageData As String
|
||||
Try
|
||||
PageData = NetGetCodeByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile, New UTF8Encoding(False), 15000, "text/html", True)
|
||||
PageData = NetRequestByClient("https://optifine.net/adloadx?f=" & DownloadInfo.NameFile,
|
||||
Encoding:=New UTF8Encoding(False), Timeout:=15000, Accept:="text/html", UseBrowserUserAgent:=True)
|
||||
Task.Progress = 0.8
|
||||
Sources.Add("https://optifine.net/" & RegexSearch(PageData, "downloadx\?f=[^""']+")(0))
|
||||
Log("[Download] OptiFine " & DownloadInfo.NameDisplay & " 官方下载地址:" & Sources.Last)
|
||||
@@ -831,7 +833,7 @@ Retry:
|
||||
For Each OngoingLoader In LoaderTaskbar.ToList()
|
||||
If OngoingLoader.Name <> $"LiteLoader {Id} 下载" Then Continue For
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
|
||||
'已有版本检查
|
||||
@@ -840,7 +842,7 @@ Retry:
|
||||
File.Delete(VersionFolder & VersionName & ".jar")
|
||||
File.Delete(VersionFolder & VersionName & ".json")
|
||||
Else
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -859,13 +861,13 @@ Retry:
|
||||
Try
|
||||
Dim Id As String = DownloadInfo.Inherit
|
||||
Dim Target As String = SelectSaveFile("选择保存位置", DownloadInfo.FileName.Replace("-SNAPSHOT", ""), "LiteLoader 安装器 (*.jar)|*.jar")
|
||||
If Not Target.Contains("\") Then Exit Sub
|
||||
If Not Target.Contains("\") Then Return
|
||||
|
||||
'重复任务检查
|
||||
For Each OngoingLoader In LoaderTaskbar.ToList()
|
||||
If OngoingLoader.Name <> $"LiteLoader {Id} 下载" Then Continue For
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
|
||||
'构造步骤加载器
|
||||
@@ -1041,13 +1043,13 @@ Retry:
|
||||
Dim Target As String = SelectSaveFile("选择保存位置", $"{Info.LoaderName}-{Info.Inherit}-{Info.VersionName}.{Info.FileExtension}",
|
||||
$"{Info.LoaderName} 安装器 (*.{Info.FileExtension})|*.{Info.FileExtension}")
|
||||
Dim DisplayName As String = $"{Info.LoaderName} {Info.Inherit} - {Info.VersionName}"
|
||||
If Not Target.Contains("\") Then Exit Sub
|
||||
If Not Target.Contains("\") Then Return
|
||||
|
||||
'重复任务检查
|
||||
For Each OngoingLoader In LoaderTaskbar.ToList()
|
||||
If OngoingLoader.Name <> $"{DisplayName} 下载" Then Continue For
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
|
||||
'获取下载地址
|
||||
@@ -1103,7 +1105,7 @@ Retry:
|
||||
End Try
|
||||
'检查下载结果
|
||||
Java = JavaSelect("已取消安装。", New Version(1, 8, 0, 60))
|
||||
If Task.IsAborted Then Exit Sub
|
||||
If Task.IsAborted Then Return
|
||||
If Java Is Nothing Then Throw New Exception("由于未找到 Java,已取消安装。")
|
||||
End If
|
||||
End SyncLock
|
||||
@@ -1189,7 +1191,7 @@ Retry:
|
||||
errorWaitHandle.WaitOne(10000)
|
||||
process.Dispose()
|
||||
'检查是否安装成功:最后 5 行中是否有 true(true 可能在倒数数行,见 #832)
|
||||
If LastResults.Reverse().Take(5).Any(Function(l) l = "true") Then Exit Sub
|
||||
If LastResults.Reverse().Take(5).Any(Function(l) l = "true") Then Return
|
||||
Log(Join(LastResults, vbCrLf))
|
||||
Dim LastLines As String = ""
|
||||
For i As Integer = Math.Max(0, LastResults.Count - 5) To LastResults.Count - 1 '最后 5 行
|
||||
@@ -1237,7 +1239,7 @@ Retry:
|
||||
Task.Progress = 0.91
|
||||
Case Else
|
||||
If ModeDebug Then Log("[Installer] " & Content)
|
||||
Exit Sub
|
||||
Return
|
||||
End Select
|
||||
Log("[Installer] " & Content)
|
||||
End Sub
|
||||
@@ -1282,7 +1284,7 @@ Retry:
|
||||
For Each ForgeVersion In ForgeLoader.Output
|
||||
If VersionSortInteger(ForgeVersion.Version.ToString, LoaderVersion) = 0 Then
|
||||
Info = ForgeVersion
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
Throw New Exception($"未能找到 {LoaderName} " & Inherit & "-" & LoaderVersion & " 的详细信息!")
|
||||
@@ -1340,7 +1342,7 @@ Retry:
|
||||
If Json("data") IsNot Nothing AndAlso Json("data")("MOJMAPS") IsNot Nothing Then
|
||||
'下载原版 Json 文件
|
||||
Task.Progress = 0.4
|
||||
Dim RawJson As JObject = GetJson(NetGetCodeByLoader(DlSourceLauncherOrMetaGet(DlClientListGet(Inherit)), IsJson:=True))
|
||||
Dim RawJson As JObject = GetJson(NetRequestByLoader(DlSourceLauncherOrMetaGet(DlClientListGet(Inherit)), IsJson:=True))
|
||||
'[net.minecraft:client:1.17.1-20210706.113038:mappings@txt] 或 @tsrg]
|
||||
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))
|
||||
@@ -1385,7 +1387,7 @@ Retry:
|
||||
#End Region
|
||||
#Region "原版文件"
|
||||
'等待原版文件下载完成
|
||||
If ClientDownloadLoader Is Nothing Then Exit Sub
|
||||
If ClientDownloadLoader Is Nothing Then Return
|
||||
Dim TargetLoaders As List(Of LoaderBase) =
|
||||
ClientDownloadLoader.GetLoaderList.Where(Function(l) l.Name = McDownloadClientLibName OrElse l.Name = McDownloadClientJsonName).
|
||||
Where(Function(l) l.State <> LoadState.Finished).ToList()
|
||||
@@ -1394,9 +1396,9 @@ Retry:
|
||||
TargetLoaders = TargetLoaders.Where(Function(l) l.State <> LoadState.Finished).ToList
|
||||
Thread.Sleep(50)
|
||||
Loop
|
||||
If Task.IsAborted Then Exit Sub
|
||||
If Task.IsAborted Then Return
|
||||
'拷贝原版文件
|
||||
If Not IsCustomFolder Then Exit Sub
|
||||
If Not IsCustomFolder Then Return
|
||||
SyncLock VanillaSyncLock
|
||||
Dim ClientName As String = GetFolderNameFromPath(ClientFolder)
|
||||
Directory.CreateDirectory(McFolder & "versions\" & Inherit)
|
||||
@@ -1639,32 +1641,33 @@ Retry:
|
||||
''' 尝试刷新 Forge 推荐版本缓存。
|
||||
''' </summary>
|
||||
Public Sub McDownloadForgeRecommendedRefresh()
|
||||
If IsForgeRecommendedRefreshed Then Exit Sub
|
||||
If IsForgeRecommendedRefreshed Then Return
|
||||
IsForgeRecommendedRefreshed = True
|
||||
RunInNewThread(Sub()
|
||||
Try
|
||||
Log("[Download] 刷新 Forge 推荐版本缓存开始")
|
||||
Dim Result As String = NetGetCodeByLoader("https://bmclapi2.bangbang93.com/forge/promos")
|
||||
If Result.Length < 1000 Then Throw New Exception("获取的结果过短(" & Result & ")")
|
||||
Dim ResultJson As JContainer = GetJson(Result)
|
||||
'获取所有推荐版本列表
|
||||
Dim RecommendedList As New List(Of String)
|
||||
For Each Version As JObject In ResultJson
|
||||
If Version("name") Is Nothing OrElse Version("build") Is Nothing Then Continue For
|
||||
Dim Name As String = Version("name")
|
||||
If Not Name.EndsWithF("-recommended") Then Continue For
|
||||
'内容为:"1.15.2":"31.2.0"
|
||||
RecommendedList.Add("""" & Name.Replace("-recommended", """:""" & Version("build")("version").ToString & """"))
|
||||
Next
|
||||
If RecommendedList.Count < 5 Then Throw New Exception("获取的推荐版本数过少(" & Result & ")")
|
||||
'保存
|
||||
Dim CacheJson As String = "{" & Join(RecommendedList, ",") & "}"
|
||||
WriteFile(PathTemp & "Cache\ForgeRecommendedList.json", CacheJson)
|
||||
Log("[Download] 刷新 Forge 推荐版本缓存成功")
|
||||
Catch ex As Exception
|
||||
Log(ex, "刷新 Forge 推荐版本缓存失败")
|
||||
End Try
|
||||
End Sub, "ForgeRecommendedRefresh")
|
||||
RunInNewThread(
|
||||
Sub()
|
||||
Try
|
||||
Log("[Download] 刷新 Forge 推荐版本缓存开始")
|
||||
Dim Result As String = NetRequestByClientRetry("https://bmclapi2.bangbang93.com/forge/promos")
|
||||
If Result.Length < 1000 Then Throw New Exception("获取的结果过短(" & Result & ")")
|
||||
Dim ResultJson As JContainer = GetJson(Result)
|
||||
'获取所有推荐版本列表
|
||||
Dim RecommendedList As New List(Of String)
|
||||
For Each Version As JObject In ResultJson
|
||||
If Version("name") Is Nothing OrElse Version("build") Is Nothing Then Continue For
|
||||
Dim Name As String = Version("name")
|
||||
If Not Name.EndsWithF("-recommended") Then Continue For
|
||||
'内容为:"1.15.2":"31.2.0"
|
||||
RecommendedList.Add("""" & Name.Replace("-recommended", """:""" & Version("build")("version").ToString & """"))
|
||||
Next
|
||||
If RecommendedList.Count < 5 Then Throw New Exception("获取的推荐版本数过少(" & Result & ")")
|
||||
'保存
|
||||
Dim CacheJson As String = "{" & Join(RecommendedList, ",") & "}"
|
||||
WriteFile(PathTemp & "Cache\ForgeRecommendedList.json", CacheJson)
|
||||
Log("[Download] 刷新 Forge 推荐版本缓存成功")
|
||||
Catch ex As Exception
|
||||
Log(ex, "刷新 Forge 推荐版本缓存失败")
|
||||
End Try
|
||||
End Sub, "ForgeRecommendedRefresh")
|
||||
End Sub
|
||||
Private IsForgeRecommendedRefreshed As Boolean = False
|
||||
|
||||
@@ -1795,13 +1798,13 @@ Retry:
|
||||
Dim FileName As String = GetFileNameFromPath(Url)
|
||||
Dim Version As String = GetFileNameFromPath(DownloadInfo("version").ToString)
|
||||
Dim Target As String = SelectSaveFile("选择保存位置", FileName, "Fabric 安装器 (*.jar)|*.jar")
|
||||
If Not Target.Contains("\") Then Exit Sub
|
||||
If Not Target.Contains("\") Then Return
|
||||
|
||||
'重复任务检查
|
||||
For Each OngoingLoader In LoaderTaskbar.ToList()
|
||||
If OngoingLoader.Name <> $"Fabric {Version} 安装器下载" Then Continue For
|
||||
Hint("该版本正在下载中!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
|
||||
'构造步骤加载器
|
||||
@@ -2006,7 +2009,7 @@ Retry:
|
||||
Case LoadState.Aborted
|
||||
Hint(Loader.Name & "已取消!", HintType.Info)
|
||||
Case LoadState.Loading
|
||||
Exit Sub '不重新加载版本列表
|
||||
Return '不重新加载版本列表
|
||||
End Select
|
||||
McInstallFailedClearFolder(Loader)
|
||||
LoaderFolderRun(McVersionListLoader, PathMcFolder, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\")
|
||||
@@ -2163,13 +2166,17 @@ Retry:
|
||||
'迁移文件
|
||||
If Directory.Exists(TempMcFolder & "libraries") Then CopyDirectory(TempMcFolder & "libraries", PathMcFolder & "libraries")
|
||||
Task.Progress = 0.8
|
||||
'创建 Mod 和资源包文件夹
|
||||
Dim ModsFolder = New McVersion(VersionFolder).PathIndie & "mods\" '版本隔离信息在此时被决定
|
||||
If Directory.Exists(ModsTempFolder) Then
|
||||
CopyDirectory(ModsTempFolder, ModsFolder)
|
||||
ElseIf Modable Then
|
||||
Directory.CreateDirectory(ModsFolder)
|
||||
Log("[Download] 自动创建 mods 文件夹:" & ModsFolder)
|
||||
Log("[Download] 自动创建 Mod 文件夹:" & ModsFolder)
|
||||
End If
|
||||
Dim ResourcepacksFolder = New McVersion(VersionFolder).PathIndie & "resourcepacks\"
|
||||
Directory.CreateDirectory(ResourcepacksFolder)
|
||||
Log("[Download] 自动创建资源包文件夹:" & ResourcepacksFolder)
|
||||
End Sub) With {.ProgressWeight = 2, .Block = True})
|
||||
'补全文件
|
||||
If 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
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
Dim NewStack As New StackPanel With {.Margin = New Thickness(20, MyCard.SwapedHeight, 18, 0), .VerticalAlignment = VerticalAlignment.Top, .RenderTransform = New TranslateTransform(0, 0), .Tag = Pair.Value}
|
||||
NewCard.Children.Add(NewStack)
|
||||
NewCard.SwapControl = NewStack
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
Dim NewStack As New StackPanel With {.Margin = New Thickness(20, MyCard.SwapedHeight, 18, 0), .VerticalAlignment = VerticalAlignment.Top, .RenderTransform = New TranslateTransform(0, 0), .Tag = Version}
|
||||
NewCard.Children.Add(NewStack)
|
||||
NewCard.SwapControl = NewStack
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
''非官方源警示
|
||||
@@ -42,7 +42,7 @@
|
||||
End If
|
||||
End Sub
|
||||
Public Sub Forge_StateChanged(sender As MyLoading, newState As MyLoading.MyLoadingState, oldState As MyLoading.MyLoadingState)
|
||||
If newState <> MyLoading.MyLoadingState.Stop Then Exit Sub
|
||||
If newState <> MyLoading.MyLoadingState.Stop Then Return
|
||||
|
||||
Dim Card As MyCard = CType(sender.Parent, FrameworkElement).Parent
|
||||
Dim Loader As LoaderTask(Of String, List(Of DlForgeVersionEntry)) = sender.State
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
<local:MyImage x:Name="ImgLogo" Margin="52,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Height="32" RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
<local:MyTextBox Margin="93,0,16,0" Padding="-1,0" MinHeight="30" FontSize="15" VerticalAlignment="Center" x:Name="TextSelectName" MaxLength="70" HasBackground="False" />
|
||||
</local:MyCard>
|
||||
<local:MyHint Text="如果不安装 Fabric API,大多数 Mod 都会无法使用!" Margin="0,10,0,0" x:Name="HintFabricAPI" IsWarn="True" />
|
||||
<local:MyHint Text="必须安装 OptiFabric 才能正常使用 OptiFine!" Margin="0,10,0,0" x:Name="HintOptiFabric" IsWarn="True" />
|
||||
<local:MyHint Text="安装结束后,请在 Mod 下载中搜索 OptiFabric Origins 并下载,否则 OptiFine 会无法使用!" Margin="0,10,0,0" x:Name="HintOptiFabricOld" IsWarn="False" />
|
||||
<local:MyHint Text="OptiFine 与一部分 Mod 的兼容性不佳,请谨慎安装。" Margin="0,10,0,0" x:Name="HintModOptiFine" IsWarn="False" />
|
||||
<local:MyCard Title="Forge" Height="40" Margin="0,12,0,0" x:Name="CardForge" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<local:MyHint Text="如果不安装 Fabric API,大多数 Mod 都会无法使用!" Margin="0,10,0,0" x:Name="HintFabricAPI" Theme="Red" />
|
||||
<local:MyHint Text="必须安装 OptiFabric 才能正常使用 OptiFine!" Margin="0,10,0,0" x:Name="HintOptiFabric" Theme="Red" />
|
||||
<local:MyHint Text="安装结束后,请在 Mod 下载中搜索 OptiFabric Origins 并下载,否则 OptiFine 会无法使用!" Margin="0,10,0,0" x:Name="HintOptiFabricOld" Theme="Yellow" />
|
||||
<local:MyHint Text="OptiFine 与一部分 Mod 的兼容性不佳,请谨慎安装。" Margin="0,10,0,0" x:Name="HintModOptiFine" Theme="Yellow" />
|
||||
<local:MyCard Title="Forge" Height="40" Margin="0,12,0,0" x:Name="CardForge" IsSwapped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanForge" />
|
||||
<Grid x:Name="PanForgeInfo" Height="18" Margin="132,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
<Grid.RenderTransform>
|
||||
@@ -45,7 +45,7 @@
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="NeoForge" Height="40" Margin="0,12,0,0" x:Name="CardNeoForge" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<local:MyCard Title="NeoForge" Height="40" Margin="0,12,0,0" x:Name="CardNeoForge" IsSwapped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanNeoForge" />
|
||||
<Grid x:Name="PanNeoForgeInfo" Height="18" Margin="132,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
<Grid.RenderTransform>
|
||||
@@ -63,7 +63,7 @@
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="Fabric" Height="40" Margin="0,12,0,0" x:Name="CardFabric" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<local:MyCard Title="Fabric" Height="40" Margin="0,12,0,0" x:Name="CardFabric" IsSwapped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanFabric" />
|
||||
<Grid x:Name="PanFabricInfo" Height="18" Margin="132,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
<Grid.RenderTransform>
|
||||
@@ -81,7 +81,7 @@
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="Fabric API" Height="40" Margin="0,12,0,0" x:Name="CardFabricApi" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<local:MyCard Title="Fabric API" Height="40" Margin="0,12,0,0" x:Name="CardFabricApi" IsSwapped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanFabricApi" />
|
||||
<Grid x:Name="PanFabricApiInfo" Height="18" Margin="132,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
<Grid.RenderTransform>
|
||||
@@ -99,7 +99,7 @@
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="OptiFine" Height="40" Margin="0,12,0,0" x:Name="CardOptiFine" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<local:MyCard Title="OptiFine" Height="40" Margin="0,12,0,0" x:Name="CardOptiFine" IsSwapped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top">
|
||||
<StackPanel Name="PanOptiFine" />
|
||||
</StackPanel>
|
||||
@@ -119,7 +119,7 @@
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="OptiFabric" Height="40" Margin="0,12,0,0" x:Name="CardOptiFabric" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<local:MyCard Title="OptiFabric" Height="40" Margin="0,12,0,0" x:Name="CardOptiFabric" IsSwapped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanOptiFabric" />
|
||||
<Grid x:Name="PanOptiFabricInfo" Height="18" Margin="132,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
<Grid.RenderTransform>
|
||||
@@ -137,7 +137,7 @@
|
||||
Data="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="LiteLoader" Height="40" Margin="0,12,0,0" x:Name="CardLiteLoader" IsSwaped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<local:MyCard Title="LiteLoader" Height="40" Margin="0,12,0,0" x:Name="CardLiteLoader" IsSwapped="True" CanSwap="True" SwapLogoRight="True">
|
||||
<StackPanel Margin="20,40,18,15" VerticalAlignment="Top" Name="PanLiteLoader" />
|
||||
<Grid x:Name="PanLiteLoaderInfo" Height="18" Margin="132,11,15,0" VerticalAlignment="Top" Tag="True">
|
||||
<Grid.RenderTransform>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
SelectReload()
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
|
||||
McDownloadForgeRecommendedRefresh()
|
||||
@@ -38,7 +38,7 @@
|
||||
Public IsInSelectPage As Boolean = False
|
||||
Private IsFirstLoaded As Boolean = False
|
||||
Private Sub EnterSelectPage()
|
||||
If IsInSelectPage Then Exit Sub
|
||||
If IsInSelectPage Then Return
|
||||
IsInSelectPage = True
|
||||
|
||||
PanInner.Margin = New Thickness(25, 10, 25, 40)
|
||||
@@ -54,18 +54,13 @@
|
||||
|
||||
DisabledPageAnimControls.Remove(BtnStart)
|
||||
BtnStart.Show = True
|
||||
CardOptiFine.IsSwaped = True
|
||||
CardLiteLoader.IsSwaped = True
|
||||
CardForge.IsSwaped = True
|
||||
CardNeoForge.IsSwaped = True
|
||||
CardFabric.IsSwaped = True
|
||||
CardFabricApi.IsSwaped = True
|
||||
CardOptiFabric.IsSwaped = True
|
||||
|
||||
If Not Setup.Get("HintInstallBack") Then
|
||||
Setup.Set("HintInstallBack", True)
|
||||
Hint("点击 Minecraft 项即可返回游戏主版本选择页面!")
|
||||
End If
|
||||
CardOptiFine.IsSwapped = True
|
||||
CardLiteLoader.IsSwapped = True
|
||||
CardForge.IsSwapped = True
|
||||
CardNeoForge.IsSwapped = True
|
||||
CardFabric.IsSwapped = True
|
||||
CardFabricApi.IsSwapped = True
|
||||
CardOptiFabric.IsSwapped = True
|
||||
|
||||
'如果在选择页面按了刷新键,选择页的东西可能会由于动画被隐藏,但不会由于加载结束而再次显示,因此这里需要手动恢复
|
||||
For Each Control In GetAllAnimControls(PanSelect)
|
||||
@@ -87,8 +82,8 @@
|
||||
DlOptiFabricLoader.Start()
|
||||
|
||||
AniStart({
|
||||
AaOpacity(PanMinecraft, -PanMinecraft.Opacity, 90, 10),
|
||||
AaTranslateX(PanMinecraft, -50 - CType(PanMinecraft.RenderTransform, TranslateTransform).X, 100, 10),
|
||||
AaOpacity(PanMinecraft, -PanMinecraft.Opacity, 70, 10),
|
||||
AaTranslateX(PanMinecraft, -50 - CType(PanMinecraft.RenderTransform, TranslateTransform).X, 90, 10),
|
||||
AaCode(
|
||||
Sub()
|
||||
PanBack.ScrollToHome()
|
||||
@@ -103,13 +98,13 @@
|
||||
SelectReload()
|
||||
PanMinecraft.Visibility = Visibility.Collapsed
|
||||
End Sub, After:=True),
|
||||
AaOpacity(PanSelect, 1 - PanSelect.Opacity, 90, 100),
|
||||
AaTranslateX(PanSelect, -CType(PanSelect.RenderTransform, TranslateTransform).X, 200, 100, Ease:=New AniEaseOutFluent(AniEasePower.ExtraStrong)),
|
||||
AaOpacity(PanSelect, 1 - PanSelect.Opacity, 70, 100),
|
||||
AaTranslateX(PanSelect, -CType(PanSelect.RenderTransform, TranslateTransform).X, 160, 100, Ease:=New AniEaseOutFluent(AniEasePower.ExtraStrong)),
|
||||
AaCode(
|
||||
Sub()
|
||||
PanBack.IsHitTestVisible = True
|
||||
'初始化 Binding
|
||||
If IsFirstLoaded Then Exit Sub
|
||||
If IsFirstLoaded Then Return
|
||||
IsFirstLoaded = True
|
||||
BtnOptiFineClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardOptiFine.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
BtnLiteLoaderClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardLiteLoader.MainTextBlock, .Mode = BindingMode.OneWay})
|
||||
@@ -122,7 +117,7 @@
|
||||
}, "FrmDownloadInstall SelectPageSwitch", True)
|
||||
End Sub
|
||||
Public Sub ExitSelectPage() Handles BtnBack.Click
|
||||
If Not IsInSelectPage Then Exit Sub
|
||||
If Not IsInSelectPage Then Return
|
||||
IsInSelectPage = False
|
||||
|
||||
PanInner.Margin = New Thickness(25, 10, 25, 25)
|
||||
@@ -137,11 +132,11 @@
|
||||
PanBack.ScrollToHome()
|
||||
|
||||
AniStart({
|
||||
AaOpacity(PanSelect, -PanSelect.Opacity, 90, 10),
|
||||
AaTranslateX(PanSelect, 50 - CType(PanSelect.RenderTransform, TranslateTransform).X, 100, 10),
|
||||
AaOpacity(PanSelect, -PanSelect.Opacity, 70, 10),
|
||||
AaTranslateX(PanSelect, 50 - CType(PanSelect.RenderTransform, TranslateTransform).X, 90, 10),
|
||||
AaCode(Sub() PanBack.ScrollToHome(), After:=True),
|
||||
AaOpacity(PanMinecraft, 1 - PanMinecraft.Opacity, 90, 100),
|
||||
AaTranslateX(PanMinecraft, -CType(PanMinecraft.RenderTransform, TranslateTransform).X, 200, 100, Ease:=New AniEaseOutFluent(AniEasePower.ExtraStrong)),
|
||||
AaOpacity(PanMinecraft, 1 - PanMinecraft.Opacity, 70, 100),
|
||||
AaTranslateX(PanMinecraft, -CType(PanMinecraft.RenderTransform, TranslateTransform).X, 160, 100, Ease:=New AniEaseOutFluent(AniEasePower.ExtraStrong)),
|
||||
AaCode(
|
||||
Sub()
|
||||
PanSelect.Visibility = Visibility.Collapsed
|
||||
@@ -168,19 +163,19 @@
|
||||
'OptiFine
|
||||
Private SelectedOptiFine As DlOptiFineListEntry = Nothing
|
||||
Private Sub SetOptiFineInfoShow(IsShow As String)
|
||||
If PanOptiFineInfo.Tag = IsShow Then Exit Sub
|
||||
If PanOptiFineInfo.Tag = IsShow Then Return
|
||||
PanOptiFineInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanOptiFineInfo, -CType(PanOptiFineInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanOptiFineInfo, 1 - PanOptiFineInfo.Opacity, 100, 90)
|
||||
AaTranslateY(PanOptiFineInfo, -CType(PanOptiFineInfo.RenderTransform, TranslateTransform).Y, 200, 100, Ease:=New AniEaseOutFluent),
|
||||
AaOpacity(PanOptiFineInfo, 1 - PanOptiFineInfo.Opacity, 80, 90)
|
||||
}, "SetOptiFineInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanOptiFineInfo, 6 - CType(PanOptiFineInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanOptiFineInfo, -PanOptiFineInfo.Opacity, 100)
|
||||
AaTranslateY(PanOptiFineInfo, 6 - CType(PanOptiFineInfo.RenderTransform, TranslateTransform).Y, 120),
|
||||
AaOpacity(PanOptiFineInfo, -PanOptiFineInfo.Opacity, 50)
|
||||
}, "SetOptiFineInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
@@ -188,19 +183,19 @@
|
||||
'LiteLoader
|
||||
Private SelectedLiteLoader As DlLiteLoaderListEntry = Nothing
|
||||
Private Sub SetLiteLoaderInfoShow(IsShow As String)
|
||||
If PanLiteLoaderInfo.Tag = IsShow Then Exit Sub
|
||||
If PanLiteLoaderInfo.Tag = IsShow Then Return
|
||||
PanLiteLoaderInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanLiteLoaderInfo, -CType(PanLiteLoaderInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanLiteLoaderInfo, 1 - PanLiteLoaderInfo.Opacity, 100, 90)
|
||||
AaTranslateY(PanLiteLoaderInfo, -CType(PanLiteLoaderInfo.RenderTransform, TranslateTransform).Y, 200, 100, Ease:=New AniEaseOutFluent),
|
||||
AaOpacity(PanLiteLoaderInfo, 1 - PanLiteLoaderInfo.Opacity, 80, 90)
|
||||
}, "SetLiteLoaderInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanLiteLoaderInfo, 6 - CType(PanLiteLoaderInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanLiteLoaderInfo, -PanLiteLoaderInfo.Opacity, 100)
|
||||
AaTranslateY(PanLiteLoaderInfo, 6 - CType(PanLiteLoaderInfo.RenderTransform, TranslateTransform).Y, 120),
|
||||
AaOpacity(PanLiteLoaderInfo, -PanLiteLoaderInfo.Opacity, 50)
|
||||
}, "SetLiteLoaderInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
@@ -208,19 +203,19 @@
|
||||
'Forge
|
||||
Private SelectedForge As DlForgeVersionEntry = Nothing
|
||||
Private Sub SetForgeInfoShow(IsShow As String)
|
||||
If PanForgeInfo.Tag = IsShow Then Exit Sub
|
||||
If PanForgeInfo.Tag = IsShow Then Return
|
||||
PanForgeInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanForgeInfo, -CType(PanForgeInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanForgeInfo, 1 - PanForgeInfo.Opacity, 100, 90)
|
||||
AaTranslateY(PanForgeInfo, -CType(PanForgeInfo.RenderTransform, TranslateTransform).Y, 200, 100, Ease:=New AniEaseOutFluent),
|
||||
AaOpacity(PanForgeInfo, 1 - PanForgeInfo.Opacity, 80, 90)
|
||||
}, "SetForgeInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanForgeInfo, 6 - CType(PanForgeInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanForgeInfo, -PanForgeInfo.Opacity, 100)
|
||||
AaTranslateY(PanForgeInfo, 6 - CType(PanForgeInfo.RenderTransform, TranslateTransform).Y, 120),
|
||||
AaOpacity(PanForgeInfo, -PanForgeInfo.Opacity, 50)
|
||||
}, "SetForgeInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
@@ -228,19 +223,19 @@
|
||||
'NeoForge
|
||||
Private SelectedNeoForge As DlNeoForgeListEntry = Nothing
|
||||
Private Sub SetNeoForgeInfoShow(IsShow As String)
|
||||
If PanNeoForgeInfo.Tag = IsShow Then Exit Sub
|
||||
If PanNeoForgeInfo.Tag = IsShow Then Return
|
||||
PanNeoForgeInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanNeoForgeInfo, -CType(PanNeoForgeInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanNeoForgeInfo, 1 - PanNeoForgeInfo.Opacity, 100, 90)
|
||||
AaTranslateY(PanNeoForgeInfo, -CType(PanNeoForgeInfo.RenderTransform, TranslateTransform).Y, 200, 100, Ease:=New AniEaseOutFluent),
|
||||
AaOpacity(PanNeoForgeInfo, 1 - PanNeoForgeInfo.Opacity, 80, 90)
|
||||
}, "SetNeoForgeInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanNeoForgeInfo, 6 - CType(PanNeoForgeInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanNeoForgeInfo, -PanNeoForgeInfo.Opacity, 100)
|
||||
AaTranslateY(PanNeoForgeInfo, 6 - CType(PanNeoForgeInfo.RenderTransform, TranslateTransform).Y, 120),
|
||||
AaOpacity(PanNeoForgeInfo, -PanNeoForgeInfo.Opacity, 50)
|
||||
}, "SetNeoForgeInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
@@ -248,19 +243,19 @@
|
||||
'Fabric
|
||||
Private SelectedFabric As String = Nothing
|
||||
Private Sub SetFabricInfoShow(IsShow As String)
|
||||
If PanFabricInfo.Tag = IsShow Then Exit Sub
|
||||
If PanFabricInfo.Tag = IsShow Then Return
|
||||
PanFabricInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanFabricInfo, -CType(PanFabricInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanFabricInfo, 1 - PanFabricInfo.Opacity, 100, 90)
|
||||
AaTranslateY(PanFabricInfo, -CType(PanFabricInfo.RenderTransform, TranslateTransform).Y, 200, 100, Ease:=New AniEaseOutFluent),
|
||||
AaOpacity(PanFabricInfo, 1 - PanFabricInfo.Opacity, 80, 90)
|
||||
}, "SetFabricInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanFabricInfo, 6 - CType(PanFabricInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanFabricInfo, -PanFabricInfo.Opacity, 100)
|
||||
AaTranslateY(PanFabricInfo, 6 - CType(PanFabricInfo.RenderTransform, TranslateTransform).Y, 120),
|
||||
AaOpacity(PanFabricInfo, -PanFabricInfo.Opacity, 50)
|
||||
}, "SetFabricInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
@@ -268,19 +263,19 @@
|
||||
'FabricApi
|
||||
Private SelectedFabricApi As CompFile = Nothing
|
||||
Private Sub SetFabricApiInfoShow(IsShow As String)
|
||||
If PanFabricApiInfo.Tag = IsShow Then Exit Sub
|
||||
If PanFabricApiInfo.Tag = IsShow Then Return
|
||||
PanFabricApiInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanFabricApiInfo, -CType(PanFabricApiInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanFabricApiInfo, 1 - PanFabricApiInfo.Opacity, 100, 90)
|
||||
AaTranslateY(PanFabricApiInfo, -CType(PanFabricApiInfo.RenderTransform, TranslateTransform).Y, 200, 100, Ease:=New AniEaseOutFluent),
|
||||
AaOpacity(PanFabricApiInfo, 1 - PanFabricApiInfo.Opacity, 80, 90)
|
||||
}, "SetFabricApiInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanFabricApiInfo, 6 - CType(PanFabricApiInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanFabricApiInfo, -PanFabricApiInfo.Opacity, 100)
|
||||
AaTranslateY(PanFabricApiInfo, 6 - CType(PanFabricApiInfo.RenderTransform, TranslateTransform).Y, 120),
|
||||
AaOpacity(PanFabricApiInfo, -PanFabricApiInfo.Opacity, 50)
|
||||
}, "SetFabricApiInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
@@ -288,19 +283,19 @@
|
||||
'OptiFabric
|
||||
Private SelectedOptiFabric As CompFile = Nothing
|
||||
Private Sub SetOptiFabricInfoShow(IsShow As String)
|
||||
If PanOptiFabricInfo.Tag = IsShow Then Exit Sub
|
||||
If PanOptiFabricInfo.Tag = IsShow Then Return
|
||||
PanOptiFabricInfo.Tag = IsShow
|
||||
If IsShow = "True" Then
|
||||
'显示信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanOptiFabricInfo, -CType(PanOptiFabricInfo.RenderTransform, TranslateTransform).Y, 270, 100, Ease:=New AniEaseOutBack),
|
||||
AaOpacity(PanOptiFabricInfo, 1 - PanOptiFabricInfo.Opacity, 100, 90)
|
||||
AaTranslateY(PanOptiFabricInfo, -CType(PanOptiFabricInfo.RenderTransform, TranslateTransform).Y, 200, 100, Ease:=New AniEaseOutFluent),
|
||||
AaOpacity(PanOptiFabricInfo, 1 - PanOptiFabricInfo.Opacity, 80, 90)
|
||||
}, "SetOptiFabricInfoShow")
|
||||
Else
|
||||
'隐藏信息栏
|
||||
AniStart({
|
||||
AaTranslateY(PanOptiFabricInfo, 6 - CType(PanOptiFabricInfo.RenderTransform, TranslateTransform).Y, 200),
|
||||
AaOpacity(PanOptiFabricInfo, -PanOptiFabricInfo.Opacity, 100)
|
||||
AaTranslateY(PanOptiFabricInfo, 6 - CType(PanOptiFabricInfo.RenderTransform, TranslateTransform).Y, 120),
|
||||
AaOpacity(PanOptiFabricInfo, -PanOptiFabricInfo.Opacity, 50)
|
||||
}, "SetOptiFabricInfoShow")
|
||||
End If
|
||||
End Sub
|
||||
@@ -310,7 +305,7 @@
|
||||
''' 重载已选择的项目的显示。
|
||||
''' </summary>
|
||||
Private Sub SelectReload() Handles CardOptiFine.Swap, LoadOptiFine.StateChanged, CardForge.Swap, LoadForge.StateChanged, CardNeoForge.Swap, LoadNeoForge.StateChanged, CardFabric.Swap, LoadFabric.StateChanged, CardFabricApi.Swap, LoadFabricApi.StateChanged, CardOptiFabric.Swap, LoadOptiFabric.StateChanged, CardLiteLoader.Swap, LoadLiteLoader.StateChanged
|
||||
If SelectedMinecraftId Is Nothing OrElse IsReloading Then Exit Sub
|
||||
If SelectedMinecraftId Is Nothing OrElse IsReloading Then Return
|
||||
IsReloading = True
|
||||
'主预览
|
||||
SelectNameUpdate()
|
||||
@@ -318,8 +313,8 @@
|
||||
'OptiFine
|
||||
Dim OptiFineError As String = LoadOptiFineGetError()
|
||||
CardOptiFine.MainSwap.Visibility = If(OptiFineError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If OptiFineError IsNot Nothing Then CardOptiFine.IsSwaped = True '例如在同时展开卡片时选择了不兼容项则强制折叠
|
||||
SetOptiFineInfoShow(CardOptiFine.IsSwaped)
|
||||
If OptiFineError IsNot Nothing Then CardOptiFine.IsSwapped = True '例如在同时展开卡片时选择了不兼容项则强制折叠
|
||||
SetOptiFineInfoShow(CardOptiFine.IsSwapped)
|
||||
If SelectedOptiFine Is Nothing Then
|
||||
BtnOptiFineClear.Visibility = Visibility.Collapsed
|
||||
ImgOptiFine.Visibility = Visibility.Collapsed
|
||||
@@ -338,8 +333,8 @@
|
||||
CardLiteLoader.Visibility = Visibility.Visible
|
||||
Dim LiteLoaderError As String = LoadLiteLoaderGetError()
|
||||
CardLiteLoader.MainSwap.Visibility = If(LiteLoaderError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If LiteLoaderError IsNot Nothing Then CardLiteLoader.IsSwaped = True '例如在同时展开卡片时选择了不兼容项则强制折叠
|
||||
SetLiteLoaderInfoShow(CardLiteLoader.IsSwaped)
|
||||
If LiteLoaderError IsNot Nothing Then CardLiteLoader.IsSwapped = True '例如在同时展开卡片时选择了不兼容项则强制折叠
|
||||
SetLiteLoaderInfoShow(CardLiteLoader.IsSwapped)
|
||||
If SelectedLiteLoader Is Nothing Then
|
||||
BtnLiteLoaderClear.Visibility = Visibility.Collapsed
|
||||
ImgLiteLoader.Visibility = Visibility.Collapsed
|
||||
@@ -355,8 +350,8 @@
|
||||
'Forge
|
||||
Dim ForgeError As String = LoadForgeGetError()
|
||||
CardForge.MainSwap.Visibility = If(ForgeError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If ForgeError IsNot Nothing Then CardForge.IsSwaped = True
|
||||
SetForgeInfoShow(CardForge.IsSwaped)
|
||||
If ForgeError IsNot Nothing Then CardForge.IsSwapped = True
|
||||
SetForgeInfoShow(CardForge.IsSwapped)
|
||||
If SelectedForge Is Nothing Then
|
||||
BtnForgeClear.Visibility = Visibility.Collapsed
|
||||
ImgForge.Visibility = Visibility.Collapsed
|
||||
@@ -379,10 +374,22 @@
|
||||
LabNeoForge.Text = If(NeoForgeError, "可以添加")
|
||||
LabNeoForge.Foreground = ColorGray4
|
||||
Else
|
||||
BtnNeoForgeClear.Visibility = Visibility.Visible
|
||||
ImgNeoForge.Visibility = Visibility.Visible
|
||||
LabNeoForge.Text = SelectedNeoForge.VersionName
|
||||
LabNeoForge.Foreground = ColorGray1
|
||||
CardNeoForge.Visibility = Visibility.Visible
|
||||
Dim NeoForgeError As String = LoadNeoForgeGetError()
|
||||
CardNeoForge.MainSwap.Visibility = If(NeoForgeError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If NeoForgeError IsNot Nothing Then CardNeoForge.IsSwapped = True
|
||||
SetNeoForgeInfoShow(CardNeoForge.IsSwapped)
|
||||
If SelectedNeoForge Is Nothing Then
|
||||
BtnNeoForgeClear.Visibility = Visibility.Collapsed
|
||||
ImgNeoForge.Visibility = Visibility.Collapsed
|
||||
LabNeoForge.Text = If(NeoForgeError, "可以添加")
|
||||
LabNeoForge.Foreground = ColorGray4
|
||||
Else
|
||||
BtnNeoForgeClear.Visibility = Visibility.Visible
|
||||
ImgNeoForge.Visibility = Visibility.Visible
|
||||
LabNeoForge.Text = SelectedNeoForge.VersionName
|
||||
LabNeoForge.Foreground = ColorGray1
|
||||
End If
|
||||
End If
|
||||
'Fabric
|
||||
If SelectedMinecraftId.Contains("1.") AndAlso Val(SelectedMinecraftId.Split(".")(1)) <= 13 Then
|
||||
@@ -391,8 +398,8 @@
|
||||
CardFabric.Visibility = Visibility.Visible
|
||||
Dim FabricError As String = LoadFabricGetError()
|
||||
CardFabric.MainSwap.Visibility = If(FabricError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If FabricError IsNot Nothing Then CardFabric.IsSwaped = True
|
||||
SetFabricInfoShow(CardFabric.IsSwaped)
|
||||
If FabricError IsNot Nothing Then CardFabric.IsSwapped = True
|
||||
SetFabricInfoShow(CardFabric.IsSwapped)
|
||||
If SelectedFabric Is Nothing Then
|
||||
BtnFabricClear.Visibility = Visibility.Collapsed
|
||||
ImgFabric.Visibility = Visibility.Collapsed
|
||||
@@ -412,8 +419,8 @@
|
||||
CardFabricApi.Visibility = Visibility.Visible
|
||||
Dim FabricApiError As String = LoadFabricApiGetError()
|
||||
CardFabricApi.MainSwap.Visibility = If(FabricApiError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If FabricApiError IsNot Nothing OrElse SelectedFabric Is Nothing Then CardFabricApi.IsSwaped = True
|
||||
SetFabricApiInfoShow(CardFabricApi.IsSwaped)
|
||||
If FabricApiError IsNot Nothing OrElse SelectedFabric Is Nothing Then CardFabricApi.IsSwapped = True
|
||||
SetFabricApiInfoShow(CardFabricApi.IsSwapped)
|
||||
If SelectedFabricApi Is Nothing Then
|
||||
BtnFabricApiClear.Visibility = Visibility.Collapsed
|
||||
ImgFabricApi.Visibility = Visibility.Collapsed
|
||||
@@ -433,8 +440,8 @@
|
||||
CardOptiFabric.Visibility = Visibility.Visible
|
||||
Dim OptiFabricError As String = LoadOptiFabricGetError()
|
||||
CardOptiFabric.MainSwap.Visibility = If(OptiFabricError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
||||
If OptiFabricError IsNot Nothing OrElse SelectedFabric Is Nothing Then CardOptiFabric.IsSwaped = True
|
||||
SetOptiFabricInfoShow(CardOptiFabric.IsSwaped)
|
||||
If OptiFabricError IsNot Nothing OrElse SelectedFabric Is Nothing Then CardOptiFabric.IsSwapped = True
|
||||
SetOptiFabricInfoShow(CardOptiFabric.IsSwapped)
|
||||
If SelectedOptiFabric Is Nothing Then
|
||||
BtnOptiFabricClear.Visibility = Visibility.Collapsed
|
||||
ImgOptiFabric.Visibility = Visibility.Collapsed
|
||||
@@ -535,13 +542,13 @@
|
||||
Private IsSelectNameEdited As Boolean = False
|
||||
Private IsSelectNameChanging As Boolean = False
|
||||
Private Sub SelectNameUpdate()
|
||||
If IsSelectNameEdited OrElse IsSelectNameChanging Then Exit Sub
|
||||
If IsSelectNameEdited OrElse IsSelectNameChanging Then Return
|
||||
IsSelectNameChanging = True
|
||||
TextSelectName.Text = GetSelectName()
|
||||
IsSelectNameChanging = False
|
||||
End Sub
|
||||
Private Sub TextSelectName_TextChanged(sender As Object, e As TextChangedEventArgs) Handles TextSelectName.TextChanged
|
||||
If IsSelectNameChanging Then Exit Sub
|
||||
If IsSelectNameChanging Then Return
|
||||
IsSelectNameEdited = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
@@ -634,7 +641,7 @@
|
||||
Dim NewStack As New StackPanel With {.Margin = New Thickness(20, MyCard.SwapedHeight, 18, 0), .VerticalAlignment = VerticalAlignment.Top, .RenderTransform = New TranslateTransform(0, 0), .Tag = Pair.Value}
|
||||
NewCard.Children.Add(NewStack)
|
||||
NewCard.SwapControl = NewStack
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
PanMinecraft.Children.Add(NewCard)
|
||||
Next
|
||||
'自动选择版本
|
||||
@@ -671,6 +678,11 @@
|
||||
VersionSortInteger(SelectedMinecraftId, "1.13") >= 0 AndAlso VersionSortInteger("1.14.3", SelectedMinecraftId) >= 0 Then
|
||||
Return "与 Forge 不兼容"
|
||||
End If
|
||||
'检查 Fabric 1.20.5+:全部不兼容
|
||||
If SelectedFabric IsNot Nothing AndAlso
|
||||
VersionSortInteger(SelectedMinecraftId, "1.20.4") > 0 Then
|
||||
Return "与 Fabric 不兼容"
|
||||
End If
|
||||
'检查 Forge 版本
|
||||
Dim HasAny As Boolean = False
|
||||
Dim HasRequiredVersion As Boolean = False
|
||||
@@ -712,7 +724,7 @@
|
||||
''' </summary>
|
||||
Private Sub OptiFine_Loaded() Handles LoadOptiFine.StateChanged
|
||||
Try
|
||||
If DlOptiFineListLoader.State <> LoadState.Finished Then Exit Sub
|
||||
If DlOptiFineListLoader.State <> LoadState.Finished Then Return
|
||||
|
||||
'获取版本列表
|
||||
Dim Versions As New List(Of DlOptiFineListEntry)
|
||||
@@ -720,7 +732,7 @@
|
||||
If SelectedForge IsNot Nothing AndAlso Not IsOptiFineSuitForForge(Version, SelectedForge) Then Continue For
|
||||
If Version.NameDisplay.StartsWith(SelectedMinecraftId & " ") Then Versions.Add(Version)
|
||||
Next
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
If Not Versions.Any() Then Return
|
||||
'排序
|
||||
Versions = Versions.Sort(
|
||||
Function(Left As DlOptiFineListEntry, Right As DlOptiFineListEntry) As Boolean
|
||||
@@ -745,14 +757,14 @@
|
||||
OptiFabric_Loaded()
|
||||
Forge_Loaded()
|
||||
NeoForge_Loaded()
|
||||
CardOptiFine.IsSwaped = True
|
||||
CardOptiFine.IsSwapped = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub OptiFine_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnOptiFineClear.MouseLeftButtonUp
|
||||
SelectedOptiFine = Nothing
|
||||
SelectedOptiFabric = Nothing
|
||||
AutoSelectedOptiFabric = False
|
||||
CardOptiFine.IsSwaped = True
|
||||
CardOptiFine.IsSwapped = True
|
||||
e.Handled = True
|
||||
Forge_Loaded()
|
||||
NeoForge_Loaded()
|
||||
@@ -786,13 +798,13 @@
|
||||
''' </summary>
|
||||
Private Sub LiteLoader_Loaded() Handles LoadLiteLoader.StateChanged
|
||||
Try
|
||||
If DlLiteLoaderListLoader.State <> LoadState.Finished Then Exit Sub
|
||||
If DlLiteLoaderListLoader.State <> LoadState.Finished Then Return
|
||||
'获取版本列表
|
||||
Dim Versions As New List(Of DlLiteLoaderListEntry)
|
||||
For Each Version As DlLiteLoaderListEntry In DlLiteLoaderListLoader.Output.Value
|
||||
If Version.Inherit = SelectedMinecraftId Then Versions.Add(Version)
|
||||
Next
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
If Not Versions.Any() Then Return
|
||||
'可视化
|
||||
PanLiteLoader.Children.Clear()
|
||||
For Each Version In Versions
|
||||
@@ -806,12 +818,12 @@
|
||||
'选择与清除
|
||||
Private Sub LiteLoader_Selected(sender As MyListItem, e As EventArgs)
|
||||
SelectedLiteLoader = sender.Tag
|
||||
CardLiteLoader.IsSwaped = True
|
||||
CardLiteLoader.IsSwapped = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub LiteLoader_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnLiteLoaderClear.MouseLeftButtonUp
|
||||
SelectedLiteLoader = Nothing
|
||||
CardLiteLoader.IsSwaped = True
|
||||
CardLiteLoader.IsSwapped = True
|
||||
e.Handled = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
@@ -866,13 +878,13 @@
|
||||
''' </summary>
|
||||
Private Sub Forge_Loaded() Handles LoadForge.StateChanged
|
||||
Try
|
||||
If Not LoadForge.State.IsLoader Then Exit Sub
|
||||
If Not LoadForge.State.IsLoader Then Return
|
||||
Dim Loader As LoaderTask(Of String, List(Of DlForgeVersionEntry)) = LoadForge.State
|
||||
If SelectedMinecraftId <> Loader.Input Then Exit Sub
|
||||
If Loader.State <> LoadState.Finished Then Exit Sub
|
||||
If SelectedMinecraftId <> Loader.Input Then Return
|
||||
If Loader.State <> LoadState.Finished Then Return
|
||||
'获取要显示的版本
|
||||
Dim Versions = Loader.Output.ToList '复制数组,以免 Output 在实例化后变空
|
||||
If Not Loader.Output.Any() Then Exit Sub
|
||||
If Not Loader.Output.Any() Then Return
|
||||
PanForge.Children.Clear()
|
||||
Versions = Versions.Where(
|
||||
Function(v)
|
||||
@@ -892,14 +904,14 @@
|
||||
'选择与清除
|
||||
Private Sub Forge_Selected(sender As MyListItem, e As EventArgs)
|
||||
SelectedForge = sender.Tag
|
||||
CardForge.IsSwaped = True
|
||||
CardForge.IsSwapped = True
|
||||
If SelectedOptiFine IsNot Nothing AndAlso Not IsOptiFineSuitForForge(SelectedOptiFine, SelectedForge) Then SelectedOptiFine = Nothing
|
||||
OptiFine_Loaded()
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub Forge_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnForgeClear.MouseLeftButtonUp
|
||||
SelectedForge = Nothing
|
||||
CardForge.IsSwaped = True
|
||||
CardForge.IsSwapped = True
|
||||
e.Handled = True
|
||||
OptiFine_Loaded()
|
||||
SelectReload()
|
||||
@@ -936,9 +948,9 @@
|
||||
Private Sub NeoForge_Loaded() Handles LoadNeoForge.StateChanged
|
||||
Try
|
||||
'获取版本列表
|
||||
If DlNeoForgeListLoader.State <> LoadState.Finished Then Exit Sub
|
||||
If DlNeoForgeListLoader.State <> LoadState.Finished Then Return
|
||||
Dim Versions = DlNeoForgeListLoader.Output.Value.Where(Function(v) v.Inherit = SelectedMinecraftId).ToList
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
If Not Versions.Any() Then Return
|
||||
'可视化
|
||||
PanNeoForge.Children.Clear()
|
||||
NeoForgeDownloadListItemPreload(PanNeoForge, Versions, AddressOf NeoForge_Selected, False)
|
||||
@@ -953,13 +965,13 @@
|
||||
'选择与清除
|
||||
Private Sub NeoForge_Selected(sender As MyListItem, e As EventArgs)
|
||||
SelectedNeoForge = sender.Tag
|
||||
CardNeoForge.IsSwaped = True
|
||||
CardNeoForge.IsSwapped = True
|
||||
OptiFine_Loaded()
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub NeoForge_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnNeoForgeClear.MouseLeftButtonUp
|
||||
SelectedNeoForge = Nothing
|
||||
CardNeoForge.IsSwaped = True
|
||||
CardNeoForge.IsSwapped = True
|
||||
e.Handled = True
|
||||
OptiFine_Loaded()
|
||||
SelectReload()
|
||||
@@ -975,6 +987,11 @@
|
||||
Private Function LoadFabricGetError() As String
|
||||
If LoadFabric Is Nothing OrElse LoadFabric.State.LoadingState = MyLoading.MyLoadingState.Run Then Return "加载中……"
|
||||
If LoadFabric.State.LoadingState = MyLoading.MyLoadingState.Error Then Return "获取版本列表失败:" & CType(LoadFabric.State, Object).Error.Message
|
||||
'检查 OptiFine 1.20.5+:没有 OptiFabric 故全部不兼容
|
||||
If SelectedOptiFine IsNot Nothing AndAlso
|
||||
VersionSortInteger(SelectedMinecraftId, "1.20.4") > 0 Then
|
||||
Return "与 OptiFine 不兼容"
|
||||
End If
|
||||
For Each Version As JObject In DlFabricListLoader.Output.Value("game")
|
||||
If Version("version").ToString = SelectedMinecraftId.Replace("∞", "infinite").Replace("Combat Test 7c", "1.16_combat-3") Then
|
||||
If SelectedForge IsNot Nothing Then Return "与 Forge 不兼容"
|
||||
@@ -995,10 +1012,10 @@
|
||||
''' </summary>
|
||||
Private Sub Fabric_Loaded() Handles LoadFabric.StateChanged
|
||||
Try
|
||||
If DlFabricListLoader.State <> LoadState.Finished Then Exit Sub
|
||||
If DlFabricListLoader.State <> LoadState.Finished Then Return
|
||||
'获取版本列表
|
||||
Dim Versions As JArray = DlFabricListLoader.Output.Value("loader")
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
If Not Versions.Any() Then Return
|
||||
'可视化
|
||||
PanFabric.Children.Clear()
|
||||
PanFabric.Tag = Versions
|
||||
@@ -1014,7 +1031,7 @@
|
||||
SelectedFabric = sender.Tag("version").ToString
|
||||
FabricApi_Loaded()
|
||||
OptiFabric_Loaded()
|
||||
CardFabric.IsSwaped = True
|
||||
CardFabric.IsSwapped = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub Fabric_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnFabricClear.MouseLeftButtonUp
|
||||
@@ -1023,7 +1040,7 @@
|
||||
AutoSelectedFabricApi = False
|
||||
SelectedOptiFabric = Nothing
|
||||
AutoSelectedOptiFabric = False
|
||||
CardFabric.IsSwaped = True
|
||||
CardFabric.IsSwapped = True
|
||||
e.Handled = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
@@ -1100,8 +1117,8 @@
|
||||
''' </summary>
|
||||
Private Sub FabricApi_Loaded() Handles LoadFabricApi.StateChanged
|
||||
Try
|
||||
If DlFabricApiLoader.State <> LoadState.Finished Then Exit Sub
|
||||
If SelectedMinecraftId Is Nothing OrElse SelectedFabric Is Nothing Then Exit Sub
|
||||
If DlFabricApiLoader.State <> LoadState.Finished Then Return
|
||||
If SelectedMinecraftId Is Nothing OrElse SelectedFabric Is Nothing Then Return
|
||||
'获取版本列表
|
||||
Dim Versions As New List(Of CompFile)
|
||||
For Each Version In DlFabricApiLoader.Output
|
||||
@@ -1113,7 +1130,7 @@
|
||||
Versions.Add(Version)
|
||||
End If
|
||||
Next
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
If Not Versions.Any() Then Return
|
||||
Versions = Versions.OrderByDescending(Function(v) v.ReleaseDate).ToList
|
||||
'可视化
|
||||
PanFabricApi.Children.Clear()
|
||||
@@ -1135,12 +1152,12 @@
|
||||
'选择与清除
|
||||
Private Sub FabricApi_Selected(sender As MyListItem, e As EventArgs)
|
||||
SelectedFabricApi = sender.Tag
|
||||
CardFabricApi.IsSwaped = True
|
||||
CardFabricApi.IsSwapped = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub FabricApi_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnFabricApiClear.MouseLeftButtonUp
|
||||
SelectedFabricApi = Nothing
|
||||
CardFabricApi.IsSwaped = True
|
||||
CardFabricApi.IsSwapped = True
|
||||
e.Handled = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
@@ -1196,14 +1213,14 @@
|
||||
''' </summary>
|
||||
Private Sub OptiFabric_Loaded() Handles LoadOptiFabric.StateChanged
|
||||
Try
|
||||
If DlOptiFabricLoader.State <> LoadState.Finished Then Exit Sub
|
||||
If SelectedMinecraftId Is Nothing OrElse SelectedFabric Is Nothing OrElse SelectedOptiFine Is Nothing Then Exit Sub
|
||||
If DlOptiFabricLoader.State <> LoadState.Finished Then Return
|
||||
If SelectedMinecraftId Is Nothing OrElse SelectedFabric Is Nothing OrElse SelectedOptiFine Is Nothing Then Return
|
||||
'获取版本列表
|
||||
Dim Versions As New List(Of CompFile)
|
||||
For Each Version In DlOptiFabricLoader.Output
|
||||
If IsSuitableOptiFabric(Version, SelectedMinecraftId) Then Versions.Add(Version)
|
||||
Next
|
||||
If Not Versions.Any() Then Exit Sub
|
||||
If Not Versions.Any() Then Return
|
||||
'排序
|
||||
Versions = Versions.OrderByDescending(Function(v) v.ReleaseDate).ToList
|
||||
'可视化
|
||||
@@ -1227,12 +1244,12 @@
|
||||
'选择与清除
|
||||
Private Sub OptiFabric_Selected(sender As MyListItem, e As EventArgs)
|
||||
SelectedOptiFabric = sender.Tag
|
||||
CardOptiFabric.IsSwaped = True
|
||||
CardOptiFabric.IsSwapped = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
Private Sub OptiFabric_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnOptiFabricClear.MouseLeftButtonUp
|
||||
SelectedOptiFabric = Nothing
|
||||
CardOptiFabric.IsSwaped = True
|
||||
CardOptiFabric.IsSwapped = True
|
||||
e.Handled = True
|
||||
SelectReload()
|
||||
End Sub
|
||||
@@ -1251,7 +1268,7 @@
|
||||
If MyMsgBox("你尚未开启版本隔离,多个 MC 版本会共用同一个 Mod 文件夹。" & vbCrLf &
|
||||
"因此,游戏可能会因为读取到与当前版本不符的 Mod 而崩溃。" & vbCrLf &
|
||||
"推荐先在 设置 → 启动选项 → 默认版本隔离 中开启版本隔离!", "版本隔离提示", "取消下载", "继续") = 1 Then
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
'提交安装申请
|
||||
@@ -1269,7 +1286,7 @@
|
||||
.OptiFabric = SelectedOptiFabric,
|
||||
.LiteLoaderEntry = SelectedLiteLoader
|
||||
}
|
||||
If Not McInstall(Request) Then Exit Sub
|
||||
If Not McInstall(Request) Then Return
|
||||
'返回,这样在再次进入安装页面时这个版本就会显示文件夹已重复
|
||||
ExitSelectPage()
|
||||
End Sub
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
''' 切换现有页面。
|
||||
''' </summary>
|
||||
Public Sub PageChange(ID As FormMain.PageSubType)
|
||||
If PageID = ID Then Exit Sub
|
||||
If PageID = ID Then Return
|
||||
AniControlEnabled += 1
|
||||
Try
|
||||
PageChangeRun(PageGet(ID))
|
||||
@@ -187,13 +187,13 @@
|
||||
|
||||
'点击返回
|
||||
Private Sub ItemInstall_Click(sender As Object, e As MouseButtonEventArgs) Handles ItemInstall.Click
|
||||
If Not ItemInstall.Checked Then Exit Sub
|
||||
If Not ItemInstall.Checked Then Return
|
||||
FrmDownloadInstall.ExitSelectPage()
|
||||
End Sub
|
||||
|
||||
'展开手动安装
|
||||
Private Sub ItemHand_Click(sender As Object, e As RouteEventArgs) Handles ItemHand.Changed
|
||||
If ItemHand.Checked = False Then Exit Sub
|
||||
If ItemHand.Checked = False Then Return
|
||||
e.Handled = True
|
||||
AniControlEnabled += 1
|
||||
If Not Setup.Get("HintHandInstall") Then
|
||||
@@ -202,7 +202,7 @@
|
||||
"在自动安装页面先选择 MC 版本,然后就可以选择 OptiFine、Forge 等组件,让 PCL 自动进行安装了。", "自动安装提示", "返回自动安装", "继续下载手动安装包") = 1 Then
|
||||
FrmMain.PageChange(New FormMain.PageStackData With {.Page = FormMain.PageType.Download}, FormMain.PageSubType.DownloadInstall)
|
||||
AniControlEnabled -= 1
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
ItemHand.Visibility = Visibility.Collapsed
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
Dim NewStack As New StackPanel With {.Margin = New Thickness(20, MyCard.SwapedHeight, 18, 0), .VerticalAlignment = VerticalAlignment.Top, .RenderTransform = New TranslateTransform(0, 0), .Tag = Pair.Value}
|
||||
NewCard.Children.Add(NewStack)
|
||||
NewCard.SwapControl = NewStack
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
Dim NewStack As New StackPanel With {.Margin = New Thickness(20, MyCard.SwapedHeight, 18, 0), .VerticalAlignment = VerticalAlignment.Top, .RenderTransform = New TranslateTransform(0, 0), .Tag = Pair.Value}
|
||||
NewCard.Children.Add(NewStack)
|
||||
NewCard.SwapControl = NewStack
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
Dim NewStack As New StackPanel With {.Margin = New Thickness(20, MyCard.SwapedHeight, 18, 0), .VerticalAlignment = VerticalAlignment.Top, .RenderTransform = New TranslateTransform(0, 0), .Tag = Pair.Value}
|
||||
NewCard.Children.Add(NewStack)
|
||||
NewCard.SwapControl = NewStack
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
PanMain.Children.Add(NewCard)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
LabTitle.Text = "登录 Minecraft"
|
||||
LabCaption.Text =
|
||||
$"登录网页将自动开启,请在网页中输入 {UserCode}(已自动复制)。" & vbCrLf & vbCrLf &
|
||||
$"如果网络环境不佳,网页可能一直加载不出来,届时请使用 VPN 并重试。" & vbCrLf &
|
||||
$"如果网络环境不佳,网页可能一直加载不出来,届时请使用加速器或 VPN 以改善网络环境。" & vbCrLf &
|
||||
$"你也可以用其他设备打开 {Website} 并输入上述代码。"
|
||||
Btn1.EventData = Website
|
||||
Btn2.EventData = UserCode
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
Private Sub WorkThread()
|
||||
Thread.Sleep(3000)
|
||||
If MyConverter.IsExited Then Exit Sub
|
||||
If MyConverter.IsExited Then Return
|
||||
OpenWebsite(Website)
|
||||
ClipboardSet(UserCode)
|
||||
Thread.Sleep((Data("interval").ToObject(Of Integer) - 1) * 1000)
|
||||
@@ -105,13 +105,16 @@
|
||||
Dim UnknownFailureCount As Integer = 0
|
||||
Do While Not MyConverter.IsExited
|
||||
Try
|
||||
Dim Result = NetRequestOnce(
|
||||
"https://login.microsoftonline.com/consumers/oauth2/v2.0/token", "POST",
|
||||
"grant_type=urn:ietf:params:oauth:grant-type:device_code" & "&" &
|
||||
"client_id=" & OAuthClientId & "&" &
|
||||
"device_code=" & DeviceCode & "&" &
|
||||
"scope=XboxLive.signin%20offline_access",
|
||||
"application/x-www-form-urlencoded", 5000 + UnknownFailureCount * 5000, MakeLog:=False)
|
||||
Dim Result = NetRequestByClient(
|
||||
"https://login.microsoftonline.com/consumers/oauth2/v2.0/token", HttpMethod.Post,
|
||||
Content:=
|
||||
"grant_type=urn:ietf:params:oauth:grant-type:device_code" & "&" &
|
||||
"client_id=" & OAuthClientId & "&" &
|
||||
"device_code=" & DeviceCode & "&" &
|
||||
"scope=XboxLive.signin%20offline_access",
|
||||
ContentType:="application/x-www-form-urlencoded",
|
||||
Timeout:=5000 + UnknownFailureCount * 5000,
|
||||
MakeLog:=False)
|
||||
'获取结果
|
||||
Dim ResultJson As JObject = GetJson(Result)
|
||||
McLaunchLog($"令牌过期时间:{ResultJson("expires_in")} 秒")
|
||||
@@ -119,21 +122,29 @@
|
||||
Finished({ResultJson("access_token").ToString, ResultJson("refresh_token").ToString})
|
||||
Return
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("authorization_declined") Then
|
||||
Finished(New Exception("$你拒绝了 PCL 申请的权限……"))
|
||||
Return
|
||||
ElseIf ex.Message.Contains("expired_token") Then
|
||||
Finished(New Exception("$登录用时太长啦,重新试试吧!"))
|
||||
Return
|
||||
ElseIf ex.Message.Contains("service abuse") Then
|
||||
Finished(New Exception("$非常抱歉,该账号已被微软封禁,无法登录。"))
|
||||
Return
|
||||
ElseIf ex.Message.Contains("AADSTS70000") Then '可能不能判 “invalid_grant”,见 #269
|
||||
Finished(New RestartException)
|
||||
Return
|
||||
ElseIf ex.Message.Contains("authorization_pending") Then
|
||||
Thread.Sleep(2000)
|
||||
ElseIf UnknownFailureCount <= 2 Then
|
||||
If TypeOf ex Is ResponsedWebException Then
|
||||
Dim Response = CType(ex, ResponsedWebException).Response
|
||||
If Response.Contains("authorization_declined") Then
|
||||
Finished(New Exception("$你拒绝了 PCL 申请的权限……"))
|
||||
Return
|
||||
ElseIf Response.Contains("expired_token") Then
|
||||
Finished(New Exception("$登录用时太长啦,重新试试吧!"))
|
||||
Return
|
||||
ElseIf Response.Contains("Account security interrupt") Then
|
||||
Finished(New Exception("$该账号由于安全问题无法登陆,请前往微软账户页获取更多信息。"))
|
||||
Return
|
||||
ElseIf Response.Contains("service abuse") Then
|
||||
Finished(New Exception("$非常抱歉,该账号已被微软封禁,无法登录。"))
|
||||
Return
|
||||
ElseIf Response.Contains("AADSTS70000") Then '可能不能判 “invalid_grant”,见 #269
|
||||
Finished(New RestartException)
|
||||
Return
|
||||
ElseIf Response.Contains("authorization_pending") Then
|
||||
Thread.Sleep(2000)
|
||||
Continue Do
|
||||
End If
|
||||
End If
|
||||
If UnknownFailureCount <= 2 Then
|
||||
UnknownFailureCount += 1
|
||||
Log(ex, $"登录轮询第 {UnknownFailureCount} 次失败")
|
||||
Thread.Sleep(2000)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
If Not Loader.State = LoadState.Finished Then
|
||||
Hint("皮肤正在获取中,请稍候!", HintType.Critical)
|
||||
If Not Loader.State = LoadState.Loading Then Loader.Start()
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Try
|
||||
Dim FileAddress As String = SelectSaveFile("选取保存皮肤的位置", GetFileNameFromPath(Address), "皮肤图片文件(*.png)|*.png")
|
||||
@@ -87,7 +87,7 @@
|
||||
Catch ex As Exception '#2272
|
||||
Log(ex, $"皮肤文件已损坏:{Address}", LogLevel.Hint)
|
||||
File.Delete(Address)
|
||||
Exit Sub
|
||||
Return
|
||||
End Try
|
||||
ImgBack.Tag = Address
|
||||
'大小检查
|
||||
@@ -209,11 +209,11 @@
|
||||
'检查条件,获取新披风
|
||||
If IsChanging Then
|
||||
Hint("正在更改披风中,请稍候!")
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
If McLoginMsLoader.State = LoadState.Failed Then
|
||||
Hint("登录失败,无法更改披风!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Hint("正在获取披风列表,请稍候……")
|
||||
IsChanging = True
|
||||
@@ -226,7 +226,7 @@ Retry:
|
||||
If McLoginMsLoader.State <> LoadState.Finished Then McLoginMsLoader.WaitForExit(PageLoginMsSkin.GetLoginData())
|
||||
If McLoginMsLoader.State <> LoadState.Finished Then
|
||||
Hint("登录失败,无法更改披风!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Dim AccessToken As String = McLoginMsLoader.Output.AccessToken
|
||||
Dim Uuid As String = McLoginMsLoader.Output.Uuid
|
||||
@@ -243,7 +243,8 @@ Retry:
|
||||
{"Minecon2013", "Minecon 2013 参与者披风"}, {"Minecon2015", "Minecon 2015 参与者披风"}, {"Minecon2016", "Minecon 2016 参与者披风"},
|
||||
{"Cherry Blossom", "樱花披风"}, {"15th Anniversary", "15 周年纪念披风"}, {"Purple Heart", "紫色心形披风"},
|
||||
{"Follower's", "追随者披风"}, {"MCC 15th Year", "MCC 15 周年披风"}, {"Minecraft Experience", "村民救援披风"},
|
||||
{"Mojang Office", "Mojang 办公室披风"}, {"Home", "家园披风"}, {"Menace", "入侵披风"}, {"Yearn", "渴望披风"}
|
||||
{"Mojang Office", "Mojang 办公室披风"}, {"Home", "家园披风"}, {"Menace", "入侵披风"}, {"Yearn", "渴望披风"},
|
||||
{"Common", "普通披风"}, {"Pan", "薄煎饼披风"}, {"Founder's", "创始人披风"}
|
||||
}
|
||||
Dim SelectionControl As New List(Of IMyRadio) From {New MyRadioBox With {.Text = "无披风"}}
|
||||
For Each Cape In SkinData("capes")
|
||||
@@ -256,15 +257,16 @@ Retry:
|
||||
Log(ex, "获取玩家皮肤列表失败", LogLevel.Feedback)
|
||||
End Try
|
||||
End Sub)
|
||||
If SelId Is Nothing Then Exit Sub
|
||||
If SelId Is Nothing Then Return
|
||||
'发送请求
|
||||
Dim Result As String = NetRequestRetry("https://api.minecraftservices.com/minecraft/profile/capes/active",
|
||||
If(SelId = 0, "DELETE", "PUT"),
|
||||
If(SelId = 0, "", New JObject(New JProperty("capeId", SkinData("capes")(SelId - 1)("id"))).ToString(0)),
|
||||
"application/json", Headers:=New Dictionary(Of String, String) From {{"Authorization", "Bearer " & AccessToken}})
|
||||
Dim Result As String = NetRequestByClientRetry("https://api.minecraftservices.com/minecraft/profile/capes/active",
|
||||
If(SelId = 0, HttpMethod.Delete, HttpMethod.Put),
|
||||
Content:=If(SelId = 0, "", New JObject(New JProperty("capeId", SkinData("capes")(SelId - 1)("id"))).ToString(0)),
|
||||
ContentType:="application/json",
|
||||
Headers:={{"Authorization", "Bearer " & AccessToken}})
|
||||
If Result.Contains("""errorMessage""") Then
|
||||
Hint("更改披风失败:" & GetJson(Result)("errorMessage"), HintType.Critical)
|
||||
Exit Sub
|
||||
Hint("更改披风失败:" & GetJson(Result)("errorMessage").ToString, HintType.Critical)
|
||||
Return
|
||||
Else
|
||||
Hint("更改披风成功!", HintType.Finish)
|
||||
End If
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
AprilPosTrans.X = 0
|
||||
AprilPosTrans.Y = 0
|
||||
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
AniControlEnabled += 1
|
||||
|
||||
@@ -243,19 +243,21 @@
|
||||
If Not IsNothing(PageNew) AndAlso Not IsNothing(PageNew.Parent) Then PageNew.SetValue(ContentPresenter.ContentProperty, Nothing)
|
||||
If Anim Then
|
||||
'动画
|
||||
Dispatcher.Invoke(Sub()
|
||||
'执行动画
|
||||
AniStart({
|
||||
AaOpacity(PanLogin, -PanLogin.Opacity, 100,, New AniEaseOutFluent),
|
||||
AaCode(Sub()
|
||||
AniControlEnabled += 1
|
||||
PanLogin.Children.Clear()
|
||||
PanLogin.Children.Add(PageNew)
|
||||
AniControlEnabled -= 1
|
||||
End Sub, 100),
|
||||
AaOpacity(PanLogin, 1, 100, 120, New AniEaseInFluent)
|
||||
}, "FrmLogin PageChange")
|
||||
End Sub, Threading.DispatcherPriority.Render)
|
||||
Dispatcher.Invoke(
|
||||
Sub()
|
||||
'执行动画
|
||||
AniStart({
|
||||
AaOpacity(PanLogin, -PanLogin.Opacity, 100,, New AniEaseOutFluent),
|
||||
AaCode(
|
||||
Sub()
|
||||
AniControlEnabled += 1
|
||||
PanLogin.Children.Clear()
|
||||
PanLogin.Children.Add(PageNew)
|
||||
AniControlEnabled -= 1
|
||||
End Sub, 100),
|
||||
AaOpacity(PanLogin, 1, 100, 120, New AniEaseInFluent)
|
||||
}, "FrmLogin PageChange")
|
||||
End Sub, Threading.DispatcherPriority.Render)
|
||||
Else
|
||||
'无动画
|
||||
AniControlEnabled += 1
|
||||
@@ -353,7 +355,7 @@ UnknownType:
|
||||
GoTo UnknownType
|
||||
End Select
|
||||
'刷新页面
|
||||
If PageCurrent = Type Then Exit Sub
|
||||
If PageCurrent = Type Then Return
|
||||
PageChange(Type, Anim).Reload(KeepInput)
|
||||
Dim Control As MyRadioButton = FindName("RadioLoginType" & Setup.Get("LoginType"))
|
||||
If Control IsNot Nothing Then Control.Checked = True
|
||||
@@ -393,7 +395,7 @@ UnknownType:
|
||||
Catch ex As Exception
|
||||
If ex.GetType.Name = "ThreadInterruptedException" Then
|
||||
Data.Output = ""
|
||||
Exit Sub
|
||||
Return
|
||||
ElseIf GetExceptionSummary(ex).Contains("429") Then
|
||||
Data.Output = PathImage & "Skins/" & McSkinSex(McLoginLegacyUuid(UserName)) & ".png"
|
||||
Log("[Minecraft] 获取正版皮肤失败(" & UserName & "):获取皮肤太过频繁,请 5 分钟后再试!", LogLevel.Hint)
|
||||
@@ -463,7 +465,7 @@ UseDefault:
|
||||
Catch ex As Exception
|
||||
If ex.GetType.Name = "ThreadInterruptedException" Then
|
||||
Data.Output = ""
|
||||
Exit Sub
|
||||
Return
|
||||
ElseIf GetExceptionSummary(ex).Contains("429") Then
|
||||
Data.Output = PathImage & "Skins/" & McSkinSex(McLoginLegacyUuid(ID)) & ".png"
|
||||
Log("获取离线登录使用的正版皮肤失败(" & ID & "):获取皮肤太过频繁,请 5 分钟后再试!")
|
||||
@@ -515,7 +517,7 @@ UseDefault:
|
||||
Catch ex As Exception
|
||||
If ex.GetType.Name = "ThreadInterruptedException" Then
|
||||
Data.Output = ""
|
||||
Exit Sub
|
||||
Return
|
||||
ElseIf GetExceptionSummary(ex).Contains("429") Then
|
||||
Data.Output = PathImage & "Skins/Steve.png"
|
||||
Log("[Minecraft] 获取统一通行证皮肤失败(" & UserName & "):获取皮肤太过频繁,请 5 分钟后再试!", LogLevel.Hint)
|
||||
@@ -563,7 +565,7 @@ Finish:
|
||||
Catch ex As Exception
|
||||
If ex.GetType.Name = "ThreadInterruptedException" Then
|
||||
Data.Output = ""
|
||||
Exit Sub
|
||||
Return
|
||||
ElseIf GetExceptionSummary(ex).Contains("429") Then
|
||||
Data.Output = PathImage & "Skins/Steve.png"
|
||||
Log("[Minecraft] 获取 Authlib-Injector 皮肤失败(" & UserName & "):获取皮肤太过频繁,请 5 分钟后再试!", LogLevel.Hint)
|
||||
@@ -592,13 +594,13 @@ Finish:
|
||||
|
||||
'版本选择按钮
|
||||
Private Sub BtnVersion_Click(sender As Object, e As EventArgs) Handles BtnVersion.Click
|
||||
If McLaunchLoader.State = LoadState.Loading Then Exit Sub
|
||||
If McLaunchLoader.State = LoadState.Loading Then Return
|
||||
FrmMain.PageChange(FormMain.PageType.VersionSelect)
|
||||
End Sub
|
||||
'启动按钮
|
||||
Public Sub LaunchButtonClick() Handles BtnLaunch.Click
|
||||
If McLaunchLoader.State = LoadState.Loading OrElse Not BtnLaunch.IsEnabled OrElse
|
||||
(FrmMain.PageRight IsNot Nothing AndAlso FrmMain.PageRight.PageState <> MyPageRight.PageStates.ContentStay AndAlso FrmMain.PageRight.PageState <> MyPageRight.PageStates.ContentEnter) Then Exit Sub
|
||||
(FrmMain.PageRight IsNot Nothing AndAlso FrmMain.PageRight.PageState <> MyPageRight.PageStates.ContentStay AndAlso FrmMain.PageRight.PageState <> MyPageRight.PageStates.ContentEnter) Then Return
|
||||
'愚人节处理
|
||||
If IsAprilEnabled AndAlso Not IsAprilGiveup Then
|
||||
ThemeUnlock(12, False, "隐藏主题 滑稽彩 已解锁!")
|
||||
@@ -619,7 +621,7 @@ Finish:
|
||||
Private BtnLaunchState As Integer = 0
|
||||
Private BtnLaunchVersion As McVersion = Nothing
|
||||
Public Sub RefreshButtonsUI() Handles BtnLaunch.Loaded
|
||||
If Not BtnLaunch.IsLoaded Then Exit Sub
|
||||
If Not BtnLaunch.IsLoaded Then Return
|
||||
'获取当前状态
|
||||
Dim CurrentState As Integer
|
||||
If (Not IsLoadFinished) OrElse McVersionListLoader.State = LoadState.Loading OrElse McFolderListLoader.State = LoadState.Loading Then
|
||||
@@ -695,7 +697,7 @@ ExitRefresh:
|
||||
End Sub
|
||||
'版本设置按钮
|
||||
Private Sub BtnMore_Click(sender As Object, e As EventArgs) Handles BtnMore.Click
|
||||
If McLaunchLoader.State = LoadState.Loading Then Exit Sub
|
||||
If McLaunchLoader.State = LoadState.Loading Then Return
|
||||
McVersionCurrent.Load()
|
||||
PageVersionLeft.Version = McVersionCurrent
|
||||
FrmMain.PageChange(FormMain.PageType.VersionSetup, 0)
|
||||
@@ -705,7 +707,7 @@ ExitRefresh:
|
||||
''' </summary>
|
||||
Public Sub LaunchingRefresh()
|
||||
Try
|
||||
If McLaunchLoaderReal.State = LoadState.Aborted Then Exit Sub
|
||||
If McLaunchLoaderReal.State = LoadState.Aborted Then Return
|
||||
'阶段状态获取
|
||||
Dim IsLaunched As Boolean = False '是否已经启动游戏,只是在等待窗口
|
||||
Try
|
||||
@@ -719,7 +721,7 @@ ExitRefresh:
|
||||
LabLaunchingStage.Text = "已完成"
|
||||
Catch ex As Exception
|
||||
Log(ex, "获取是否启动完成失败,可能是由于启动状态改变导致集合已修改")
|
||||
Exit Sub
|
||||
Return
|
||||
End Try
|
||||
If AniIsRun("Launch State Page") Then IsLaunched = False '等待页面切换动画完成
|
||||
'计算应显示的进度
|
||||
@@ -789,7 +791,7 @@ ExitRefresh:
|
||||
Private ActualUsedWidth As Double
|
||||
Private Sub PanLaunchingInfo_SizeChangedW(sender As Object, e As SizeChangedEventArgs) Handles PanLaunchingInfo.SizeChanged
|
||||
Dim DeltaWidth As Double = e.NewSize.Width - e.PreviousSize.Width
|
||||
If e.PreviousSize.Width = 0 OrElse IsWidthAnimating OrElse Math.Abs(DeltaWidth) < 1 OrElse PanLaunchingInfo.ActualWidth = 0 Then Exit Sub
|
||||
If e.PreviousSize.Width = 0 OrElse IsWidthAnimating OrElse Math.Abs(DeltaWidth) < 1 OrElse PanLaunchingInfo.ActualWidth = 0 Then Return
|
||||
AniStart({
|
||||
AaWidth(PanLaunchingInfo, DeltaWidth, 180,, New AniEaseOutFluent),
|
||||
AaCode(Sub()
|
||||
@@ -805,7 +807,7 @@ ExitRefresh:
|
||||
Private ActualUsedHeight As Double
|
||||
Private Sub PanLaunchingInfo_SizeChangedH(sender As Object, e As SizeChangedEventArgs) Handles PanLaunchingInfo.SizeChanged
|
||||
Dim DeltaHeight As Double = e.NewSize.Height - e.PreviousSize.Height
|
||||
If e.PreviousSize.Height = 0 OrElse IsHeightAnimating OrElse Math.Abs(DeltaHeight) < 1 OrElse PanLaunchingInfo.ActualHeight = 0 Then Exit Sub
|
||||
If e.PreviousSize.Height = 0 OrElse IsHeightAnimating OrElse Math.Abs(DeltaHeight) < 1 OrElse PanLaunchingInfo.ActualHeight = 0 Then Return
|
||||
AniStart({
|
||||
AaHeight(PanLaunchingInfo, DeltaHeight, 180,, New AniEaseOutFluent),
|
||||
AaCode(Sub()
|
||||
|
||||
@@ -65,7 +65,7 @@ Download:
|
||||
RunInUiWait(Sub() LoadContent("")) '在加载结束前清空页面
|
||||
Setup.Set("CacheSavedPageVersion", "")
|
||||
OnlineLoader.Start(Url) '下载完成后将会再次触发更新
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Case 3
|
||||
Select Case Setup.Get("UiCustomPreset")
|
||||
@@ -89,11 +89,11 @@ Download:
|
||||
</local:MyCard>"
|
||||
Case 2
|
||||
Log("[Page] 主页预设:Minecraft 新闻")
|
||||
Url = "http://pcl.mcnews.thestack.top"
|
||||
Url = "https://pcl.mcnews.thestack.top"
|
||||
GoTo Download
|
||||
Case 3
|
||||
Log("[Page] 主页预设:简单主页")
|
||||
Url = "https://raw.gitcode.com/mfn233/PCL-Mainpage/raw/main/Custom.xaml"
|
||||
Url = "https://pclhomeplazaoss.lingyunawa.top:26994/d/Homepages/MFn233/Custom.xaml"
|
||||
GoTo Download
|
||||
Case 4
|
||||
Log("[Page] 主页预设:每日整合包推荐")
|
||||
@@ -127,6 +127,10 @@ Download:
|
||||
Log("[Page] 主页预设:杂志主页")
|
||||
Url = "https://pclhomeplazaoss.lingyunawa.top:26994/d/Homepages/Ext1nguisher/Custom.xaml"
|
||||
GoTo Download
|
||||
Case 12
|
||||
Log("[Page] 主页预设:PCL GitHub 仪表盘")
|
||||
Url = "https://ddf.pcl-community.org/Custom.xaml"
|
||||
GoTo Download
|
||||
End Select
|
||||
End Select
|
||||
RunInUi(Sub() LoadContent(Content))
|
||||
@@ -146,13 +150,13 @@ Download:
|
||||
VersionAddress = Address.BeforeFirst("?")
|
||||
If Not VersionAddress.EndsWith("/") Then VersionAddress += "/"
|
||||
VersionAddress += "version"
|
||||
If Address.Contains("?") Then VersionAddress += Address.AfterLast("?")
|
||||
If Address.Contains("?") Then VersionAddress += "?" & Address.AfterFirst("?")
|
||||
End If
|
||||
'校验版本
|
||||
Dim Version As String = ""
|
||||
Dim NeedDownload As Boolean = True
|
||||
Try
|
||||
Version = NetGetCodeByRequestOnce(VersionAddress, Timeout:=10000)
|
||||
Version = NetRequestByClientRetry(VersionAddress)
|
||||
If Version.Length > 1000 Then Throw New Exception($"获取的主页版本过长({Version.Length} 字符)")
|
||||
Dim CurrentVersion As String = Setup.Get("CacheSavedPageVersion")
|
||||
If Version <> "" AndAlso CurrentVersion <> "" AndAlso Version = CurrentVersion Then
|
||||
@@ -167,14 +171,14 @@ Download:
|
||||
End Try
|
||||
'实际下载
|
||||
If NeedDownload Then
|
||||
Dim FileContent As String = NetGetCodeByRequestRetry(Address)
|
||||
Dim FileContent As String = NetRequestByClientRetry(Address)
|
||||
Log($"[Page] 已联网下载主页,内容长度:{FileContent.Length},来源:{Address}")
|
||||
Setup.Set("CacheSavedPageUrl", Address)
|
||||
Setup.Set("CacheSavedPageVersion", Version)
|
||||
WriteFile(PathTemp & "Cache\Custom.xaml", FileContent)
|
||||
End If
|
||||
'要求刷新
|
||||
Refresh()
|
||||
RunInUi(AddressOf Refresh) '不直接调用 Refresh,以防止死循环(#6245)
|
||||
Catch ex As Exception
|
||||
Log(ex, $"下载主页失败({Address})", If(ModeDebug, LogLevel.Msgbox, LogLevel.Hint))
|
||||
End Try
|
||||
@@ -215,7 +219,7 @@ Download:
|
||||
SyncLock LoadContentLock
|
||||
'如果加载目标内容一致则不加载
|
||||
Dim Hash = Content.GetHashCode()
|
||||
If Hash = LoadedContentHash Then Exit Sub
|
||||
If Hash = LoadedContentHash Then Return
|
||||
LoadedContentHash = Hash
|
||||
'实际加载内容
|
||||
PanCustom.Children.Clear()
|
||||
@@ -223,10 +227,13 @@ Download:
|
||||
Log($"[Page] 实例化:清空主页 UI,来源为空")
|
||||
Return
|
||||
End If
|
||||
Dim LoadStartTime As Date = Date.Now
|
||||
Try
|
||||
'修改时应同时修改 PageOtherHelpDetail.Init
|
||||
Content = HelpArgumentReplace(Content)
|
||||
If Content.Contains("xmlns") Then Content = Content.RegexReplace("xmlns[^""']*(""|')[^""']*(""|')", "").Replace("xmlns", "") '禁止声明命名空间
|
||||
Do While Content.Contains("xmlns")
|
||||
Content = Content.RegexReplace("xmlns[^""']*(""|')[^""']*(""|')", "").Replace("xmlns", "") '禁止声明命名空间
|
||||
Loop
|
||||
Content = "<StackPanel xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:sys=""clr-namespace:System;assembly=mscorlib"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"" xmlns:local=""clr-namespace:PCL;assembly=Plain Craft Launcher 2"">" & Content & "</StackPanel>"
|
||||
Log($"[Page] 实例化:加载主页 UI 开始,最终内容长度:{Content.Count}")
|
||||
PanCustom.Children.Add(GetObjectFromXML(Content))
|
||||
@@ -240,8 +247,11 @@ Download:
|
||||
Else
|
||||
Log(ex, "加载主页界面失败", LogLevel.Hint)
|
||||
End If
|
||||
Return
|
||||
End Try
|
||||
Log($"[Page] 实例化:加载主页 UI 完成")
|
||||
Dim LoadCostTime = (Date.Now - LoadStartTime).Milliseconds
|
||||
Log($"[Page] 实例化:加载主页 UI 完成,耗时 {LoadCostTime}ms")
|
||||
If LoadCostTime > 3000 Then Hint($"主页加载过于缓慢(花费了 {Math.Round(LoadCostTime / 1000, 1)} 秒),请向主页作者反馈此问题,或暂时停止使用该主页")
|
||||
End SyncLock
|
||||
Return
|
||||
Refresh:
|
||||
|
||||
@@ -49,11 +49,10 @@
|
||||
Log("[Launch] 要求更换角色,但登录加载器繁忙", LogLevel.Debug)
|
||||
If CType(McLoginLoader.Input, McLoginServer).ForceReselectProfile Then
|
||||
Hint("正在尝试更换,请稍候!")
|
||||
Exit Sub
|
||||
Else
|
||||
Hint("正在登录中,请稍后再更换角色!", HintType.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
Hint("正在尝试更换,请稍候!")
|
||||
Setup.Set("CacheAuthUuid", "") '清空选择缓存
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:PCL"
|
||||
mc:Ignorable="d" d:DesignWidth="297.6">
|
||||
<StackPanel Margin="0,0,0,5">
|
||||
<local:MyHint x:Name="HintChinese" Text="玩家名如果包含英文、数字、下划线以外的内容,可能会无法进入 Minecraft 1.18 以后的世界!" Margin="0,0,0,15" Visibility="Collapsed" />
|
||||
<StackPanel Margin="0,0,0,5" x:Name="PanMain">
|
||||
<local:MyHint x:Name="HintChinese" Theme="Red" Text="玩家名如果包含英文、数字、下划线以外的内容,可能会无法进入 Minecraft 1.18 以后的世界!" Margin="0,0,0,15" Visibility="Collapsed" />
|
||||
<local:MySkin HorizontalAlignment="Center" x:Name="Skin" HasCape="False" Margin="0,0,0,15" />
|
||||
<local:MyComboBox IsEditable="True" x:Name="ComboName" Height="28" IsTextSearchEnabled="False" HintText="游戏用户名" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -64,6 +64,7 @@ Public Class PageLoginLegacy
|
||||
Private Sub ComboLegacy_TextChanged(sender As Object, e As TextChangedEventArgs) Handles ComboName.TextChanged
|
||||
If Setup.Get("LaunchSkinType") = 0 Then PageLaunchLeft.SkinLegacy.Start(IsForceRestart:=True)
|
||||
HintChinese.Visibility = If(RegexCheck(ComboName.Text, "^[0-9A-Za-z_]*$"), Visibility.Collapsed, Visibility.Visible)
|
||||
RunInUi(Sub() PanMain.InvalidateMeasure(), True) '由于 WPF 的 Bug,它不一定会自动更新 HintChinese 的大小(#6627)
|
||||
End Sub
|
||||
Private Sub Skin_Click() Handles Skin.Click
|
||||
If (Setup.Get("UiHiddenPageSetup") OrElse Setup.Get("UiHiddenSetupLaunch")) AndAlso Not PageSetupUI.HiddenForceShow Then
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
ComboAccounts.SelectedIndex = If(KeepInput, Math.Max(0, IndexBefore), 0)
|
||||
End Sub
|
||||
Private Sub ComboAccounts_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboAccounts.SelectionChanged
|
||||
If AniControlEnabled <> 0 OrElse ComboAccounts.SelectedItem Is Nothing OrElse ComboAccounts.ContentPresenter Is Nothing Then Exit Sub
|
||||
If AniControlEnabled <> 0 OrElse ComboAccounts.SelectedItem Is Nothing OrElse ComboAccounts.ContentPresenter Is Nothing Then Return
|
||||
If TypeOf ComboAccounts.SelectedItem Is MyListItem Then
|
||||
ComboAccounts.ContentPresenter.Content = CType(ComboAccounts.SelectedItem, MyListItem).Title
|
||||
ElseIf TypeOf ComboAccounts.SelectedItem Is MyComboBoxItem Then
|
||||
|
||||
@@ -23,10 +23,11 @@
|
||||
<local:MyIconButton.ContextMenu>
|
||||
<ContextMenu Closed="HidePanel" HorizontalOffset="10" VerticalOffset="18">
|
||||
<local:MyMenuItem Click="BtnSkinEdit_Click" Header="修改皮肤"/>
|
||||
<local:MyMenuItem Click="BtnSkinSave_Click" Header="保存皮肤"/>
|
||||
<local:MyMenuItem Click="BtnSkinRefresh_Click" Header="刷新头像"/>
|
||||
<local:MyMenuItem Click="BtnSkinSave_Click" Header="保存皮肤文件"/>
|
||||
<Separator />
|
||||
<local:MyMenuItem Click="BtnSkinCape_Click" Header="修改披风"/>
|
||||
<Separator />
|
||||
<local:MyMenuItem Click="BtnSkinRefresh_Click" Header="刷新"/>
|
||||
</ContextMenu>
|
||||
</local:MyIconButton.ContextMenu>
|
||||
</local:MyIconButton>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
AniStart(AaOpacity(PanButtons, 1 - PanButtons.Opacity, 120), "PageLoginMsSkin Button")
|
||||
End Sub
|
||||
Public Sub HidePanel() Handles PanData.MouseLeave
|
||||
If BtnEdit.ContextMenu.IsOpen OrElse BtnSkin.ContextMenu.IsOpen OrElse PanData.IsMouseOver Then Exit Sub
|
||||
If BtnEdit.ContextMenu.IsOpen OrElse BtnSkin.ContextMenu.IsOpen OrElse PanData.IsMouseOver Then Return
|
||||
AniStart(AaOpacity(PanButtons, -PanButtons.Opacity, 120), "PageLoginMsSkin Button")
|
||||
End Sub
|
||||
|
||||
@@ -74,14 +74,14 @@
|
||||
'检查条件,获取新皮肤
|
||||
If IsChanging Then
|
||||
Hint("正在更改皮肤中,请稍候!")
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
If McLoginLoader.State = LoadState.Failed Then
|
||||
Hint("登录失败,无法更改皮肤!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Dim SkinInfo As McSkinInfo = McSkinSelect()
|
||||
If Not SkinInfo.IsVaild Then Exit Sub
|
||||
If Not SkinInfo.IsVaild Then Return
|
||||
Hint("正在更改皮肤……")
|
||||
IsChanging = True
|
||||
'开始实际获取
|
||||
@@ -107,8 +107,8 @@ Retry:
|
||||
McLoginMsLoader.Start(GetLoginData(), IsForceRestart:=True)
|
||||
GoTo Retry
|
||||
ElseIf Result.Contains("""error""") Then
|
||||
Hint("更改皮肤失败:" & GetJson(Result)("error"), HintType.Critical)
|
||||
Exit Sub
|
||||
Hint("更改皮肤失败:" & GetJson(Result)("error").ToString, HintType.Critical)
|
||||
Return
|
||||
End If
|
||||
'获取新皮肤地址
|
||||
Log("[Skin] 皮肤修改返回值:" & vbCrLf & Result)
|
||||
@@ -117,7 +117,7 @@ Retry:
|
||||
For Each Skin As JObject In ResultJson("skins")
|
||||
If Skin("state").ToString = "ACTIVE" Then
|
||||
MySkin.ReloadCache(Skin("url"))
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
Throw New Exception("未知错误(" & Result & ")")
|
||||
|
||||
@@ -103,7 +103,6 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="1*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--<local:MyHint IsWarn="True" Text="这是错误文本。" x:Name="HintTypeError" Visibility="Collapsed" Grid.ColumnSpan="5" Grid.RowSpan="5" Margin="15,15,15,0" VerticalAlignment="Top" />-->
|
||||
<local:MyCard x:Name="BtnSelectCreate" Grid.Column="1" Grid.Row="1">
|
||||
<Grid Margin="35,0,25,0" IsHitTestVisible="False">
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
Private IsLoad As Boolean = False
|
||||
Private Sub OnLoaded() Handles Me.Loaded
|
||||
FormMain.EndProgramForce(ProcessReturnValues.Aborted)
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
'启动监视线程
|
||||
If Not IsWatcherStarted Then RunInNewThread(AddressOf WatcherThread, "Hiper Watcher")
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
'每 1 秒执行的 Timer
|
||||
Private Sub WatcherTimer1()
|
||||
If HiperState <> LoadState.Finished Then Exit Sub
|
||||
If HiperState <> LoadState.Finished Then Return
|
||||
RunInUi(Sub()
|
||||
'索引码剩余时间
|
||||
Dim Span As TimeSpan = HiperCertTime - Date.Now
|
||||
@@ -178,7 +178,7 @@
|
||||
HiperExit(True)
|
||||
ShowWindowToTop(Handle)
|
||||
Beep()
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'网络质量
|
||||
Dim QualityScore As Integer = If(IpIsInChina, 0, -2)
|
||||
@@ -272,7 +272,7 @@
|
||||
Log("[Hiper] 连接步骤:" & Intro)
|
||||
LoadStep = [Step]
|
||||
RunInUiWait(Sub()
|
||||
If FrmLinkHiper Is Nothing OrElse Not FrmLinkHiper.LabLoadDesc.IsLoaded Then Exit Sub
|
||||
If FrmLinkHiper Is Nothing OrElse Not FrmLinkHiper.LabLoadDesc.IsLoaded Then Return
|
||||
FrmLinkHiper.LabLoadDesc.Text = Intro
|
||||
FrmLinkHiper.UpdateProgress()
|
||||
End Sub)
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
'承接重试
|
||||
Private Sub CardLoad_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs) Handles CardLoad.MouseLeftButtonUp
|
||||
If Not InitLoader.State = LoadState.Failed Then Exit Sub
|
||||
If Not InitLoader.State = LoadState.Failed Then Return
|
||||
InitLoader.Start(IsForceRestart:=True)
|
||||
End Sub
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
Private Sub UpdateProgress(Optional Value As Double = -1)
|
||||
If Value = -1 Then Value = InitLoader.Progress
|
||||
Dim DisplayingProgress As Double = ColumnProgressA.Width.Value
|
||||
If Math.Round(Value - DisplayingProgress, 3) = 0 Then Exit Sub
|
||||
If Math.Round(Value - DisplayingProgress, 3) = 0 Then Return
|
||||
If DisplayingProgress > Value Then
|
||||
ColumnProgressA.Width = New GridLength(Value, GridUnitType.Star)
|
||||
ColumnProgressB.Width = New GridLength(1 - Value, GridUnitType.Star)
|
||||
@@ -327,7 +327,7 @@
|
||||
|
||||
'退出
|
||||
Private Sub BtnFinishExit_Click(sender As Object, e As EventArgs) Handles BtnFinishExit.Click
|
||||
If IsServerSide AndAlso MyMsgBox("你确定要关闭联机房间吗?", "确认退出", "确定", "取消", IsWarn:=True) = 2 Then Exit Sub
|
||||
If IsServerSide AndAlso MyMsgBox("你确定要关闭联机房间吗?", "确认退出", "确定", "取消", IsWarn:=True) = 2 Then Return
|
||||
HiperExit(False)
|
||||
End Sub
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
'Ping 房主
|
||||
Private Sub BtnFinishPing_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs) Handles BtnFinishPing.MouseLeftButtonUp
|
||||
LabFinishPing.Text = "检测中"
|
||||
If TaskPingHost.State = LoadState.Loading Then Exit Sub
|
||||
If TaskPingHost.State = LoadState.Loading Then Return
|
||||
TaskPingHost.Start(True, IsForceRestart:=True)
|
||||
End Sub
|
||||
Private Shared TaskPingHost As New LoaderTask(Of Boolean, Integer)("HiPer Ping Host",
|
||||
@@ -362,7 +362,7 @@
|
||||
Return _CurrentSubpage
|
||||
End Get
|
||||
Set(value As Subpages)
|
||||
If _CurrentSubpage = value Then Exit Property
|
||||
If _CurrentSubpage = value Then Return
|
||||
_CurrentSubpage = value
|
||||
Log("[Hiper] 子页面更改为 " & GetStringFromEnum(value))
|
||||
PageOnContentExit()
|
||||
@@ -384,7 +384,7 @@
|
||||
If InitLoader.State = LoadState.Loading Then InitLoader.Abort()
|
||||
If InitLoader.State = LoadState.Failed Then InitLoader.State = LoadState.Waiting
|
||||
RunInUi(Sub()
|
||||
If FrmLinkHiper Is Nothing OrElse Not FrmLinkHiper.IsLoaded Then Exit Sub
|
||||
If FrmLinkHiper Is Nothing OrElse Not FrmLinkHiper.IsLoaded Then Return
|
||||
FrmLinkHiper.CurrentSubpage = If(ExitToCertPage, Subpages.PanCert, Subpages.PanSelect)
|
||||
FrmLinkHiper.PageOnContentExit()
|
||||
End Sub)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<StackPanel Orientation="Vertical" Margin="25,10">
|
||||
<local:MyCard Margin="0,15,0,0" x:Name="CardUser" Title="已连接的玩家 (0)">
|
||||
<StackPanel Margin="20,37,20,15">
|
||||
<local:MyHint Margin="5,2,5,8" x:Name="LabHint" IsWarn="False" />
|
||||
<local:MyHint Margin="5,2,5,8" x:Name="LabHint" />
|
||||
<StackPanel x:Name="PanUserList" />
|
||||
<Grid Height="35" Margin="5,8,5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
Private IsLoad As Boolean = False
|
||||
Private IsPageSwitched As Boolean = False '如果在 Loaded 前切换到其他页面,会导致触发 Loaded 时再次切换一次
|
||||
Private Sub PageLinkLeft_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
'切换默认页面
|
||||
If IsPageSwitched Then Exit Sub
|
||||
If IsPageSwitched Then Return
|
||||
ItemHiper.SetChecked(True, False, False)
|
||||
End Sub
|
||||
Private Sub PageOtherLeft_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
@@ -56,7 +56,7 @@
|
||||
''' 切换现有页面。
|
||||
''' </summary>
|
||||
Public Sub PageChange(ID As FormMain.PageSubType)
|
||||
If PageID = ID Then Exit Sub
|
||||
If PageID = ID Then Return
|
||||
AniControlEnabled += 1
|
||||
IsPageSwitched = True
|
||||
Try
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:MyListItem IsHitTestVisible="False" Title="龙腾猫跃" Margin="-5,0,15,0" Info="Plain Craft Launcher 的作者!" Grid.Row="0" Grid.Column="1" />
|
||||
<local:MyListItem IsHitTestVisible="False" Title="龙腾猫跃" Margin="-5,0,15,0" Info="Plain Craft Launcher 的开发者!" Grid.Row="0" Grid.Column="1" />
|
||||
<local:MyListItem IsHitTestVisible="False" Title="Plain Craft Launcher 2" Margin="-5,0,15,0" Info="当前版本:%VERSION%(%VERSIONCODE%.%BRANCH%)" Grid.Row="1" Grid.Column="1" x:Name="ItemAboutPcl" />
|
||||
<Image Source="/Plain Craft Launcher 2;component/Images/Heads/Logo.png" Grid.Row="1" Margin="3">
|
||||
<Image.Clip>
|
||||
@@ -29,7 +29,7 @@
|
||||
<EllipseGeometry Center="17 17" RadiusX="17" RadiusY="17" />
|
||||
</Image.Clip>
|
||||
</Image>
|
||||
<local:MyButton Text="赞助作者" Grid.Column="2" Grid.Row="0" Height="35" EventType="打开网页" EventData="https://afdian.com/a/LTCat" />
|
||||
<local:MyButton Text="赞助 PCL !" Grid.Column="2" Grid.Row="0" Height="35" EventType="打开网页" EventData="https://afdian.com/a/LTCat" ColorType="Highlight" />
|
||||
<local:MyButton Text="查看源代码" Grid.Column="2" Grid.Row="1" Height="35" EventType="打开网页" EventData="https://github.com/Hex-Dragon/PCL2" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
@@ -51,11 +51,12 @@
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:MyListItem Title="bangbang93" Margin="-5,0,15,0" IsHitTestVisible="False" Info="提供 BMCLAPI 镜像源和 Forge 安装工具,详见 https://bmclapi.bangbang93.com" Grid.Row="0" Grid.Column="1" />
|
||||
<local:MyButton x:Name="BtnAboutBmclapi" Text="赞助镜像源" Grid.Row="0" Grid.Column="2" Height="35" />
|
||||
<local:MyButton Text="赞助镜像源" Grid.Row="0" Grid.Column="2" Height="35" EventType="打开网页" EventData="https://afdian.com/a/bangbang93" />
|
||||
<local:MyListItem Title="MC 百科" Margin="-5,0,0,0" IsHitTestVisible="False" Grid.ColumnSpan="2" Info="提供了 Mod 名称的中文翻译和更多相关信息!" Grid.Row="1" Grid.Column="1" />
|
||||
<local:MyButton x:Name="BtnAboutWiki" Text="打开百科" Grid.Row="1" Grid.Column="2" Height="35" />
|
||||
<local:MyListItem Title="00ll00" Margin="-5,0,0,0" IsHitTestVisible="False" Grid.ColumnSpan="2" Info="提供了 Java Launch Wrapper 和一些重要服务支持!" Grid.Row="2" Grid.Column="1" />
|
||||
<local:MyListItem Title="z0z0r4" Margin="-5,0,0,0" IsHitTestVisible="False" Grid.ColumnSpan="2" Info="提供了 MCIM 中国 Mod 下载镜像源和帮助库图床!" Grid.Row="3" Grid.Column="1" />
|
||||
<local:MyButton Text="打开百科" Grid.Row="1" Grid.Column="2" Height="35" EventType="打开网页" EventData="https://www.mcmod.cn" />
|
||||
<local:MyListItem Title="z0z0r4" Margin="-5,0,0,0" IsHitTestVisible="False" Grid.ColumnSpan="2" Info="提供了 MCIM 社区资源镜像源和帮助库图床!" Grid.Row="2" Grid.Column="1" />
|
||||
<local:MyButton Text="MCIM 主页" Grid.Row="2" Grid.Column="2" Height="35" EventType="打开网页" EventData="https://github.com/mcmod-info-mirror" />
|
||||
<local:MyListItem Title="00ll00" Margin="-5,0,0,0" IsHitTestVisible="False" Grid.ColumnSpan="2" Info="提供了 Java Launch Wrapper 和一些重要服务支持!" Grid.Row="3" Grid.Column="1" />
|
||||
<local:MyListItem Title="Patrick" Margin="-5,0,0,0" IsHitTestVisible="False" Grid.ColumnSpan="2" Info="设计并制作了 PCL 图标,让我从做图标的水深火热中得到了解脱……" Grid.Row="4" Grid.Column="1" />
|
||||
<local:MyListItem Title="Hao_Tian" Margin="-5,0,0,0" IsHitTestVisible="False" Grid.ColumnSpan="2" Info="在内测中找出了一大堆没人想得到的诡异 Bug,有非同寻常的 Bug 体质" Grid.Row="5" Grid.Column="1" />
|
||||
<local:MyListItem Title="Minecraft 中文论坛" Margin="-5,0,15,0" IsHitTestVisible="False" Info="虽然已经关站了,但感谢此前提供了 MCBBS 镜像源……" Grid.Row="6" Grid.Column="1" />
|
||||
@@ -70,12 +71,12 @@
|
||||
<EllipseGeometry Center="17 17" RadiusX="17" RadiusY="17" />
|
||||
</Image.Clip>
|
||||
</Image>
|
||||
<Image Source="/Plain Craft Launcher 2;component/Images/Heads/00ll00.png" Grid.Row="2" Margin="3">
|
||||
<Image Source="/Plain Craft Launcher 2;component/Images/Heads/z0z0r4.png" Grid.Row="2" Margin="3">
|
||||
<Image.Clip>
|
||||
<EllipseGeometry Center="17 17" RadiusX="17" RadiusY="17" />
|
||||
</Image.Clip>
|
||||
</Image>
|
||||
<Image Source="/Plain Craft Launcher 2;component/Images/Heads/z0z0r4.png" Grid.Row="3" Margin="3">
|
||||
<Image Source="/Plain Craft Launcher 2;component/Images/Heads/00ll00.png" Grid.Row="3" Margin="3">
|
||||
<Image.Clip>
|
||||
<EllipseGeometry Center="17 17" RadiusX="17" RadiusY="17" />
|
||||
</Image.Clip>
|
||||
@@ -104,197 +105,245 @@
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="赞助者">
|
||||
<StackPanel Margin="25,40,10,20">
|
||||
<TextBlock HorizontalAlignment="Left" Text="以下是 2025 年 3 月的高级赞助者们!感谢各位对 PCL 和伟大的咕咕咕事业的支持!" Margin="0,0,25,5.5" TextTrimming="None" TextWrapping="WrapWithOverflow" />
|
||||
<WrapPanel Margin="0,0,0,10">␍ <TextBlock Width="120" Margin="0,1.5" Text="micheal276" />
|
||||
<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="QY熹微" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LZL" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="老卡费" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="散." />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="续笙_xusheng" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="HappyGhast0123" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Tong" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="15158206433" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="一抹蓝色和粉色" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="UcFB" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="哦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="T2222" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Toudesu" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="苏利" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="DW." />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="抛抛不是泡泡" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="无名小卒" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="lgl" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="mk" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="鲨鱼不是鱼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Momizi_Azusa" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="oseki" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="精?华?夏?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="术士的黑猫" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="theagin" />
|
||||
<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="Tianwai来物" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="如风FC" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="fan" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="雨恋芳歌" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="neko" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="陌上云暮迟迟归" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="121" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="SGYH" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Lelouch" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="tisky" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="禹餘" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MoYou" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="?HONEY HONEY BOOM?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="流雪无痕" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="yourenA" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="当归与蜜糖" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="提瓦特太保" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="weidao-云天" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Yangxl" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="zero" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="guoomg" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="孤念鬱海" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="李晨曦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="dyh" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="didibubu" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="way_" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="浅冥" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LightTeaHear" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="kiki" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="洛山阳" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="月下独酌" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="阿晴" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="论猫的液体可能性" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="微尔丶白折" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="超凡大谱系" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="麻圣" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="八宝饭" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="张不易" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="1" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="望Wang" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="alrin" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="无心态" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MelonEater88" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="白日梦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="FEssyyzplane" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="札卜铎徳勒" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="星河" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="老王1233" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="王等等等" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="橘子233" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="wyhll" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="SiMen_774" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Klcos" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="pepsi" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="FORGE" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="李青团" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Zmr2333" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="CWKF" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="兜帽人evei622130" />
|
||||
<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="WJMAS" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="骨头" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Starying" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="钱小穷" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="casper" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Summer丿皓月" />
|
||||
<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="aiyu" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="shuaitiao" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小真寻" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="清离风" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="FateIsYetUncertain" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Olympia" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="橘如望九" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="木涵" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="2147483647" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="YJ-StarBlock" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="欲予卿" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="haolanne" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="浅夏" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MCxiaobai" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="未知数x酱" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="有事打钱" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Setsuna" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="电脑" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="mpty" />
|
||||
<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="12345" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="fshj" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Langfeige" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="聆风岱岳" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Fier" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="张怀民" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="minecraftmc22" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="爱蹈琯子" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="何心慈" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="睏欤" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="熙里糊涂" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="落叶" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="阿坎尔德" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="杜野凛世" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="呆呆" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="我和琳妮特有个孩子" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Fishking_qwe" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="惠惠" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="黑暗风暴" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Oxsheep" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Clove_Cloud" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="今は最高" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="YuiuY" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="George0307" />
|
||||
<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="黑火c" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="落日余音" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="mojanng_" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="聿丏" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ClarkeTAT" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="东方浅浅" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="王ZEAN" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ayu" />
|
||||
<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="m1nato__" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="dingwenbo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="法老" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="和十奕" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="give" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我是只面包猫" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="柒安" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="YUU" />
|
||||
<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="TylerDeng" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我不在线" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Hugh" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Qiyue" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="CHAKKS" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Silver_1572" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="WIFTAB" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="hmal" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="通大小学弟" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="htenet" />
|
||||
<TextBlock HorizontalAlignment="Left" Text="以下是 2025 年 7 月的高级赞助者们!感谢各位对 PCL 和伟大的咕咕咕事业的支持!" Margin="0,0,25,5.5" TextTrimming="None" TextWrapping="WrapWithOverflow" />
|
||||
<WrapPanel Margin="0,0,0,10">␍ <TextBlock Width="120" Margin="0,1.5" Text="ZSF" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TizhleF" />
|
||||
<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="Flying___pig" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="绝世" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Jwac" />
|
||||
<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="Cess" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ender_glass" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TT" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="白玄.雪狼" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="MUCT" />
|
||||
<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="Ander·Les" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Eoctopus" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="时光飞逝一下午" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Carl7412" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ShinyChariot" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="骨故谷" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Jinji希子" />
|
||||
<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="TBONC" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="祈农" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="凤凰院凶真" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ShuangDaoRen" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="PXZ233" />
|
||||
<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="66112447" />
|
||||
<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="Pari~" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="红云" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Link-an" />
|
||||
<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="liuxuan" />
|
||||
<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="S0D1UM" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="吞仔送命" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="白浪宇宙" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Crimson" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Mibo_MkIX" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="G.snine18^7" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="两把雨伞" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="古明地苑" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="MarbleMionshevic" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text=":〈" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="紫罗兰" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="asai" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="隔壁小明" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="就爱唱歌" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="沫神鹤" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="风已消逝" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="光意留闪" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="我们长征的路上" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="芸芷" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="函数极限" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="冰川泥" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="XunWei" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="sirous" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="路过某打酱油的" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Gnight07" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="结构德古拉" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="myyukee" />
|
||||
<TextBlock Width="240" 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="YYC" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="晨曦酒庄高冷男" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="herald112" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Foxman" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="KoreQAQ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TechOfRevo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="lqs" />
|
||||
<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="全明星小面包批发商DIO" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="碎序" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="U" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Dumlet" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="johnqian" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="KANG" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="owod" />
|
||||
<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="UA-Ming" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="可爱小探姬" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="霜月" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="bud" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="小虐SAIKYO" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="zealotand" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="comico" />
|
||||
<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="LOG175" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="绵" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="scp00813" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="宝宝" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="9527" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ICE_xwx" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="羽笙喵喵" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ssvgg(☉ x ☉)" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Happymeals" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="shen12244" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="一般路过AAA" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Niko" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="qroiwopqri" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TringDron" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="有屳則名" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="TX2006" />
|
||||
<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="wyh114514" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="飞飞在睡觉。" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="柚西" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="XIAOSHUAI" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="saxioh" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="baibaibai" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="事屑Jerry" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Rs32" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="SPDish" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="风早九夜" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Reg" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="hellord" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="时本ki" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="mamana" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="放肆的微笑" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="人没逝" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="wddjww" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="xiao澄" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="银狼碎片" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="OniKata_Kayoko" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="曦" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Echo" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="画卿颜" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="夏 " />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="jiege45" />
|
||||
<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="qwqewe" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="114514" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="YJ_42" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Xricron" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="抛弃大脑" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="10455885" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="羽渡白砂" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="沙" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="sukous" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="册那" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="KMYLS" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="kakadeso" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="懒猫" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="清岚" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Atopos" />
|
||||
<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="H1saNe" />
|
||||
<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="Landsilde" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="zzz" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="星期三" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Ashburn" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="123" />
|
||||
<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="郁子恒是FW" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="每天吃吃吃吃吃不饱" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Freezhao" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="ZHypocrite" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="十下小雨" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="九 十" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="RuthlessXdream" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="zv-vz" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="汐沄的随记" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="REMOTE" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="昔阳" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="七度ユキノ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="KNISX" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="RainbowDashRD" />
|
||||
<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="四分白Fortenz" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="UUZ" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Ankairis" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Jn1E" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="云山如昨好" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="LYJ0415" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="空?" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="Awfrlu+" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="懒帝" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="北安丶七叔" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="xkw" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="KINO" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="POTATO" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="少昊氏" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="狂踹瘸子那條好腿丶" />
|
||||
<TextBlock Width="240" Margin="0,1.5" Text="Thallium_Ash【铊尘】(坨坨)" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="陌雨泠涯" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="bajie79" />
|
||||
<TextBlock Width="120" Margin="0,1.5" Text="紘垰" />
|
||||
</WrapPanel>
|
||||
<Grid Height="35">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -309,11 +358,13 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="法律信息" IsSwaped="True" CanSwap="True">
|
||||
<local:MyCard Margin="0,0,0,15" Title="法律信息" IsSwapped="True" CanSwap="True">
|
||||
<StackPanel Margin="25,39,23,20">
|
||||
<TextBlock Text="隐私说明" TextWrapping="Wrap" Margin="0,6,0,4" FontWeight="Bold" />
|
||||
<TextBlock Margin="0,0,0,2" LineHeight="17" Text="本软件的 User Agent 中包含启动器的版本号,以统计各版本的用户数量。 除此之外,本软件不会向开发者上传任何其他信息。" TextWrapping="Wrap" />
|
||||
<TextBlock Text="其他信息" TextWrapping="Wrap" Margin="0,12,0,4" FontWeight="Bold" />
|
||||
<TextBlock Text="匿名数据收集" TextWrapping="Wrap" Margin="0,6,0,4" FontWeight="Bold" />
|
||||
<TextBlock Margin="0,0,0,2" LineHeight="17" Text="当下载失败、PCL 出错、游戏崩溃等事件时,PCL 会匿名上报信息,以通知龙猫 “哦吼,出错了”,让龙猫能更好地修 Bug……(PCL 不会上传或收集任何个人信息,包括上报的东西里面也没有!)
你可以在 设置 → 其他 → 启动器 中关闭上报,不过龙猫就不知道你遇到了什么 Bug 了……" TextWrapping="Wrap" />
|
||||
<TextBlock Text="隐私声明与个人信息保护政策" TextWrapping="Wrap" Margin="0,10,0,4" FontWeight="Bold" />
|
||||
<TextBlock Margin="0,0,0,2" LineHeight="17" Text="PCL 没有收集个人信息,所以这里其实啥都不用写……
留个这个其实只是为了让你知道 PCL 没有收集个人信息,诶嘿。" TextWrapping="Wrap" />
|
||||
<TextBlock Text="其他信息" TextWrapping="Wrap" Margin="0,10,0,4" FontWeight="Bold" />
|
||||
<TextBlock Margin="0,0,0,2" LineHeight="17" Text="Copyright © 龙腾猫跃 2016. All Rights Reserved. 计算机软件著作权登记号:2020SR0875133 违法违规行为举报投诉邮箱:hexdragon@vip.qq.com 非 MINECRAFT 官方产品。未经 MOJANG 或 MICROSOFT 批准,也不与 MOJANG 或 MICROSOFT 关联。" TextWrapping="Wrap" />
|
||||
<StackPanel Orientation="Horizontal" Height="35" HorizontalAlignment="Left" Margin="0,12,0,0">
|
||||
<local:MyButton Text="用户协议与免责声明" Width="170" Padding="13,0" Margin="0,0,20,0" ColorType="Highlight" EventType="打开网页" EventData="https://shimo.im/docs/rGrd8pY8xWkt6ryW" />
|
||||
@@ -321,7 +372,7 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="许可与版权声明" IsSwaped="True" CanSwap="True">
|
||||
<local:MyCard Margin="0,0,0,15" Title="许可与版权声明" IsSwapped="True" CanSwap="True">
|
||||
<Grid Margin="25,42,23,4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
PanBack.ScrollToHome()
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoaded Then Exit Sub
|
||||
If IsLoaded Then Return
|
||||
IsLoaded = True
|
||||
|
||||
ItemAboutPcl.Info = ItemAboutPcl.Info.Replace("%VERSION%", VersionDisplayName).Replace("%VERSIONCODE%", VersionCode).Replace("%BRANCH%", VersionBranchCode)
|
||||
@@ -18,12 +18,6 @@
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAboutBmclapi_Click(sender As Object, e As EventArgs) Handles BtnAboutBmclapi.Click
|
||||
OpenWebsite("https://afdian.com/a/bangbang93")
|
||||
End Sub
|
||||
Private Sub BtnAboutWiki_Click(sender As Object, e As EventArgs) Handles BtnAboutWiki.Click
|
||||
OpenWebsite("https://www.mcmod.cn")
|
||||
End Sub
|
||||
Public Shared Sub CopyUniqueAddress() Handles BtnDonateCopy.Click
|
||||
ClipboardSet(UniqueAddress)
|
||||
End Sub
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
If Type = "指南" Then
|
||||
MyCard.StackInstall(NewStack, 11, "指南")
|
||||
Else
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
End If
|
||||
PanList.Children.Add(NewCard)
|
||||
Next
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
If ItemTest.Checked AndAlso Setup.Get("UiHiddenOtherTest") Then IsHiddenPage = True
|
||||
If PageSetupUI.HiddenForceShow Then IsHiddenPage = False
|
||||
'若页面错误,或尚未加载,则继续
|
||||
If IsLoad AndAlso Not IsHiddenPage Then Exit Sub
|
||||
If IsLoad AndAlso Not IsHiddenPage Then Return
|
||||
IsLoad = True
|
||||
'刷新子页面隐藏情况
|
||||
PageSetupUI.HiddenRefresh()
|
||||
'选择第一个未被禁用的子页面
|
||||
If IsPageSwitched Then Exit Sub
|
||||
If IsPageSwitched Then Return
|
||||
If Not Setup.Get("UiHiddenOtherHelp") Then
|
||||
ItemHelp.SetChecked(True, False, False)
|
||||
ElseIf Not Setup.Get("UiHiddenOtherAbout") Then
|
||||
@@ -76,7 +76,7 @@
|
||||
''' 切换现有页面。
|
||||
''' </summary>
|
||||
Public Sub PageChange(ID As FormMain.PageSubType)
|
||||
If PageID = ID Then Exit Sub
|
||||
If PageID = ID Then Return
|
||||
AniControlEnabled += 1
|
||||
IsPageSwitched = True
|
||||
Try
|
||||
@@ -126,29 +126,29 @@
|
||||
|
||||
'打开网页
|
||||
Private Sub TryFeedback(sender As Object, e As RouteEventArgs) Handles ItemFeedback.Changed
|
||||
If Not ItemFeedback.Checked Then Exit Sub
|
||||
If Not ItemFeedback.Checked Then Return
|
||||
TryFeedback()
|
||||
e.Handled = True
|
||||
End Sub
|
||||
Public Shared Sub TryFeedback()
|
||||
If Not CanFeedback(True) Then Exit Sub
|
||||
Select Case MyMsgBox("在提交新反馈前,建议先搜索反馈列表,以避免重复提交。" & vbCrLf & "如果无法打开该网页,请尝试使用加速器或 VPN。",
|
||||
If Not CanFeedback(True) Then Return
|
||||
Select Case MyMsgBox("在提交新反馈前,建议先搜索反馈列表,以避免重复提交。" & vbCrLf & "如果无法打开该网页,请使用 VPN 以改善网络环境。",
|
||||
"反馈", "提交新反馈", "查看反馈列表", "取消")
|
||||
Case 1
|
||||
Feedback(True, False)
|
||||
Case 2
|
||||
OpenWebsite("https://github.com/Hex-Dragon/PCL2/issues/")
|
||||
OpenWebsite("https://github.com/Meloong-Git/PCL/issues/")
|
||||
End Select
|
||||
End Sub
|
||||
Private Sub TryVote(sender As Object, e As RouteEventArgs) Handles ItemVote.Changed
|
||||
If Not ItemVote.Checked Then Exit Sub
|
||||
If Not ItemVote.Checked Then Return
|
||||
TryVote()
|
||||
e.Handled = True
|
||||
End Sub
|
||||
Public Shared Sub TryVote()
|
||||
If MyMsgBox("是否要打开新功能投票网页?" & vbCrLf & "如果无法打开该网页,请尝试使用加速器或 VPN。",
|
||||
"新功能投票", "打开", "取消") = 2 Then Exit Sub
|
||||
OpenWebsite("https://github.com/Hex-Dragon/PCL2/discussions/categories/%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8?discussions_q=category%3A%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8+sort%3Adate_created")
|
||||
If MyMsgBox("是否要打开新功能投票网页?" & vbCrLf & "如果无法打开该网页,请使用 VPN 以改善网络环境。",
|
||||
"新功能投票", "打开", "取消") = 2 Then Return
|
||||
OpenWebsite("https://github.com/Meloong-Git/PCL/discussions/categories/%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8?discussions_q=category%3A%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8+sort%3Adate_created")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsEqual Then Exit Sub
|
||||
If IsEqual Then Return
|
||||
End If
|
||||
McFolderListLast = McFolderList
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
For i = 0 To McFolderList.Count - 1
|
||||
If McFolderList(i).Path = PathMcFolder Then
|
||||
CType(FrmSelectLeft.PanList.Children(i + 1), MyListItem).Checked = True '去掉第一个标题
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
If Not McFolderList.Any() Then
|
||||
@@ -151,20 +151,20 @@
|
||||
'检查是否有下载任务
|
||||
If HasDownloadingTask() Then
|
||||
Hint("在下载任务进行时,无法添加游戏文件夹!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Try
|
||||
'获取输入
|
||||
NewFolder = SelectFolder()
|
||||
If NewFolder = "" Then Exit Sub
|
||||
If NewFolder.Contains("!") OrElse NewFolder.Contains(";") Then Hint("Minecraft 文件夹路径中不能含有感叹号或分号!", HintType.Critical) : Exit Sub
|
||||
If NewFolder = "" Then Return
|
||||
If NewFolder.Contains("!") OrElse NewFolder.Contains(";") Then Hint("Minecraft 文件夹路径中不能含有感叹号或分号!", HintType.Critical) : Return
|
||||
'要求输入显示名称
|
||||
Dim SplitedNames As String() = NewFolder.TrimEnd("\").Split("\")
|
||||
Dim DefaultName As String = If(SplitedNames.Last = ".minecraft", If(SplitedNames.Count >= 3, SplitedNames(SplitedNames.Count - 2), ""), SplitedNames.Last)
|
||||
If DefaultName.Length > 40 Then DefaultName = DefaultName.Substring(0, 39)
|
||||
Dim NewName As String = MyMsgBoxInput("输入显示名称", "输入该文件夹在左边栏列表中显示的名称。", DefaultName,
|
||||
New ObjectModel.Collection(Of Validate) From {New ValidateNullOrWhiteSpace, New ValidateLength(1, 30), New ValidateExcept({">", "|"})})
|
||||
If String.IsNullOrWhiteSpace(NewName) Then Exit Sub
|
||||
If String.IsNullOrWhiteSpace(NewName) Then Return
|
||||
'添加文件夹
|
||||
AddFolder(NewFolder, NewName, True)
|
||||
Catch ex As Exception
|
||||
@@ -183,7 +183,7 @@
|
||||
If Not CheckPermission(FolderPath) Then
|
||||
If ShowHint Then
|
||||
Hint("添加文件夹失败:PCL 没有访问该文件夹的权限!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Else
|
||||
Throw New Exception("PCL 没有访问文件夹的权限:" & FolderPath)
|
||||
End If
|
||||
@@ -208,7 +208,7 @@
|
||||
IsAdded = True
|
||||
If Folder.Split(">")(0) = DisplayName Then
|
||||
If ShowHint Then Hint("此文件夹已在列表中!", HintType.Info)
|
||||
Exit Sub
|
||||
Return
|
||||
Else
|
||||
Folders(i) = DisplayName & ">" & FolderPath
|
||||
IsReplace = True
|
||||
@@ -225,15 +225,15 @@
|
||||
Setup.Set("LaunchFolderSelect", FolderPath.Replace(Path, "$"))
|
||||
McFolderListLoader.Start(IsForceRestart:=True)
|
||||
'提示
|
||||
If IsReplace Then Exit Sub
|
||||
If IsReplace Then Return
|
||||
If ShowHint Then Hint("文件夹 " & DisplayName & " 已添加!", HintType.Finish)
|
||||
'检查是否为根目录整合包,自动关闭版本隔离
|
||||
'1. 根目录中存在数个 Mod
|
||||
Dim ModFolder As New DirectoryInfo(FolderPath & "mods\")
|
||||
If Not (ModFolder.Exists AndAlso ModFolder.EnumerateFiles.Count >= 3) Then Exit Sub
|
||||
If Not (ModFolder.Exists AndAlso ModFolder.EnumerateFiles.Count >= 3) Then Return
|
||||
'2. 版本数较少,可能为整合包
|
||||
Dim VersionFolder As New DirectoryInfo(FolderPath & "versions\")
|
||||
If Not (VersionFolder.Exists AndAlso VersionFolder.EnumerateDirectories.Count <= 3) Then Exit Sub
|
||||
If Not (VersionFolder.Exists AndAlso VersionFolder.EnumerateDirectories.Count <= 3) Then Return
|
||||
'3. 能够找到可安装 Mod 的版本
|
||||
For Each VersionPath In VersionFolder.EnumerateDirectories
|
||||
Dim Version As New McVersion(VersionPath.FullName)
|
||||
@@ -241,7 +241,7 @@
|
||||
If Not Version.Modable Then Continue For
|
||||
'4. 该版本的隔离文件夹下不存在 mods
|
||||
Dim ModIndieFolder As New DirectoryInfo(Version.Path & "mods\")
|
||||
If ModIndieFolder.Exists AndAlso ModIndieFolder.EnumerateFiles.Any Then Exit Sub
|
||||
If ModIndieFolder.Exists AndAlso ModIndieFolder.EnumerateFiles.Any Then Return
|
||||
'满足以上全部条件则视为根目录整合包
|
||||
Setup.Set("VersionArgumentIndie", 2, Version:=Version)
|
||||
Setup.Set("VersionArgumentIndieV2", False, Version:=Version)
|
||||
@@ -258,7 +258,7 @@
|
||||
'检查是否有下载任务
|
||||
If HasDownloadingTask() Then
|
||||
Hint("在下载任务进行时,无法创建游戏文件夹!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
If Not Directory.Exists(Path & ".minecraft\") Then
|
||||
Directory.CreateDirectory(Path & ".minecraft\")
|
||||
@@ -290,7 +290,7 @@
|
||||
'不删除
|
||||
Case 3
|
||||
'取消
|
||||
Exit Sub
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
'若修改了本部分代码,应对应修改 Delete_Click 中的代码
|
||||
@@ -317,8 +317,8 @@
|
||||
Public Sub Delete_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim Folder As McFolder = CType(CType(CType(sender.Parent, ContextMenu).Parent, Primitives.Popup).PlacementTarget, MyListItem).Tag
|
||||
Dim DeleteText As String = If((Folder.Type = McFolderType.Original OrElse Folder.Type = McFolderType.RenamedOriginal) AndAlso Folder.Path = Path & ".minecraft\" AndAlso McFolderList.Count = 1, "清空", "删除")
|
||||
If MyMsgBox("你确定要" & DeleteText & "这个文件夹吗?" & vbCrLf & "目标文件夹:" & Folder.Path & vbCrLf & vbCrLf & "这会导致该文件夹中的所有存档与其他文件永久丢失,且不可恢复!", "删除警告", "取消", "确认", "取消") <> 2 Then Exit Sub
|
||||
If MyMsgBox("如果你在该文件夹中存放了除 MC 以外的其他文件,这些文件也会被一同删除!" & vbCrLf & "继续删除会导致该文件夹中的所有文件永久丢失,请在仔细确认后再继续!" & vbCrLf & "目标文件夹:" & Folder.Path & vbCrLf & vbCrLf & "这是最后一次警告!", "删除警告", "确认" & DeleteText, "取消", IsWarn:=True) <> 1 Then Exit Sub
|
||||
If MyMsgBox("你确定要" & DeleteText & "这个文件夹吗?" & vbCrLf & "目标文件夹:" & Folder.Path & vbCrLf & vbCrLf & "这会导致该文件夹中的所有存档与其他文件永久丢失,且不可恢复!", "删除警告", "取消", "确认", "取消") <> 2 Then Return
|
||||
If MyMsgBox("如果你在该文件夹中存放了除 MC 以外的其他文件,这些文件也会被一同删除!" & vbCrLf & "继续删除会导致该文件夹中的所有文件永久丢失,请在仔细确认后再继续!" & vbCrLf & "目标文件夹:" & Folder.Path & vbCrLf & vbCrLf & "这是最后一次警告!", "删除警告", "确认" & DeleteText, "取消", IsWarn:=True) <> 1 Then Return
|
||||
'移出列表
|
||||
If Folder.Type = McFolderType.Custom Then
|
||||
Dim Folders As New List(Of String)(Setup.Get("LaunchFolders").ToString.Split("|"))
|
||||
@@ -369,7 +369,7 @@
|
||||
Dim NewName As String =
|
||||
MyMsgBoxInput("输入新名称", "", Folder.Name,
|
||||
New ObjectModel.Collection(Of Validate) From {New ValidateNullOrWhiteSpace, New ValidateLength(1, 30), New ValidateExcept({">", "|"})})
|
||||
If String.IsNullOrWhiteSpace(NewName) Then Exit Sub
|
||||
If String.IsNullOrWhiteSpace(NewName) Then Return
|
||||
'修改自定义名
|
||||
Dim Folders As New List(Of String)(Setup.Get("LaunchFolders").ToString.Split("|"))
|
||||
Dim IsAdded As Boolean = False
|
||||
@@ -380,7 +380,7 @@
|
||||
IsAdded = True
|
||||
If FolderCurrent.Split(">")(0) = NewName Then
|
||||
'名称未修改
|
||||
Exit Sub
|
||||
Return
|
||||
Else
|
||||
Folders(i) = NewName & ">" & Folder.Path
|
||||
End If
|
||||
@@ -400,12 +400,12 @@
|
||||
|
||||
'点击选项
|
||||
Public Sub Folder_Change(sender As MyListItem, e As RouteEventArgs)
|
||||
If Not e.RaiseByMouse OrElse Not sender.Checked Then Exit Sub
|
||||
If Not e.RaiseByMouse OrElse Not sender.Checked Then Return
|
||||
'检查是否有下载任务
|
||||
If HasDownloadingTask(True) Then
|
||||
Hint("在下载任务进行时,无法切换游戏文件夹!", HintType.Critical)
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'更换
|
||||
Setup.Set("LaunchFolderSelect", CType(sender.Tag, McFolder).Path.Replace(Path, "$"))
|
||||
|
||||
@@ -81,15 +81,15 @@
|
||||
PanMain.Children.Add(NewCard)
|
||||
'确定卡片是否展开
|
||||
If Card.Key = McVersionCardType.Rubbish OrElse Card.Key = McVersionCardType.Error OrElse Card.Key = McVersionCardType.Fool Then
|
||||
NewCard.IsSwaped = True
|
||||
NewCard.IsSwapped = True
|
||||
Else
|
||||
MyCard.StackInstall(NewStack, 0, CardTitle)
|
||||
End If
|
||||
Next
|
||||
|
||||
'若只有一个卡片,则强制展开
|
||||
If PanMain.Children.Count = 1 AndAlso CType(PanMain.Children(0), MyCard).IsSwaped Then
|
||||
CType(PanMain.Children(0), MyCard).IsSwaped = False
|
||||
If PanMain.Children.Count = 1 AndAlso CType(PanMain.Children(0), MyCard).IsSwapped Then
|
||||
CType(PanMain.Children(0), MyCard).IsSwapped = False
|
||||
End If
|
||||
|
||||
'判断应该显示哪一个页面
|
||||
@@ -227,11 +227,11 @@
|
||||
DeleteDirectory(Version.Path)
|
||||
Hint("版本 " & Version.Name & " 已永久删除!", HintType.Finish)
|
||||
Else
|
||||
FileIO.FileSystem.DeleteDirectory(Version.Path, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
FileIO.FileSystem.DeleteDirectory(Version.Path, FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
Hint("版本 " & Version.Name & " 已删除到回收站!", HintType.Finish)
|
||||
End If
|
||||
Case 2
|
||||
Exit Sub
|
||||
Return
|
||||
End Select
|
||||
'从 UI 中移除
|
||||
If Version.DisplayType = McVersionCardType.Hidden OrElse Not Version.IsStar Then
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
{"HintDownloadThread", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
{"HintNotice", New SetupEntry(0, Source:=SetupSource.Registry)},
|
||||
{"HintDownload", New SetupEntry(0, Source:=SetupSource.Registry)},
|
||||
{"HintInstallBack", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
{"HintHide", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
{"HintHandInstall", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
{"HintBuy", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
@@ -42,6 +41,7 @@
|
||||
{"SystemSystemCache", New SetupEntry("", Source:=SetupSource.Registry)},
|
||||
{"SystemSystemUpdate", New SetupEntry(0)},
|
||||
{"SystemSystemActivity", New SetupEntry(0)},
|
||||
{"SystemSystemTelemetry", New SetupEntry(True, Source:=SetupSource.Registry)},
|
||||
{"CacheExportConfig", New SetupEntry("", Source:=SetupSource.Registry)},
|
||||
{"CacheSavedPageUrl", New SetupEntry("", Source:=SetupSource.Registry)},
|
||||
{"CacheSavedPageVersion", New SetupEntry("", Source:=SetupSource.Registry)},
|
||||
@@ -124,7 +124,7 @@
|
||||
{"ToolDownloadTranslateV2", New SetupEntry(1, Source:=SetupSource.Registry)},
|
||||
{"ToolDownloadIgnoreQuilt", New SetupEntry(True, Source:=SetupSource.Registry)},
|
||||
{"ToolDownloadCert", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
{"ToolDownloadMod", New SetupEntry(1, Source:=SetupSource.Registry)},
|
||||
{"ToolDownloadMod", New SetupEntry(2, Source:=SetupSource.Registry)},
|
||||
{"ToolModLocalNameStyle", New SetupEntry(0, Source:=SetupSource.Registry)},
|
||||
{"ToolUpdateAlpha", New SetupEntry(0, Source:=SetupSource.Registry, Encoded:=True)},
|
||||
{"ToolUpdateRelease", New SetupEntry(False, Source:=SetupSource.Registry)},
|
||||
@@ -246,7 +246,7 @@
|
||||
Value = CTypeDynamic(Value, E.Type)
|
||||
If E.State = 2 Then
|
||||
'如果已应用,且值相同,则无需再次更改
|
||||
If E.Value = Value AndAlso Not ForceReload Then Exit Sub
|
||||
If E.Value = Value AndAlso Not ForceReload Then Return
|
||||
Else
|
||||
'如果未应用,则直接更改并应用
|
||||
If E.Source <> SetupSource.Version Then E.State = 2
|
||||
@@ -363,7 +363,7 @@
|
||||
''' </summary>
|
||||
Private Sub Read(Key As String, ByRef E As SetupEntry, Version As McVersion)
|
||||
Try
|
||||
If Not E.State = 0 Then Exit Sub
|
||||
If Not E.State = 0 Then Return
|
||||
Dim SourceValue As String = Nothing '先用 String 储存,避免类型转换
|
||||
Select Case E.Source
|
||||
Case SetupSource.Normal
|
||||
@@ -423,7 +423,7 @@
|
||||
|
||||
'游戏内存
|
||||
Public Sub LaunchRamType(Type As Integer)
|
||||
If FrmSetupLaunch Is Nothing Then Exit Sub
|
||||
If FrmSetupLaunch Is Nothing Then Return
|
||||
FrmSetupLaunch.RamType(Type)
|
||||
End Sub
|
||||
|
||||
@@ -494,11 +494,9 @@
|
||||
Public Sub UiLauncherTransparent(Value As Integer)
|
||||
FrmMain.Opacity = Value / 1000 + 0.4
|
||||
End Sub
|
||||
#If Not BETA Then
|
||||
Public Sub UiLauncherTheme(Value As Integer)
|
||||
ThemeRefresh(Value)
|
||||
End Sub
|
||||
#End If
|
||||
Public Sub UiBackgroundColorful(Value As Boolean)
|
||||
ThemeRefresh()
|
||||
End Sub
|
||||
@@ -516,7 +514,7 @@
|
||||
FrmMain.ImgBack.Margin = New Thickness(-(Value + 1) / 1.8)
|
||||
End Sub
|
||||
Public Sub UiBackgroundSuit(Value As Integer)
|
||||
If IsNothing(FrmMain.ImgBack.Background) Then Exit Sub
|
||||
If IsNothing(FrmMain.ImgBack.Background) Then Return
|
||||
Dim Width As Double = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Width
|
||||
Dim Height As Double = CType(FrmMain.ImgBack.Background, ImageBrush).ImageSource.Height
|
||||
If Value = 0 Then
|
||||
@@ -587,7 +585,7 @@
|
||||
|
||||
'主页
|
||||
Public Sub UiCustomType(Value As Integer)
|
||||
If FrmSetupUI Is Nothing Then Exit Sub
|
||||
If FrmSetupUI Is Nothing Then Return
|
||||
Select Case Value
|
||||
Case 0 '无
|
||||
FrmSetupUI.PanCustomPreset.Visibility = Visibility.Collapsed
|
||||
@@ -612,7 +610,7 @@
|
||||
FrmSetupUI.HintCustomWarn.Visibility = If(Setup.Get("HintCustomWarn"), Visibility.Collapsed, Visibility.Visible)
|
||||
FrmSetupUI.HintCustom.Text = $"从指定网址联网获取主页内容。服主也可以用于动态更新服务器公告。{vbCrLf}如果你制作了稳定运行的联网主页,可以点击这条提示投稿,若合格即可加入预设!"
|
||||
FrmSetupUI.HintCustom.EventType = "打开网页"
|
||||
FrmSetupUI.HintCustom.EventData = "https://github.com/Hex-Dragon/PCL2/discussions/2528"
|
||||
FrmSetupUI.HintCustom.EventData = "https://github.com/Meloong-Git/PCL/discussions/2528"
|
||||
Case 3 '预设
|
||||
FrmSetupUI.PanCustomPreset.Visibility = Visibility.Visible
|
||||
FrmSetupUI.PanCustomLocal.Visibility = Visibility.Collapsed
|
||||
@@ -749,16 +747,16 @@
|
||||
|
||||
'游戏内存
|
||||
Public Sub VersionRamType(Type As Integer)
|
||||
If FrmVersionSetup Is Nothing Then Exit Sub
|
||||
If FrmVersionSetup Is Nothing Then Return
|
||||
FrmVersionSetup.RamType(Type)
|
||||
End Sub
|
||||
|
||||
'服务器
|
||||
Public Sub VersionServerLogin(Type As Integer)
|
||||
If FrmVersionSetup Is Nothing Then Exit Sub
|
||||
If FrmVersionSetup Is Nothing Then Return
|
||||
'为第三方登录清空缓存以更新描述
|
||||
WriteIni(PathMcFolder & "PCL.ini", "VersionCache", "")
|
||||
If PageVersionLeft.Version Is Nothing Then Exit Sub
|
||||
If PageVersionLeft.Version Is Nothing Then Return
|
||||
PageVersionLeft.Version = New McVersion(PageVersionLeft.Version.Name).Load()
|
||||
LoaderFolderRun(McVersionListLoader, PathMcFolder, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\")
|
||||
End Sub
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="游戏内存">
|
||||
<StackPanel Margin="25,40,25,15">
|
||||
<local:MyHint x:Name="LabRamWarn" Text="32 位 Java 最多只能分配 1 GB 内存,建议安装 64 位 Java!" IsWarn="True" Margin="0,0,0,12" />
|
||||
<local:MyHint x:Name="LabRamWarn" Visibility="Visible" Text="32 位 Java 只能分配最多 1 GB 的内存。强烈建议换用 64 位的 Java!" Theme="Yellow" Margin="0,0,0,12" />
|
||||
<Grid Margin="0,0,0,3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -171,9 +171,9 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard x:Name="CardSkin" Margin="0,0,0,15" Title="离线皮肤" CanSwap="True" IsSwaped="True">
|
||||
<local:MyCard x:Name="CardSkin" Margin="0,0,0,15" Title="离线皮肤" CanSwap="True" IsSwapped="True">
|
||||
<StackPanel Margin="25,40,25,15">
|
||||
<local:MyHint Text="由于技术问题,此功能只保证对 1.19.2 以前的版本有效!" IsWarn="True" Margin="0,0,0,10" />
|
||||
<local:MyHint Text="由于技术问题,此功能只保证对 1.19.2 以前的版本有效!" Theme="Yellow" Margin="0,0,0,10" />
|
||||
<Grid Margin="-1,0,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
@@ -205,7 +205,7 @@
|
||||
<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" />
|
||||
<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">
|
||||
@@ -218,7 +218,7 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="高级启动选项" IsSwaped="True" CanSwap="True">
|
||||
<local:MyCard Margin="0,0,0,15" Title="高级启动选项" IsSwapped="True" CanSwap="True">
|
||||
<Grid Margin="25,40,25,15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -226,37 +226,37 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<local:MyHint Text="你可以在版本独立设置中找到更多高级启动选项。" Margin="0,2,0,12" IsWarn="False" Grid.ColumnSpan="2"
|
||||
CanClose="True" RelativeSetup="HintMoreAdvancedSetup" />
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,25,0">
|
||||
<TextBlock Text="JVM 参数头部" VerticalAlignment="Center" />
|
||||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,25,0">
|
||||
<TextBlock Text="Java 虚拟机参数" VerticalAlignment="Center" />
|
||||
<local:MyIconButton Height="23" Margin="0,1,0,0" x:Name="BtnAdvanceJvmReset" VerticalAlignment="Center"
|
||||
ToolTip="还原" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1"
|
||||
Logo="M530 0c287 0 521 229 521 511s-233 511-521 511c-233 0-436-151-500-368a63 63 0 0 1 44-79 65 65 0 0 1 80 43c48 162 200 276 375 276 215 0 390-171 390-383s-174-383-390-383c-103 0-199 39-270 106l21-5a63 63 0 0 1 33 123l-157 42a65 65 0 0 1-90-42l-49-183a65 65 0 1 1 126-33l6 26A524 524 0 0 1 530 0z" LogoScale="0.9" />
|
||||
</StackPanel>
|
||||
<local:MyTextBox x:Name="TextAdvanceJvm" Grid.Row="1" Grid.ColumnSpan="2" Tag="LaunchAdvanceJvm" Grid.Column="1" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,除非有确定把握,否则请不要修改" MaxLength="4000"
|
||||
<local:MyTextBox x:Name="TextAdvanceJvm" Grid.ColumnSpan="2" Tag="LaunchAdvanceJvm" Grid.Column="1" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,除非有确定把握,否则请不要修改。
支持 Minecraft 版本 JSON 中的字符串替换标记,例如 ${library_directory}。" MaxLength="4000"
|
||||
Height="100" AcceptsReturn="True" TextWrapping="Wrap" VerticalContentAlignment="Top" Padding="0,5" VerticalScrollBarVisibility="Auto" />
|
||||
<TextBlock Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Text="游戏参数尾部" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="3" Grid.ColumnSpan="2" Tag="LaunchAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。
例如输入 --demo 则会以试玩模式启动游戏。" />
|
||||
<TextBlock Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Text="启动前执行命令" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceRun" Grid.Row="5" Grid.ColumnSpan="2" Tag="LaunchAdvanceRun" Grid.Column="1" HintText=""
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="游戏参数" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="LaunchAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。
例如,输入 --demo 则会以试玩模式启动游戏。
支持 Minecraft 版本 JSON 中的字符串替换标记,例如 ${library_directory}。" />
|
||||
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="启动前执行命令" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceRun" Grid.Row="4" Grid.ColumnSpan="2" Tag="LaunchAdvanceRun" Grid.Column="1" HintText=""
|
||||
ToolTip="在 MC 启动前执行特定命令或程序,语法与 Windows 的命令提示符一致。

可以使用以下替换标记实现相对路径(路径均以 \ 结尾):
 · {path}:PCL 的 exe 文件所在的文件夹
 · {minecraft}:.minecraft 文件夹
 · {verpath}:版本文件夹(.minecraft\versions\版本名\)
 · {verindie}:开启版本隔离时等同版本文件夹,未开启时等同 .minecraft 文件夹
 · {java}:游戏运行时的 Java 文件夹

除此之外,也支持以下替换标记:
 · {user}:玩家名字
 · {login}:玩家的登录方式
 · {uuid}:玩家的 UUID
 · {name}:游戏版本名
 · {date}、{time}:当前的系统时间
 · {version}:游戏对应的原版版本号

例如:
 · "{verpath}test.exe" :运行版本文件夹下的 test.exe 程序
 · "{java}java.exe" -jar "{verpath}test.jar" :用 Java 运行版本文件夹下的 test.jar
 · notepad "{verindie}options.txt" :使用记事本打开该版本的设置文件

涉及路径的操作最好都打上双引号,以避免路径中的空格导致运行失败。
执行命令时,命令行所在的目录是当前的 .minecraft 文件夹。" />
|
||||
<local:MyCheckBox Grid.Row="6" Grid.Column="1" x:Name="CheckAdvanceRunWait" Tag="LaunchAdvanceRunWait" Visibility="Collapsed"
|
||||
<local:MyCheckBox Grid.Row="5" Grid.Column="1" x:Name="CheckAdvanceRunWait" Tag="LaunchAdvanceRunWait" Visibility="Collapsed"
|
||||
Text="等待命令执行完成后再继续启动" Margin="0,8,0,7" />
|
||||
<StackPanel Margin="0,12,0,4" Grid.Row="7" Grid.ColumnSpan="2" HorizontalAlignment="Left">
|
||||
<StackPanel Margin="0,12,0,4" Grid.Row="6" Grid.ColumnSpan="2" HorizontalAlignment="Left">
|
||||
<local:MyCheckBox Height="28" Text="禁用 Java Launch Wrapper" x:Name="CheckAdvanceDisableJLW" Tag="LaunchAdvanceDisableJLW"
|
||||
ToolTipService.Placement="Right" ToolTip="PCL 会使用 Java Launch Wrapper 来修复老版本 Java 在中文路径下无法启动的问题。
如果这被反作弊拦截,或遇到其他问题,也可以将其关闭。" />
|
||||
<local:MyCheckBox Height="28" Text="要求 Java 使用高性能显卡" x:Name="CheckAdvanceGraphicCard" Tag="LaunchAdvanceGraphicCard"
|
||||
ToolTipService.Placement="Right" ToolTip="自动在 Windows 设置 → 系统 → 屏幕 → 显示卡 中将 Java 改为使用高性能显卡。
如果电脑同时有集显和独显,这能确保 MC 使用独显进行渲染,以大幅提高性能。" />
|
||||
</StackPanel>
|
||||
<local:MyHint Text="你还可以在版本独立设置中找到更多高级启动选项。" Margin="0,5,0,10" Theme="Blue" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
CanClose="True" RelativeSetup="HintMoreAdvancedSetup" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyExtraTextButton HorizontalAlignment="Center" Margin="0,-5,0,15"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
End If
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
|
||||
AniControlEnabled += 1
|
||||
@@ -122,18 +122,18 @@
|
||||
|
||||
Private Sub BtnSkinChange_Click(sender As Object, e As EventArgs) Handles BtnSkinChange.Click
|
||||
Dim SkinInfo As McSkinInfo = McSkinSelect()
|
||||
If Not SkinInfo.IsVaild Then Exit Sub
|
||||
If Not SkinInfo.IsVaild Then Return
|
||||
ChangeSkin(SkinInfo)
|
||||
End Sub
|
||||
Private Sub RadioSkinType3_Check(sender As Object, e As RouteEventArgs) Handles RadioSkinType4.PreviewCheck
|
||||
If Not (AniControlEnabled = 0 AndAlso e.RaiseByMouse) Then Exit Sub
|
||||
If Not (AniControlEnabled = 0 AndAlso e.RaiseByMouse) Then Return
|
||||
'已有图片则不再选择
|
||||
If File.Exists(PathAppdata & "CustomSkin.png") Then Exit Sub
|
||||
If File.Exists(PathAppdata & "CustomSkin.png") Then Return
|
||||
'没有图片则要求选择
|
||||
Dim SkinInfo As McSkinInfo = McSkinSelect()
|
||||
If Not SkinInfo.IsVaild Then
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'正式改变
|
||||
If Not ChangeSkin(SkinInfo) Then e.Handled = True
|
||||
@@ -187,7 +187,7 @@
|
||||
#Region "游戏内存"
|
||||
|
||||
Public Sub RamType(Type As Integer)
|
||||
If SliderRamCustom Is Nothing Then Exit Sub
|
||||
If SliderRamCustom Is Nothing Then Return
|
||||
SliderRamCustom.IsEnabled = (Type = 1)
|
||||
End Sub
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
''' 刷新 UI 上的 RAM 显示。
|
||||
''' </summary>
|
||||
Public Sub RefreshRam(ShowAnim As Boolean)
|
||||
If LabRamGame Is Nothing OrElse LabRamUsed Is Nothing OrElse FrmMain.PageCurrent <> FormMain.PageType.Setup OrElse FrmSetupLeft.PageID <> FormMain.PageSubType.SetupLaunch Then Exit Sub
|
||||
If LabRamGame Is Nothing OrElse LabRamUsed Is Nothing OrElse FrmMain.PageCurrent <> FormMain.PageType.Setup OrElse FrmSetupLeft.PageID <> FormMain.PageSubType.SetupLaunch Then Return
|
||||
'获取内存情况
|
||||
Dim RamGame As Double = Math.Round(GetRam(McVersionCurrent, False), 5)
|
||||
Dim RamTotal As Double = Math.Round(My.Computer.Info.TotalPhysicalMemory / 1024 / 1024 / 1024, 1)
|
||||
@@ -409,7 +409,7 @@ PreFin:
|
||||
|
||||
'刷新 Java 下拉框显示
|
||||
Public Sub RefreshJavaComboBox()
|
||||
If ComboArgumentJava Is Nothing Then Exit Sub
|
||||
If ComboArgumentJava Is Nothing Then Return
|
||||
'初始化列表
|
||||
ComboArgumentJava.Items.Clear()
|
||||
ComboArgumentJava.Items.Add(New MyComboBoxItem With {.Content = "自动选择合适的 Java", .Tag = "自动选择"})
|
||||
@@ -448,9 +448,9 @@ PreFin:
|
||||
|
||||
'下拉框选择更改
|
||||
Private Sub JavaSelectionUpdate() Handles ComboArgumentJava.SelectionChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
'Java 不可用时也不清空,会导致刷新时找不到对象
|
||||
If ComboArgumentJava.SelectedItem Is Nothing OrElse ComboArgumentJava.SelectedItem.Tag Is Nothing Then Exit Sub
|
||||
If ComboArgumentJava.SelectedItem Is Nothing OrElse ComboArgumentJava.SelectedItem.Tag Is Nothing Then Return
|
||||
'设置新的 Java
|
||||
Dim SelectedJava = ComboArgumentJava.SelectedItem.Tag
|
||||
If "自动选择".Equals(SelectedJava) Then
|
||||
@@ -469,11 +469,11 @@ PreFin:
|
||||
Private Sub BtnArgumentJavaSelect_Click(sender As Object, e As EventArgs) Handles BtnArgumentJavaSelect.Click
|
||||
If JavaSearchLoader.State = LoadState.Loading Then
|
||||
Hint("正在搜索 Java,请稍候!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'选择 Java
|
||||
Dim JavaSelected As String = SelectFile("javaw.exe|javaw.exe", "选择 bin 文件夹中的 javaw.exe 文件")
|
||||
If JavaSelected = "" Then Exit Sub
|
||||
If JavaSelected = "" Then Return
|
||||
JavaSelected = GetPathFromFullPath(JavaSelected)
|
||||
Try
|
||||
'验证 Java 可用
|
||||
@@ -492,14 +492,14 @@ PreFin:
|
||||
Hint("已将该 Java 加入 Java 列表!", HintType.Finish)
|
||||
Catch ex As Exception
|
||||
Log(ex, "该 Java 存在异常,无法使用", LogLevel.Msgbox, "异常的 Java")
|
||||
Exit Sub
|
||||
Return
|
||||
End Try
|
||||
End Sub
|
||||
'自动查找
|
||||
Private Sub BtnArgumentJavaSearch_Click(sender As Object, e As EventArgs) Handles BtnArgumentJavaSearch.Click
|
||||
If JavaSearchLoader.State = LoadState.Loading Then
|
||||
Hint("正在搜索 Java,请稍候!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
RunInThread(
|
||||
Sub()
|
||||
@@ -518,7 +518,7 @@ PreFin:
|
||||
#Region "其他选项"
|
||||
|
||||
Private Sub WindowTypeUIRefresh() Handles ComboArgumentWindowType.SelectionChanged
|
||||
If ComboArgumentWindowType Is Nothing Then Exit Sub
|
||||
If ComboArgumentWindowType Is Nothing Then Return
|
||||
If ComboArgumentWindowType.SelectedIndex = 3 AndAlso LabArgumentWindowMiddle IsNot Nothing AndAlso LabArgumentWindowMiddle.Visibility = Visibility.Collapsed Then
|
||||
LabArgumentWindowMiddle.Visibility = Visibility.Visible
|
||||
TextArgumentWindowHeight.Visibility = Visibility.Visible
|
||||
@@ -532,7 +532,7 @@ PreFin:
|
||||
|
||||
'可见性选择直接关闭的警告
|
||||
Private Sub ComboArgumentVisibie_SizeChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboArgumentVisibie.SelectionChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
If ComboArgumentVisibie.SelectedIndex = 0 Then
|
||||
If MyMsgBox("若在游戏启动后立即关闭启动器,崩溃检测、更改游戏标题等功能将失效。" & vbCrLf &
|
||||
"如果想保留这些功能,可以选择让启动器在游戏启动后隐藏,游戏退出后自动关闭。", "提醒", "继续", "取消") = 2 Then
|
||||
@@ -543,7 +543,7 @@ PreFin:
|
||||
|
||||
'开启自动内存优化的警告
|
||||
Private Sub CheckArgumentRam_Change() Handles CheckArgumentRam.Change
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
If Not CheckArgumentRam.Checked Then Return
|
||||
If MyMsgBox("内存优化会显著延长启动耗时,建议仅在内存不足时开启。" & vbCrLf &
|
||||
"如果你在使用机械硬盘,这还可能导致一小段时间的严重卡顿。" &
|
||||
@@ -555,8 +555,8 @@ PreFin:
|
||||
|
||||
'版本隔离提示
|
||||
Private Sub ComboArgumentIndie_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboArgumentIndieV2.SelectionChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
MyMsgBox("默认策略只会对今后新安装的版本生效。" & vbCrLf & "已有版本的隔离策略需要在它的版本设置中调整。")
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
MyMsgBox("本设置仅会对之后新安装的版本生效。" & vbCrLf & "如果要修改已安装的版本的隔离方式,请在它的版本独立设置中调整。")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
If ItemLink.Checked AndAlso Setup.Get("UiHiddenSetupLink") Then IsHiddenPage = True
|
||||
If PageSetupUI.HiddenForceShow Then IsHiddenPage = False
|
||||
'若页面错误,或尚未加载,则继续
|
||||
If IsLoad AndAlso Not IsHiddenPage Then Exit Sub
|
||||
If IsLoad AndAlso Not IsHiddenPage Then Return
|
||||
IsLoad = True
|
||||
'刷新子页面隐藏情况
|
||||
PageSetupUI.HiddenRefresh()
|
||||
'选择第一个未被禁用的子页面
|
||||
If IsPageSwitched Then Exit Sub
|
||||
If IsPageSwitched Then Return
|
||||
If Not Setup.Get("UiHiddenSetupLaunch") Then
|
||||
ItemLaunch.SetChecked(True, False, False)
|
||||
ElseIf Not Setup.Get("UiHiddenSetupUi") Then
|
||||
@@ -91,7 +91,7 @@
|
||||
''' 切换现有页面。
|
||||
''' </summary>
|
||||
Public Sub PageChange(ID As FormMain.PageSubType)
|
||||
If PageID = ID Then Exit Sub
|
||||
If PageID = ID Then Return
|
||||
AniControlEnabled += 1
|
||||
IsPageSwitched = True
|
||||
Try
|
||||
@@ -144,25 +144,25 @@
|
||||
Public Sub Reset(sender As Object, e As EventArgs)
|
||||
Select Case Val(sender.Tag)
|
||||
Case FormMain.PageSubType.SetupLaunch
|
||||
If MyMsgBox("是否要初始化启动页的所有设置?该操作不可撤销。", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If MyMsgBox("是否要初始化 启动 页面的所有设置?该操作不可撤销。", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If IsNothing(FrmSetupLaunch) Then FrmSetupLaunch = New PageSetupLaunch
|
||||
FrmSetupLaunch.Reset()
|
||||
ItemLaunch.Checked = True
|
||||
End If
|
||||
Case FormMain.PageSubType.SetupUI
|
||||
If MyMsgBox("是否要初始化个性化页的所有设置?该操作不可撤销。" & vbCrLf & "(背景图片与音乐、主页等外部文件不会被删除)", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If MyMsgBox("是否要初始化 个性化 页面的所有设置?该操作不可撤销。" & vbCrLf & "(背景图片与音乐、主页等外部文件不会被删除)", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If IsNothing(FrmSetupUI) Then FrmSetupUI = New PageSetupUI
|
||||
FrmSetupUI.Reset()
|
||||
ItemUI.Checked = True
|
||||
End If
|
||||
Case FormMain.PageSubType.SetupSystem
|
||||
If MyMsgBox("是否要初始化启动器页的所有设置?该操作不可撤销。", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If MyMsgBox("是否要初始化 其他 页面的所有设置?该操作不可撤销。", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If IsNothing(FrmSetupSystem) Then FrmSetupSystem = New PageSetupSystem
|
||||
FrmSetupSystem.Reset()
|
||||
ItemSystem.Checked = True
|
||||
End If
|
||||
Case FormMain.PageSubType.SetupLink
|
||||
If MyMsgBox("是否要初始化联机页的所有设置?该操作不可撤销。", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If MyMsgBox("是否要初始化 联机 页面的所有设置?该操作不可撤销。", "初始化确认",, "取消", IsWarn:=True) = 1 Then
|
||||
If IsNothing(FrmSetupLink) Then FrmSetupLink = New PageSetupLink
|
||||
FrmSetupLink.Reset()
|
||||
ItemLink.Checked = True
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
PanBack.ScrollToHome()
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoaded Then Exit Sub
|
||||
If IsLoaded Then Return
|
||||
IsLoaded = True
|
||||
|
||||
AniControlEnabled += 1
|
||||
|
||||
@@ -62,16 +62,18 @@
|
||||
<RowDefinition Height="7" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="7" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="7" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="下载源" Margin="0,0,25,0" />
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="来源" Margin="0,0,25,0" />
|
||||
<local:MyComboBox x:Name="ComboDownloadMod" Grid.Row="0" Grid.ColumnSpan="2" Tag="ToolDownloadMod" Grid.Column="1">
|
||||
<local:MyComboBoxItem Content="尽量使用镜像源(暂时无效)" />
|
||||
<local:MyComboBoxItem Content="尽量使用镜像源(可能缺少刚刚更新的版本)" />
|
||||
<local:MyComboBoxItem Content="仅在官方源加载缓慢时改用镜像源" />
|
||||
<local:MyComboBoxItem Content="尽量使用官方源" IsSelected="True" />
|
||||
</local:MyComboBox>-->
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="文件名格式" Margin="0,0,25,0" />
|
||||
<local:MyComboBox Grid.Row="0" x:Name="ComboDownloadTranslateV2" Grid.ColumnSpan="2" Tag="ToolDownloadTranslateV2" Grid.Column="1"
|
||||
</local:MyComboBox>
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="文件名格式" Margin="0,0,25,0" />
|
||||
<local:MyComboBox Grid.Row="2" x:Name="ComboDownloadTranslateV2" Grid.ColumnSpan="2" Tag="ToolDownloadTranslateV2" Grid.Column="1"
|
||||
ToolTip="下载社区资源时,其默认文件名的格式">
|
||||
<local:MyComboBoxItem Content="【机械动力】create-1.21.1-6.0.4" />
|
||||
<local:MyComboBoxItem Content="[机械动力] create-1.21.1-6.0.4" IsSelected="True" />
|
||||
@@ -79,13 +81,13 @@
|
||||
<local:MyComboBoxItem Content="create-1.21.1-6.0.4-机械动力" />
|
||||
<local:MyComboBoxItem Content="create-1.21.1-6.0.4" />
|
||||
</local:MyComboBox>
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="Mod 管理样式" Margin="0,0,25,0" />
|
||||
<local:MyComboBox Grid.Row="2" x:Name="ComboModLocalNameStyle" Grid.ColumnSpan="2" Tag="ToolModLocalNameStyle" Grid.Column="1"
|
||||
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="Mod 管理样式" Margin="0,0,25,0" />
|
||||
<local:MyComboBox Grid.Row="4" x:Name="ComboModLocalNameStyle" Grid.ColumnSpan="2" Tag="ToolModLocalNameStyle" Grid.Column="1"
|
||||
ToolTip="在 Mod 管理页面中,Mod 项的显示方式">
|
||||
<local:MyComboBoxItem Content="标题显示译名,详情显示文件名" IsSelected="True" />
|
||||
<local:MyComboBoxItem Content="标题显示文件名,详情显示译名" />
|
||||
</local:MyComboBox>
|
||||
<local:MyCheckBox Margin="0,2,0,4" Text="在显示 Mod 加载器时忽略 Quilt" Grid.Row="4" Height="22" Grid.ColumnSpan="2"
|
||||
<local:MyCheckBox Margin="0,2,0,4" Text="在显示 Mod 加载器时忽略 Quilt" Grid.Row="6" Height="22" Grid.ColumnSpan="2"
|
||||
x:Name="CheckDownloadIgnoreQuilt" Tag="ToolDownloadIgnoreQuilt" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
@@ -109,7 +111,7 @@
|
||||
<local:MyCheckBox Text="自动设置为中文" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="5" x:Name="CheckHelpChinese" Tag="ToolHelpChinese" />
|
||||
</Grid>
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="系统">
|
||||
<local:MyCard Margin="0,0,0,15" Title="启动器">
|
||||
<Grid Margin="25,40,25,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Name" />
|
||||
@@ -124,6 +126,7 @@
|
||||
<RowDefinition Height="5" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="启动器更新" Margin="0,0,25,0" />
|
||||
<local:MyComboBox x:Name="ComboSystemUpdate" Tag="SystemSystemUpdate" Grid.Column="1">
|
||||
@@ -145,7 +148,10 @@
|
||||
<local:ValidateFolderPath UseMinecraftCharCheck="False" />
|
||||
</local:MyTextBox.ValidateRules>
|
||||
</local:MyTextBox>
|
||||
<Grid Height="35" Grid.Row="6" Grid.ColumnSpan="5" Margin="0,12,0,0">
|
||||
<local:MyCheckBox Margin="0,5,0,4" Text="匿名数据收集" Grid.Row="6" Height="22" Grid.ColumnSpan="2"
|
||||
x:Name="CheckSystemTelemetry" Tag="SystemSystemTelemetry"
|
||||
ToolTip="当下载失败、PCL 出错、游戏崩溃等事件时,PCL 会匿名上报情况,以通知龙猫 “哦吼,出错了”,让龙猫能更好地修 Bug……
你可以关闭上报,不过龙猫就不知道你遇到了什么 Bug 了…… PCL 不会上传或收集任何个人信息,包括上报的东西里面也没有!" />
|
||||
<Grid Height="35" Grid.Row="7" Grid.ColumnSpan="5" Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
@@ -155,7 +161,7 @@
|
||||
<local:MyButton Grid.Column="1" x:Name="BtnSystemSettingExp" MinWidth="140" Text="导出设置" Padding="13,0" Margin="0,0,20,0" />
|
||||
<local:MyButton Grid.Column="2" x:Name="BtnSystemSettingImp" MinWidth="140" Text="导入设置" Padding="13,0" Margin="0,0,20,0" />
|
||||
</Grid>
|
||||
<Grid Height="35" Grid.Row="7" Grid.ColumnSpan="5" Margin="0,12,0,0" x:Name="PanDonate">
|
||||
<Grid Height="35" Grid.Row="8" Grid.ColumnSpan="5" Margin="0,12,0,0" x:Name="PanDonate">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
@@ -182,7 +188,7 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard> -->
|
||||
<local:MyCard x:Name="CardDebug" Margin="0,0,0,15" Title="调试选项" CanSwap="True" IsSwaped="True">
|
||||
<local:MyCard x:Name="CardDebug" Margin="0,0,0,15" Title="调试选项" CanSwap="True" IsSwapped="True">
|
||||
<StackPanel Margin="25,40,25,15">
|
||||
<Grid x:Name="PanDebugAnim" Height="22" Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -198,7 +204,7 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:MyCheckBox Grid.Column="0" Text="禁止在下载时复制已存在的文件" Height="22" x:Name="CheckDebugSkipCopy" Tag="SystemDebugSkipCopy" ToolTip="在下载时不直接复制已经存在的文件,而是重新下载每个文件。
只建议在测试下载速度时开启。" />
|
||||
<local:MyCheckBox Grid.Column="0" Text="禁止在下载时从其他文件夹复制文件" Height="22" x:Name="CheckDebugSkipCopy" Tag="SystemDebugSkipCopy" ToolTip="在下载时不直接复制其他 MC 文件夹中已经存在的相同文件,而是重新下载文件。
只建议在测试下载速度时开启。" />
|
||||
<local:MyCheckBox Grid.Column="1" Text="调试模式" Height="22" x:Name="CheckDebugMode" Tag="SystemDebugMode" ToolTip="显示调试信息与更多错误信息。
这会导致启动器性能略有下降,若无特殊需要不建议开启。" />
|
||||
<local:MyCheckBox Grid.Column="2" Text="添加延迟" Height="22" x:Name="CheckDebugDelay" Tag="SystemDebugDelay" ToolTip="在各个环节添加随机的延迟,拖慢加载速度,以测试部分功能是否正常运行。
这会严重影响启动器运行,若无特殊需要不建议开启。" />
|
||||
</Grid>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#End If
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoaded Then Exit Sub
|
||||
If IsLoaded Then Return
|
||||
IsLoaded = True
|
||||
|
||||
AniControlEnabled += 1
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
'Mod 与整合包
|
||||
ComboDownloadTranslateV2.SelectedIndex = Setup.Get("ToolDownloadTranslateV2")
|
||||
'ComboDownloadMod.SelectedIndex = Setup.Get("ToolDownloadMod")
|
||||
ComboDownloadMod.SelectedIndex = Setup.Get("ToolDownloadMod")
|
||||
ComboModLocalNameStyle.SelectedIndex = Setup.Get("ToolModLocalNameStyle")
|
||||
CheckDownloadIgnoreQuilt.Checked = Setup.Get("ToolDownloadIgnoreQuilt")
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
ComboSystemUpdate.SelectedIndex = Setup.Get("SystemSystemUpdate")
|
||||
ComboSystemActivity.SelectedIndex = Setup.Get("SystemSystemActivity")
|
||||
TextSystemCache.Text = Setup.Get("SystemSystemCache")
|
||||
CheckSystemTelemetry.Checked = Setup.Get("SystemSystemTelemetry")
|
||||
|
||||
'调试选项
|
||||
CheckDebugMode.Checked = Setup.Get("SystemDebugMode")
|
||||
@@ -81,6 +82,7 @@
|
||||
Setup.Reset("SystemSystemCache")
|
||||
Setup.Reset("SystemSystemUpdate")
|
||||
Setup.Reset("SystemSystemActivity")
|
||||
Setup.Reset("SystemSystemTelemetry")
|
||||
|
||||
Log("[Setup] 已初始化启动器页设置")
|
||||
Hint("已初始化启动器页设置!", HintType.Finish, False)
|
||||
@@ -92,13 +94,13 @@
|
||||
End Sub
|
||||
|
||||
'将控件改变路由到设置改变
|
||||
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckDebugMode.Change, CheckDebugDelay.Change, CheckDebugSkipCopy.Change, CheckUpdateRelease.Change, CheckUpdateSnapshot.Change, CheckHelpChinese.Change, CheckDownloadIgnoreQuilt.Change, CheckDownloadCert.Change
|
||||
Private Shared Sub CheckBoxChange(sender As MyCheckBox, e As Object) Handles CheckDebugMode.Change, CheckDebugDelay.Change, CheckDebugSkipCopy.Change, CheckUpdateRelease.Change, CheckUpdateSnapshot.Change, CheckHelpChinese.Change, CheckDownloadIgnoreQuilt.Change, CheckDownloadCert.Change, CheckSystemTelemetry.Change
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Checked)
|
||||
End Sub
|
||||
Private Shared Sub SliderChange(sender As MySlider, e As Object) Handles SliderDebugAnim.Change, SliderDownloadThread.Change, SliderDownloadSpeed.Change
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.Value)
|
||||
End Sub
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboDownloadVersion.SelectionChanged, ComboModLocalNameStyle.SelectionChanged, ComboDownloadTranslateV2.SelectionChanged, ComboSystemUpdate.SelectionChanged, ComboSystemActivity.SelectionChanged, ComboDownloadSource.SelectionChanged
|
||||
Private Shared Sub ComboChange(sender As MyComboBox, e As Object) Handles ComboDownloadVersion.SelectionChanged, ComboModLocalNameStyle.SelectionChanged, ComboDownloadTranslateV2.SelectionChanged, ComboSystemUpdate.SelectionChanged, ComboSystemActivity.SelectionChanged, ComboDownloadSource.SelectionChanged, ComboDownloadMod.SelectionChanged
|
||||
If AniControlEnabled = 0 Then Setup.Set(sender.Tag, sender.SelectedIndex)
|
||||
End Sub
|
||||
Private Shared Sub TextBoxChange(sender As MyTextBox, e As Object) Handles TextSystemCache.ValidatedTextChanged
|
||||
@@ -124,7 +126,7 @@
|
||||
SliderDebugAnim.GetHintText = Function(v) If(v > 29, "关闭", (v / 10 + 0.1) & "x")
|
||||
End Sub
|
||||
Private Sub SliderDownloadThread_PreviewChange(sender As Object, e As RouteEventArgs) Handles SliderDownloadThread.PreviewChange
|
||||
If SliderDownloadThread.Value < 100 Then Exit Sub
|
||||
If SliderDownloadThread.Value < 100 Then Return
|
||||
If Not Setup.Get("HintDownloadThread") Then
|
||||
Setup.Set("HintDownloadThread", True)
|
||||
MyMsgBox("如果设置过多的下载线程,可能会导致下载时出现非常严重的卡顿。" & vbCrLf &
|
||||
@@ -147,8 +149,8 @@
|
||||
|
||||
'自动更新
|
||||
Private Sub ComboSystemActivity_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboSystemActivity.SelectionChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If ComboSystemActivity.SelectedIndex <> 2 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
If ComboSystemActivity.SelectedIndex <> 2 Then Return
|
||||
If MyMsgBox("若选择此项,即使在将来出现严重问题时,你也无法获取相关通知。" & vbCrLf &
|
||||
"例如,如果发现某个版本游戏存在严重 Bug,你可能就会因为无法得到通知而导致无法预知的后果。" & vbCrLf & vbCrLf &
|
||||
"一般选择 仅在有重要通知时显示公告 就可以让你尽量不受打扰了。" & vbCrLf &
|
||||
@@ -157,8 +159,8 @@
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ComboSystemUpdate_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboSystemUpdate.SelectionChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If ComboSystemUpdate.SelectedIndex <> 3 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
If ComboSystemUpdate.SelectedIndex <> 3 Then Return
|
||||
If MyMsgBox("若选择此项,即使在启动器将来出现严重问题时,你也无法获取更新并获得修复。" & vbCrLf &
|
||||
"例如,如果官方修改了登录方式,从而导致现有启动器无法登录,你可能就会因为无法更新而无法开始游戏。" & vbCrLf & vbCrLf &
|
||||
"一般选择 仅在有重大漏洞更新时显示提示 就可以让你尽量不受打扰了。" & vbCrLf &
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="背景模糊" Margin="0,0,25,0" />
|
||||
<local:MySlider x:Name="SliderBackgroundBlur" Tag="UiBackgroundBlur" MaxValue="40" Grid.Column="1" ToolTip="较强的模糊会导致启动器严重掉帧,请谨慎使用。 不建议在制作整合包时开启模糊,以确保 PCL 在低性能电脑上可以流畅运行。" />
|
||||
</Grid>
|
||||
<local:MyCheckBox Text="使用彩色背景" Margin="-1,0,0,8" Height="22" x:Name="CheckBackgroundColorful" Tag="UiBackgroundColorful" />
|
||||
<local:MyCheckBox Text="叠加彩色背景" Margin="-1,0,0,8" Height="22" x:Name="CheckBackgroundColorful" Tag="UiBackgroundColorful" />
|
||||
<Grid Height="35" Margin="0,2,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
@@ -206,9 +206,9 @@
|
||||
<local:MyRadioBox Text="读取本地文件" x:Name="RadioCustomType1" Height="22" Tag="UiCustomType/1" Grid.Column="2" />
|
||||
<local:MyRadioBox Text="联网更新" x:Name="RadioCustomType2" Height="22" Tag="UiCustomType/2" Grid.Column="3" />
|
||||
</Grid>
|
||||
<local:MyHint Margin="0,15,0,-9" Text="在使用陌生人提供的主页前请务必谨慎,恶意的主页可能会造成损害!" IsWarn="True" x:Name="HintCustomWarn"
|
||||
<local:MyHint Margin="0,15,0,-4" Text="内容见 ModSetup" Theme="Blue" x:Name="HintCustom" />
|
||||
<local:MyHint Margin="0,15,0,6" Text="请谨慎使用陌生人提供的主页,恶意代码可能会造成损害!" Theme="Yellow" x:Name="HintCustomWarn"
|
||||
CanClose="True" RelativeSetup="HintCustomWarn" />
|
||||
<local:MyHint Margin="0,15,0,1" Text="内容见 ModSetup" IsWarn="False" x:Name="HintCustom" />
|
||||
<Grid Height="35" x:Name="PanCustomLocal" Visibility="Collapsed" Margin="0,10,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
@@ -251,6 +251,7 @@
|
||||
<local:MyComboBoxItem Content="PCL 新功能说明书(作者:WForst-Breeze)" />
|
||||
<local:MyComboBoxItem Content="OpenMCIM 仪表盘(作者:SALTWOOD)" Visibility="Collapsed" />
|
||||
<local:MyComboBoxItem Content="杂志主页(作者:CreeperIsASpy)" />
|
||||
<local:MyComboBoxItem Content="PCL GitHub 仪表盘(作者:Deep-Dark-Forest)" />
|
||||
</local:MyComboBox>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
@@ -282,7 +283,7 @@
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="1" Grid.Column="3" Text="设置" x:Name="CheckHiddenPageSetup" Tag="UiHiddenPageSetup" />
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="1" Grid.Column="4" Text="更多" x:Name="CheckHiddenPageOther" Tag="UiHiddenPageOther" />
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="设置 子页面" />
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" Text="游戏" x:Name="CheckHiddenSetupLaunch" Tag="UiHiddenSetupLaunch" />
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" Text="启动" x:Name="CheckHiddenSetupLaunch" Tag="UiHiddenSetupLaunch" />
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="2" Grid.Column="3" Text="个性化" x:Name="CheckHiddenSetupUI" Tag="UiHiddenSetupUi" />
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="2" Grid.Column="4" Text="其他" x:Name="CheckHiddenSetupSystem" Tag="UiHiddenSetupSystem" />
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="2" Grid.Column="5" Text="联机" x:Name="CheckHiddenSetupLink" Tag="UiHiddenSetupLink" Visibility="Collapsed" />
|
||||
@@ -293,7 +294,7 @@
|
||||
<local:MyCheckBox Height="22" VerticalAlignment="Center" Grid.Row="3" Grid.Column="5" Text="反馈" x:Name="CheckHiddenOtherFeedback" Tag="UiHiddenOtherFeedback" />
|
||||
<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="特定功能" />
|
||||
<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" 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="仅隐藏本选项卡,设置的禁用内容依然有效。
可以在保留个性化设置页面的情况下避免隐藏设置被修改。" />
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
AniControlEnabled -= 1
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoaded Then Exit Sub
|
||||
If IsLoaded Then Return
|
||||
IsLoaded = True
|
||||
|
||||
SliderLoad()
|
||||
@@ -89,7 +89,7 @@
|
||||
Catch
|
||||
Setup.Reset("UiCustomPreset")
|
||||
End Try
|
||||
CType(FindName("RadioCustomType" & Setup.Load("UiCustomType")), MyRadioBox).Checked = True
|
||||
CType(FindName("RadioCustomType" & Setup.Load("UiCustomType", ForceReload:=True)), MyRadioBox).Checked = True
|
||||
TextCustomNet.Text = Setup.Get("UiCustomNet")
|
||||
|
||||
'功能隐藏
|
||||
@@ -195,7 +195,7 @@
|
||||
BackgroundRefresh(True, True)
|
||||
End Sub
|
||||
Public Sub BackgroundRefreshUI(Show As Boolean, Count As Integer)
|
||||
If IsNothing(PanBackgroundOpacity) Then Exit Sub
|
||||
If IsNothing(PanBackgroundOpacity) Then Return
|
||||
If Show Then
|
||||
PanBackgroundOpacity.Visibility = Visibility.Visible
|
||||
PanBackgroundBlur.Visibility = Visibility.Visible
|
||||
@@ -274,13 +274,14 @@
|
||||
|
||||
'顶部栏
|
||||
Private Sub BtnLogoChange_Click(sender As Object, e As EventArgs) Handles BtnLogoChange.Click
|
||||
Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpg;*.gif;*.webp)|*.png;*.jpg;*.gif;*.webp", "选择图片")
|
||||
If FileName = "" Then Exit Sub
|
||||
Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpg;*.jpeg;*.gif;*.webp)|*.png;*.jpg;*.jpeg;*.gif;*.webp", "选择图片")
|
||||
If FileName = "" Then Return
|
||||
Try
|
||||
'拷贝文件
|
||||
File.Delete(Path & "PCL\Logo.png")
|
||||
CopyFile(FileName, Path & "PCL\Logo.png")
|
||||
'设置当前显示
|
||||
FrmMain.ImageTitleLogo.Source = Nothing '防止因为 Source 属性前后的值相同而不更新 (#5628)
|
||||
FrmMain.ImageTitleLogo.Source = Path & "PCL\Logo.png"
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("参数无效") Then
|
||||
@@ -293,11 +294,12 @@
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RadioLogoType3_Check(sender As Object, e As RouteEventArgs) Handles RadioLogoType3.PreviewCheck
|
||||
If Not (AniControlEnabled = 0 AndAlso e.RaiseByMouse) Then Exit Sub
|
||||
If Not (AniControlEnabled = 0 AndAlso e.RaiseByMouse) Then Return
|
||||
Refresh:
|
||||
'已有图片则不再选择
|
||||
If File.Exists(Path & "PCL\Logo.png") Then
|
||||
Try
|
||||
FrmMain.ImageTitleLogo.Source = Nothing '防止因为 Source 属性前后的值相同而不更新 (#5628)
|
||||
FrmMain.ImageTitleLogo.Source = Path & "PCL\Logo.png"
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("参数无效") Then
|
||||
@@ -314,10 +316,10 @@ Refresh:
|
||||
Log(exx, "清理错误的标题栏图片失败", LogLevel.Msgbox)
|
||||
End Try
|
||||
End Try
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'没有图片则要求选择
|
||||
Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpg;*.gif;*.webp)|*.png;*.jpg;*.gif;*.webp", "选择图片")
|
||||
Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpeg;*.jpg;*.gif;*.webp)|*.png;*.jpeg;*.jpg;*.gif;*.webp", "选择图片")
|
||||
If FileName = "" Then
|
||||
FrmMain.ImageTitleLogo.Source = Nothing
|
||||
e.Handled = True
|
||||
@@ -350,12 +352,14 @@ Refresh:
|
||||
MusicRefreshPlay(True)
|
||||
End Sub
|
||||
Public Sub MusicRefreshUI()
|
||||
If PanBackgroundOpacity Is Nothing Then Exit Sub
|
||||
If PanBackgroundOpacity Is Nothing Then Return
|
||||
If MusicAllList.Any Then
|
||||
PanMusicVolume.Visibility = Visibility.Visible
|
||||
PanMusicDetail.Visibility = Visibility.Visible
|
||||
BtnMusicClear.Visibility = Visibility.Visible
|
||||
CardMusic.Title = "背景音乐(" & EnumerateFiles(Path & "PCL\Musics\").Count & " 首)"
|
||||
CardMusic.Title = "背景音乐(" &
|
||||
EnumerateFiles(Path & "PCL\Musics\").Count(Function(f) {".ini", ".jpg", ".txt", ".cfg", ".lrc", ".db", ".png"}.Contains(f.Extension.ToLower)) &
|
||||
" 首)"
|
||||
Else
|
||||
PanMusicVolume.Visibility = Visibility.Collapsed
|
||||
PanMusicDetail.Visibility = Visibility.Collapsed
|
||||
@@ -391,11 +395,11 @@ Refresh:
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CheckMusicStart_Change() Handles CheckMusicStart.Change
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
If CheckMusicStart.Checked Then CheckMusicStop.Checked = False
|
||||
End Sub
|
||||
Private Sub CheckMusicStop_Change() Handles CheckMusicStop.Change
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
If CheckMusicStop.Checked Then CheckMusicStart.Checked = False
|
||||
End Sub
|
||||
|
||||
@@ -403,7 +407,7 @@ Refresh:
|
||||
Private Sub BtnCustomFile_Click(sender As Object, e As EventArgs) Handles BtnCustomFile.Click
|
||||
Try
|
||||
If File.Exists(Path & "PCL\Custom.xaml") Then
|
||||
If MyMsgBox("当前已存在布局文件,继续生成教学文件将会覆盖现有布局文件!", "覆盖确认", "继续", "取消", IsWarn:=True) = 2 Then Exit Sub
|
||||
If MyMsgBox("当前已存在布局文件,继续生成教学文件将会覆盖现有布局文件!", "覆盖确认", "继续", "取消", IsWarn:=True) = 2 Then Return
|
||||
End If
|
||||
WriteFile(Path & "PCL\Custom.xaml", GetResources("Custom"))
|
||||
Hint("教学文件已生成!", HintType.Finish)
|
||||
@@ -462,7 +466,7 @@ Refresh:
|
||||
'主题自定义
|
||||
Private Sub RadioLauncherTheme14_Change(sender As Object, e As RouteEventArgs) Handles RadioLauncherTheme14.Changed
|
||||
If RadioLauncherTheme14.Checked Then
|
||||
If LabLauncherHue.Visibility = Visibility.Visible Then Exit Sub
|
||||
If LabLauncherHue.Visibility = Visibility.Visible Then Return
|
||||
LabLauncherHue.Visibility = Visibility.Visible
|
||||
SliderLauncherHue.Visibility = Visibility.Visible
|
||||
LabLauncherSat.Visibility = Visibility.Visible
|
||||
@@ -472,7 +476,7 @@ Refresh:
|
||||
LabLauncherLight.Visibility = Visibility.Visible
|
||||
SliderLauncherLight.Visibility = Visibility.Visible
|
||||
Else
|
||||
If LabLauncherHue.Visibility = Visibility.Collapsed Then Exit Sub
|
||||
If LabLauncherHue.Visibility = Visibility.Collapsed Then Return
|
||||
LabLauncherHue.Visibility = Visibility.Collapsed
|
||||
SliderLauncherHue.Visibility = Visibility.Collapsed
|
||||
LabLauncherSat.Visibility = Visibility.Collapsed
|
||||
@@ -485,7 +489,7 @@ Refresh:
|
||||
CardLauncher.TriggerForceResize()
|
||||
End Sub
|
||||
Private Sub HSL_Change() Handles SliderLauncherHue.Change, SliderLauncherLight.Change, SliderLauncherSat.Change, SliderLauncherDelta.Change
|
||||
If AniControlEnabled <> 0 OrElse SliderLauncherSat Is Nothing OrElse Not SliderLauncherSat.IsLoaded Then Exit Sub
|
||||
If AniControlEnabled <> 0 OrElse SliderLauncherSat Is Nothing OrElse Not SliderLauncherSat.IsLoaded Then Return
|
||||
ThemeRefresh()
|
||||
End Sub
|
||||
|
||||
@@ -509,7 +513,7 @@ Refresh:
|
||||
''' 更新功能隐藏带来的显示变化。
|
||||
''' </summary>
|
||||
Public Shared Sub HiddenRefresh() Handles Me.Loaded
|
||||
If FrmMain.PanTitleSelect Is Nothing OrElse Not FrmMain.PanTitleSelect.IsLoaded Then Exit Sub
|
||||
If FrmMain.PanTitleSelect Is Nothing OrElse Not FrmMain.PanTitleSelect.IsLoaded Then Return
|
||||
Try
|
||||
'顶部栏
|
||||
If Not HiddenForceShow AndAlso Setup.Get("UiHiddenPageDownload") AndAlso Setup.Get("UiHiddenPageLink") AndAlso Setup.Get("UiHiddenPageSetup") AndAlso Setup.Get("UiHiddenPageOther") Then
|
||||
@@ -640,7 +644,7 @@ Refresh:
|
||||
CheckHiddenPageOther.Checked = False
|
||||
End If
|
||||
'修改无具体内容的项
|
||||
If Not user Then Exit Sub
|
||||
If Not user Then Return
|
||||
If Setup.Get("UiHiddenOtherHelp") AndAlso Setup.Get("UiHiddenOtherAbout") AndAlso Setup.Get("UiHiddenOtherTest") Then
|
||||
CheckHiddenOtherFeedback.Checked = True
|
||||
CheckHiddenOtherVote.Checked = True
|
||||
@@ -648,7 +652,7 @@ Refresh:
|
||||
End Sub
|
||||
Private Sub HiddenOtherNet(sender As Object, user As Boolean) Handles CheckHiddenOtherFeedback.Change, CheckHiddenOtherVote.Change
|
||||
'更多子页面(无具体内容的)
|
||||
If Not user Then Exit Sub
|
||||
If Not user Then Return
|
||||
If Setup.Get("UiHiddenOtherHelp") AndAlso Setup.Get("UiHiddenOtherAbout") AndAlso Setup.Get("UiHiddenOtherTest") AndAlso
|
||||
(Not Setup.Get("UiHiddenOtherFeedback") OrElse Not Setup.Get("UiHiddenOtherVote")) Then
|
||||
CheckHiddenOtherAbout.Checked = False
|
||||
|
||||
@@ -13,7 +13,7 @@ Public Class PageSpeedLeft
|
||||
'如果在页面切换动画的 “上一页消失” 部分已经完成了下载,就直接尝试返回
|
||||
TryReturnToHome()
|
||||
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
|
||||
'监控定时器
|
||||
@@ -34,7 +34,7 @@ Public Class PageSpeedLeft
|
||||
'定时器任务
|
||||
Private ReadOnly RightCards As New Dictionary(Of String, MyCard)
|
||||
Private Sub Watcher()
|
||||
If Not FrmMain.PageCurrent = FormMain.PageType.DownloadManager Then Exit Sub
|
||||
If Not FrmMain.PageCurrent = FormMain.PageType.DownloadManager Then Return
|
||||
Try
|
||||
|
||||
#Region "更新左边栏"
|
||||
@@ -46,7 +46,8 @@ Public Class PageSpeedLeft
|
||||
LabThread.Text = "0 / " & NetTaskThreadLimit
|
||||
Else
|
||||
'有任务,输出基本信息
|
||||
Dim RawPercent As Double = LoaderTaskbarProgress
|
||||
Dim Tasks = LoaderTaskbar.Where(Function(l) l.Show).ToList() '筛选掉启动 MC 的任务(#6270)
|
||||
Dim RawPercent As Double = If(Tasks.Any, MathClamp(Tasks.Select(Function(l) l.Progress).Average(), 0, 1), 1)
|
||||
Dim PredictText As String = Math.Floor(RawPercent * 100) & "." & StrFill(Math.Floor((RawPercent * 100 - Math.Floor(RawPercent * 100)) * 100), "0", 2) & " %"
|
||||
LabProgress.Text = If(RawPercent > 0.999999, "100 %", PredictText)
|
||||
LabSpeed.Text = GetString(NetManager.Speed) & "/s"
|
||||
@@ -58,7 +59,7 @@ Public Class PageSpeedLeft
|
||||
Catch ex As Exception
|
||||
Log(ex, "下载管理左栏监视出错", LogLevel.Feedback)
|
||||
End Try
|
||||
If FrmSpeedRight Is Nothing OrElse FrmSpeedRight.PanMain Is Nothing Then Exit Sub
|
||||
If FrmSpeedRight Is Nothing OrElse FrmSpeedRight.PanMain Is Nothing Then Return
|
||||
Try
|
||||
For Each Loader In LoaderTaskbar.ToList
|
||||
TaskRefresh(Loader)
|
||||
@@ -68,7 +69,7 @@ Public Class PageSpeedLeft
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub TaskRefresh(Loader As LoaderBase)
|
||||
If Loader Is Nothing OrElse Not Loader.Show Then Exit Sub
|
||||
If Loader Is Nothing OrElse Not Loader.Show Then Return
|
||||
Try
|
||||
'获取实际加载器列表
|
||||
Dim LoaderList As List(Of LoaderBase) = CType(Loader, Object).GetLoaderList()
|
||||
@@ -76,11 +77,11 @@ Public Class PageSpeedLeft
|
||||
'已有此卡片
|
||||
Dim Card As Grid = RightCards(Loader.Name)
|
||||
Dim NewValue As Double = Loader.Progress + Loader.State
|
||||
If Val(Card.Tag) = NewValue Then Exit Sub
|
||||
If Val(Card.Tag) = NewValue Then Return
|
||||
Card.Tag = NewValue
|
||||
If Card.Children.Count <= 3 Then
|
||||
Log("[Watcher] 元素不足的卡片:" & Loader.Name, LogLevel.Debug)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Card = Card.Children(3)
|
||||
Try
|
||||
|
||||
@@ -32,7 +32,7 @@ Public Class MyLocalModItem
|
||||
LabTitle.TextDecorations = TextDecorations.Strikethrough
|
||||
value &= " [错误]"
|
||||
End Select
|
||||
If LabTitle.Text = value Then Exit Property
|
||||
If LabTitle.Text = value Then Return
|
||||
LabTitle.Text = value
|
||||
_Title = RawValue
|
||||
End Set
|
||||
@@ -44,7 +44,7 @@ Public Class MyLocalModItem
|
||||
Return If(LabSubtitle?.Text, "")
|
||||
End Get
|
||||
Set(value As String)
|
||||
If LabSubtitle.Text = value Then Exit Property
|
||||
If LabSubtitle.Text = value Then Return
|
||||
LabSubtitle.Text = value
|
||||
LabSubtitle.Visibility = If(value = "", Visibility.Collapsed, Visibility.Visible)
|
||||
End Set
|
||||
@@ -56,7 +56,7 @@ Public Class MyLocalModItem
|
||||
Return LabInfo.Text
|
||||
End Get
|
||||
Set(value As String)
|
||||
If LabInfo.Text = value Then Exit Property
|
||||
If LabInfo.Text = value Then Return
|
||||
LabInfo.Text = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -97,7 +97,7 @@ Public Class MyLocalModItem
|
||||
Private Sub Button_MouseUp(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseLeftButtonUp
|
||||
If IsMouseDown Then
|
||||
RaiseEvent Click(sender, e)
|
||||
If e.Handled Then Exit Sub
|
||||
If e.Handled Then Return
|
||||
Log("[Control] 按下本地 Mod 列表项:" & LabTitle.Text)
|
||||
End If
|
||||
End Sub
|
||||
@@ -105,7 +105,7 @@ Public Class MyLocalModItem
|
||||
'鼠标点击判定
|
||||
Private IsMouseDown As Boolean = False
|
||||
Private Sub Button_MouseDown(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseLeftButtonDown
|
||||
If Not IsMouseDirectlyOver Then Exit Sub
|
||||
If Not IsMouseDirectlyOver Then Return
|
||||
IsMouseDown = True
|
||||
If ButtonStack IsNot Nothing Then ButtonStack.IsHitTestVisible = False
|
||||
End Sub
|
||||
@@ -116,25 +116,33 @@ Public Class MyLocalModItem
|
||||
|
||||
'滑动选中
|
||||
Private Shared SwipeStart As Integer, SwipeEnd As Integer
|
||||
Private Shared Swiping As Boolean = False
|
||||
Private Shared _Swiping As Boolean = False
|
||||
Private Shared Property Swiping As Boolean
|
||||
Get
|
||||
Return _Swiping
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
_Swiping = value
|
||||
FrmVersionMod.CardSelect.IsHitTestVisible = Not value
|
||||
End Set
|
||||
End Property
|
||||
Private Shared SwipToState As Boolean '被滑动到的目标应将 Checked 改为此值
|
||||
Private Sub Button_MouseSwipeStart(sender As Object, e As Object) Handles Me.MouseLeftButtonDown
|
||||
If Parent Is Nothing Then Exit Sub 'Mod 可能已被删除(#3824)
|
||||
If Parent Is Nothing Then Return 'Mod 可能已被删除(#3824)
|
||||
'开始滑动
|
||||
Dim Index = CType(Parent, StackPanel).Children.IndexOf(Me)
|
||||
SwipeStart = Index
|
||||
SwipeEnd = Index
|
||||
Swiping = True
|
||||
SwipToState = Not Checked
|
||||
FrmVersionMod.CardSelect.IsHitTestVisible = False '暂时禁用下边栏
|
||||
End Sub
|
||||
Private Sub Button_MouseSwipe(sender As Object, e As Object) Handles Me.MouseEnter, Me.MouseLeave, Me.MouseLeftButtonUp
|
||||
If Parent Is Nothing Then Exit Sub 'Mod 可能已被删除(#3824)
|
||||
If Parent Is Nothing Then Return 'Mod 可能已被删除(#3824)
|
||||
'结束滑动
|
||||
If Mouse.LeftButton <> MouseButtonState.Pressed OrElse Not Swiping Then
|
||||
If Mouse.LeftButton <> MouseButtonState.Pressed OrElse
|
||||
TypeOf Mouse.DirectlyOver IsNot MyLocalModItem Then '#5771
|
||||
Swiping = False
|
||||
FrmVersionMod.CardSelect.IsHitTestVisible = True
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'计算滑动范围
|
||||
Dim Elements = CType(Parent, StackPanel).Children
|
||||
@@ -142,7 +150,7 @@ Public Class MyLocalModItem
|
||||
SwipeStart = MathClamp(Math.Min(SwipeStart, Index), 0, Elements.Count - 1)
|
||||
SwipeEnd = MathClamp(Math.Max(SwipeEnd, Index), 0, Elements.Count - 1)
|
||||
'勾选所有范围中的项
|
||||
If SwipeStart = SwipeEnd Then Exit Sub
|
||||
If SwipeStart = SwipeEnd Then Return
|
||||
For i = SwipeStart To SwipeEnd
|
||||
Dim Item As MyLocalModItem = Elements(i)
|
||||
Item.InitLate(Item, e)
|
||||
@@ -162,20 +170,20 @@ Public Class MyLocalModItem
|
||||
Try
|
||||
'触发属性值修改
|
||||
Dim RawValue = _Checked
|
||||
If value = _Checked Then Exit Property
|
||||
If value = _Checked Then Return
|
||||
_Checked = value
|
||||
Dim ChangedEventArgs As New RouteEventArgs(False)
|
||||
If IsInitialized Then
|
||||
RaiseEvent Changed(Me, ChangedEventArgs)
|
||||
If ChangedEventArgs.Handled Then
|
||||
_Checked = RawValue
|
||||
Exit Property
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
If value Then
|
||||
Dim CheckEventArgs As New RouteEventArgs(False)
|
||||
RaiseEvent Check(Me, CheckEventArgs)
|
||||
If CheckEventArgs.Handled Then Exit Property
|
||||
If CheckEventArgs.Handled Then Return
|
||||
End If
|
||||
'更改动画
|
||||
If IsVisibleInForm() Then
|
||||
@@ -270,7 +278,7 @@ Public Class MyLocalModItem
|
||||
Children.Remove(ButtonStack)
|
||||
ButtonStack = Nothing
|
||||
End If
|
||||
If Not value.Any() Then Exit Property
|
||||
If Not value.Any() Then Return
|
||||
'添加新 Stack
|
||||
ButtonStack = New StackPanel With {.Opacity = 0, .Margin = New Thickness(0, 0, 5, 0), .SnapsToDevicePixels = False, .Orientation = Orientation.Horizontal,
|
||||
.HorizontalAlignment = HorizontalAlignment.Right, .VerticalAlignment = VerticalAlignment.Center, .UseLayoutRounding = False}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</Grid.Resources>
|
||||
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
|
||||
<StackPanel Margin="25,10,25,65">
|
||||
<local:MyHint Margin="0,15,0,0" Text="受 Modrinth 整合包规范限制,导出的整合包中暂不包含 OptiFine。" IsWarn="False" x:Name="HintOptiFine" />
|
||||
<local:MyHint Margin="0,15,0,0" Text="受 Modrinth 整合包规范限制,导出的整合包中不会包含 OptiFine。" Theme="Yellow" x:Name="HintOptiFine" />
|
||||
<local:MyCard Margin="0,15">
|
||||
<Grid Margin="22,15,25,15">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -235,16 +235,16 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard Title="高级选项" Margin="0,0,0,15" CanSwap="True" IsSwaped="True">
|
||||
<local:MyCard Title="高级选项" Margin="0,0,0,15" CanSwap="True" IsSwapped="True">
|
||||
<StackPanel Margin="25,37,23,20">
|
||||
<local:MyHint Text="建议仅在无法稳定连接 CurseForge 或 Modrinth 时才打包资源文件。
二次分发可能违反使用协议,请尽量不要公开发布包含资源文件的整合包!"
|
||||
IsWarn="False" Margin="0,0,0,4" Visibility="{Binding Checked, ElementName=CheckAdvancedInclude, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
<local:MyHint Text="建议仅在无法稳定连接 CurseForge 或 Modrinth 时才打包资源文件。
请不要公开发布含资源文件的整合包,这会违反部分 Mod 的使用协议!"
|
||||
Theme="Yellow" Margin="0,2,0,8" Visibility="{Binding Checked, ElementName=CheckAdvancedInclude, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
<local:MyCheckBox Text="打包资源文件,以避免在导入时下载" x:Name="CheckAdvancedInclude"
|
||||
ToolTip="将 Mod、资源包、光影包的文件直接放入整合包中,这样在导入时就无需联网下载它们。
建议仅在无法稳定连接 CurseForge 或 Modrinth 时才考虑勾选。" />
|
||||
<local:MyCheckBox Text="Modrinth 上传模式" x:Name="CheckAdvancedModrinth"
|
||||
ToolTip="如果你想要打包上传到 Modrinth,勾选此项会生成完全符合 Modrinth 要求的整合包文件。
由于 Modrinth 要求,只能从 CurseForge 下载的资源将无法联网下载,会被直接放入整合包中。
此外,勾选后也不能在整合包中包含 PCL 启动器文件。" />
|
||||
<local:MyHint IsWarn="False" RelativeSetup="HintExportConfig" CanClose="True" Margin="0,20,0,0"
|
||||
Text="配置文件中含有未在此处列出的选项,例如精准控制导出的文件、设置整合包存放位置等。
请先选择 “保存配置”,然后编辑保存的配置文件。" />
|
||||
<local:MyHint Theme="Blue" RelativeSetup="HintExportConfig" CanClose="True" Margin="0,20,0,2"
|
||||
Text="配置文件中含有更多高级选项,例如精准控制导出的文件、设置整合包存放位置等。
要修改这些选项,请先点击 “保存配置”,在编辑配置文件后再导入。" />
|
||||
<Grid Height="35" Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||
|
||||
@@ -256,6 +256,8 @@ Public Class PageVersionExport
|
||||
Yield "!*.log"
|
||||
Yield "!*.dat_old"
|
||||
Yield "!*.BakaCoreInfo"
|
||||
Yield "!hmclversion.cfg"
|
||||
Yield "!log4j2.xml"
|
||||
Yield ""
|
||||
End If
|
||||
End Function
|
||||
@@ -407,7 +409,6 @@ Public Class PageVersionExport
|
||||
Next
|
||||
|
||||
'确认导出位置
|
||||
Dim Extension As String = If(CheckOptionsPcl.Checked, ".zip", ".mrpack")
|
||||
Dim PackPath As String = Nothing
|
||||
If Not String.IsNullOrWhiteSpace(ConfigPackPath) AndAlso
|
||||
(Not ConfigPackPath.EndsWithF("\") AndAlso Not ConfigPackPath.EndsWithF("/")) Then
|
||||
@@ -421,9 +422,11 @@ Public Class PageVersionExport
|
||||
End Try
|
||||
End If
|
||||
If PackPath Is Nothing Then
|
||||
Dim Extensions As New List(Of String)
|
||||
If Not CheckAdvancedModrinth.Checked Then Extensions.Add("压缩文件(*.zip)|*.zip")
|
||||
If Not CheckOptionsPcl.Checked Then Extensions.Add("Modrinth 整合包文件(*.mrpack)|*.mrpack")
|
||||
PackPath = SelectSaveFile("选择导出位置",
|
||||
PackName & If(String.IsNullOrEmpty(TextExportVersion.Text), "", " " & TextExportVersion.Text),
|
||||
$"整合包文件(*{Extension})|*{Extension}")
|
||||
PackName & If(String.IsNullOrEmpty(TextExportVersion.Text), "", " " & TextExportVersion.Text), Extensions.Join("|"))
|
||||
Log($"[Export] 手动指定的导出路径:{PackPath}")
|
||||
End If
|
||||
If String.IsNullOrEmpty(PackPath) Then Return
|
||||
@@ -561,8 +564,8 @@ Public Class PageVersionExport
|
||||
Sub()
|
||||
Try
|
||||
Dim ModrinthHashes = Loader.Input.Select(Function(m) m.ModrinthHash)
|
||||
Dim ModrinthRaw = CType(GetJson(DlModRequest("https://api.modrinth.com/v2/version_files", "POST",
|
||||
$"{{""hashes"": [""{ModrinthHashes.Join(""",""")}""], ""algorithm"": ""sha1""}}", "application/json")), JObject)
|
||||
Dim ModrinthRaw As JObject = DlModRequest("https://api.modrinth.com/v2/version_files", HttpMethod.Post,
|
||||
$"{{""hashes"": [""{ModrinthHashes.Join(""",""")}""], ""algorithm"": ""sha1""}}", "application/json")
|
||||
For Each ModFile In Loader.Input
|
||||
'查找对应的文件
|
||||
If Not ModrinthRaw.ContainsKey(ModFile.ModrinthHash) Then Continue For
|
||||
@@ -586,8 +589,8 @@ Public Class PageVersionExport
|
||||
Try
|
||||
If ModrinthUploadMode Then Return 'Modrinth 上传模式下,不能从 CurseForge 获取信息
|
||||
Dim CurseForgeHashes = Loader.Input.Select(Function(m) m.CurseForgeHash)
|
||||
Dim CurseForgeRaw = CType(CType(GetJson(DlModRequest("https://api.curseforge.com/v1/fingerprints/432/", "POST",
|
||||
$"{{""fingerprints"": [{CurseForgeHashes.Join(",")}]}}", "application/json")), JObject)("data")("exactMatches"), JContainer)
|
||||
Dim CurseForgeRaw As JContainer = DlModRequest("https://api.curseforge.com/v1/fingerprints/432/", HttpMethod.Post,
|
||||
$"{{""fingerprints"": [{CurseForgeHashes.Join(",")}]}}", "application/json")("data")("exactMatches")
|
||||
For Each ResultJson As JObject In CurseForgeRaw
|
||||
If Not ResultJson.ContainsKey("file") Then Continue For
|
||||
Dim File As JObject = ResultJson("file")
|
||||
@@ -612,7 +615,7 @@ Public Class PageVersionExport
|
||||
|
||||
'等待线程结束
|
||||
Do Until EndedThreadCount = 2
|
||||
If Loader.IsAborted Then Exit Sub
|
||||
If Loader.IsAborted Then Return
|
||||
Thread.Sleep(10)
|
||||
Loop
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
''' 切换现有页面。
|
||||
''' </summary>
|
||||
Public Sub PageChange(ID As FormMain.PageSubType)
|
||||
If PageID = ID Then Exit Sub
|
||||
If PageID = ID Then Return
|
||||
AniControlEnabled += 1
|
||||
Try
|
||||
PageChangeRun(PageGet(ID))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<local:MyLoading Text="正在加载 Mod 列表" Margin="20,20,20,17" x:Name="Load" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</local:MyCard>
|
||||
<local:MyCard x:Name="CardSelect" Visibility="Collapsed" Opacity="0"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="25,25,25,0" UseAnimation="False" HasMouseAnimation="False">
|
||||
HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="25,25,25,0" UseAnimation="False">
|
||||
<local:MyCard.RenderTransform>
|
||||
<TranslateTransform x:Name="TransSelect" Y="-10" />
|
||||
</local:MyCard.RenderTransform>
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
AniControlEnabled -= 1
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
|
||||
AddHandler FrmMain.KeyDown, AddressOf FrmMain_KeyDown
|
||||
'调整按钮边距(这玩意儿没法从 XAML 改)
|
||||
For Each Btn As MyRadioButton In PanFilter.Children
|
||||
Btn.LabText.Margin = New Thickness(-2, 0, 8, 0)
|
||||
@@ -89,7 +90,7 @@
|
||||
Else
|
||||
PanEmpty.Visibility = Visibility.Visible
|
||||
PanBack.Visibility = Visibility.Collapsed
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'修改缓存
|
||||
ModItems.Clear()
|
||||
@@ -154,7 +155,7 @@
|
||||
''' 刷新整个 UI。
|
||||
''' </summary>
|
||||
Public Sub RefreshUI()
|
||||
If PanList Is Nothing Then Exit Sub
|
||||
If PanList Is Nothing Then Return
|
||||
Dim ShowingMods = If(IsSearching, SearchResult, If(McModLoader.Output, New List(Of McMod))).Where(Function(m) CanPassFilter(m)).ToList
|
||||
'重新列出列表
|
||||
AniControlEnabled += 1
|
||||
@@ -380,7 +381,9 @@ Install:
|
||||
''' 下载 Mod。
|
||||
''' </summary>
|
||||
Private Sub BtnManageDownload_Click(sender As Object, e As MouseButtonEventArgs) Handles BtnManageDownload.Click, BtnHintDownload.Click
|
||||
PageComp.TargetVersion = PageVersionLeft.Version '将当前版本设置为筛选器
|
||||
'预设置当前版本和搜索框内容
|
||||
PageComp.TargetVersion = PageVersionLeft.Version
|
||||
PageComp.TargetName = SearchBox.Text
|
||||
FrmMain.PageChange(FormMain.PageType.Download, FormMain.PageSubType.DownloadMod)
|
||||
End Sub
|
||||
|
||||
@@ -423,9 +426,15 @@ Install:
|
||||
ChangeAllSelected(False)
|
||||
AniControlEnabled += CacheAniControlEnabled
|
||||
End Sub
|
||||
Private Sub PageVersionMod_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||
Private Sub FrmMain_KeyDown(sender As Object, e As KeyEventArgs) '监听自己的事件的话进入页面后不点击右侧控件就没办法监听到事件 (#4311)
|
||||
If FrmMain.PageRight IsNot Me Then Return
|
||||
If My.Computer.Keyboard.CtrlKeyDown AndAlso e.Key = Key.A Then ChangeAllSelected(True)
|
||||
End Sub
|
||||
Private Sub SearchBox_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles SearchBox.PreviewKeyDown
|
||||
'Ctrl + A 会被搜索框捕获,导致无法全选,所以在按下 Ctrl + A 时转移焦点以便捕获
|
||||
If SearchBox.Text.Any Then Return
|
||||
If My.Computer.Keyboard.CtrlKeyDown AndAlso e.Key = Key.A Then PanBack.Focus()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -584,7 +593,7 @@ Install:
|
||||
If MyMsgBox($"新版本 Mod 可能不兼容旧存档或者其他 Mod,这可能导致游戏崩溃,甚至永久损坏存档!{vbCrLf}如果你在游玩整合包,请千万不要自行更新 Mod!{vbCrLf}{vbCrLf}在更新前,请先备份存档,并检查 Mod 的更新日志。{vbCrLf}如果更新后出现问题,你也可以在回收站找回更新前的 Mod。", "Mod 更新警告", "我已了解风险,继续更新", "取消", IsWarn:=True) = 1 Then
|
||||
Setup.Set("HintUpdateMod", True)
|
||||
Else
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
Try
|
||||
@@ -634,14 +643,14 @@ Install:
|
||||
Try
|
||||
For Each Entry As McMod In ModList
|
||||
If File.Exists(Entry.Path) Then
|
||||
My.Computer.FileSystem.DeleteFile(Entry.Path, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
My.Computer.FileSystem.DeleteFile(Entry.Path, FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
Else
|
||||
Log($"[Mod] 未找到更新前的 Mod 文件,跳过对它的删除:{Entry.Path}", LogLevel.Debug)
|
||||
End If
|
||||
Next
|
||||
For Each Entry As KeyValuePair(Of String, String) In FileCopyList
|
||||
If File.Exists(Entry.Value) Then
|
||||
My.Computer.FileSystem.DeleteFile(Entry.Value, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
My.Computer.FileSystem.DeleteFile(Entry.Value, FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
Log($"[Mod] 更新后的 Mod 文件已存在,将会把它放入回收站:{Entry.Value}", LogLevel.Debug)
|
||||
End If
|
||||
If Directory.Exists(GetPathFromFullPath(Entry.Value)) Then
|
||||
@@ -676,7 +685,7 @@ Install:
|
||||
Case LoadState.Aborted
|
||||
Hint("Mod 更新已中止!", HintType.Info)
|
||||
Case Else
|
||||
Exit Sub
|
||||
Return
|
||||
End Select
|
||||
Log($"[Mod] 已从正在进行 Mod 更新的文件夹列表移除:{PathMods}")
|
||||
UpdatingVersions.Remove(PathMods)
|
||||
@@ -730,7 +739,7 @@ Install:
|
||||
If IsShiftPressed Then
|
||||
File.Delete(ModEntity.Path)
|
||||
Else
|
||||
My.Computer.FileSystem.DeleteFile(ModEntity.Path, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
My.Computer.FileSystem.DeleteFile(ModEntity.Path, FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
End If
|
||||
Catch ex As OperationCanceledException
|
||||
Log(ex, "删除 Mod 被主动取消")
|
||||
@@ -759,7 +768,7 @@ Install:
|
||||
RefreshBars()
|
||||
End If
|
||||
'显示结果提示
|
||||
If Not IsSuccessful Then Exit Sub
|
||||
If Not IsSuccessful Then Return
|
||||
If IsShiftPressed Then
|
||||
If ModList.Count = 1 Then
|
||||
Hint($"已彻底删除 {ModList.Single.FileName}!", HintType.Finish)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Reload()
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoad Then Exit Sub
|
||||
If IsLoad Then Return
|
||||
IsLoad = True
|
||||
PanDisplay.TriggerForceResize()
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
'版本分类
|
||||
Private Sub ComboDisplayType_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboDisplayType.SelectionChanged
|
||||
If Not (IsLoad AndAlso AniControlEnabled = 0) Then Exit Sub
|
||||
If Not (IsLoad AndAlso AniControlEnabled = 0) Then Return
|
||||
If ComboDisplayType.SelectedIndex <> 1 Then
|
||||
'改为不隐藏
|
||||
Try
|
||||
@@ -75,7 +75,7 @@
|
||||
If Not Setup.Get("HintHide") Then
|
||||
If MyMsgBox("确认要从版本列表中隐藏该版本吗?隐藏该版本后,它将不再出现于 PCL 显示的版本列表中。" & vbCrLf & "此后,在版本列表页面按下 F11 才可以查看被隐藏的版本。", "隐藏版本提示",, "取消") <> 1 Then
|
||||
ComboDisplayType.SelectedIndex = 0
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
Setup.Set("HintHide", True)
|
||||
End If
|
||||
@@ -110,46 +110,48 @@
|
||||
Dim OldPath As String = PageVersionLeft.Version.Path
|
||||
'修改此部分的同时修改快速安装的版本名检测*
|
||||
Dim NewName As String = MyMsgBoxInput("重命名版本", "", OldName, New ObjectModel.Collection(Of Validate) From {New ValidateFolderName(PathMcFolder & "versions", IgnoreCase:=False)})
|
||||
If String.IsNullOrWhiteSpace(NewName) Then Exit Sub
|
||||
If String.IsNullOrWhiteSpace(NewName) Then Return
|
||||
Dim NewPath As String = PathMcFolder & "versions\" & NewName & "\"
|
||||
'获取临时中间名,以防止仅修改大小写的重命名失败
|
||||
Dim TempName As String = NewName & "_temp"
|
||||
Dim TempPath As String = PathMcFolder & "versions\" & TempName & "\"
|
||||
Dim IsCaseChangedOnly As Boolean = NewName.ToLower = OldName.ToLower
|
||||
'重新加载版本 Json 信息,避免 HMCL 项被合并
|
||||
'重新读取版本 JSON 信息,避免 JsonObject 中已被合并的项被重新存储
|
||||
Dim JsonObject As JObject
|
||||
Try
|
||||
JsonObject = GetJson(ReadFile(PageVersionLeft.Version.Path & PageVersionLeft.Version.Name & ".json"))
|
||||
Dim JsonPath As String = PageVersionLeft.Version.GetJsonPath()
|
||||
JsonObject = GetJson(ReadFile(JsonPath))
|
||||
File.Delete(JsonPath)
|
||||
Catch ex As Exception
|
||||
Log(ex, "重命名读取 json 时失败")
|
||||
Log(ex, "在重命名读取 json 时失败")
|
||||
JsonObject = PageVersionLeft.Version.JsonObject
|
||||
End Try
|
||||
'重命名主文件夹
|
||||
My.Computer.FileSystem.RenameDirectory(OldPath, TempName)
|
||||
My.Computer.FileSystem.RenameDirectory(TempPath, NewName)
|
||||
'清理 ini 缓存
|
||||
IniClearCache(PageVersionLeft.Version.PathIndie & "options.txt")
|
||||
IniClearCache(PageVersionLeft.Version.Path & "PCL\Setup.ini")
|
||||
'遍历重命名所有文件与文件夹
|
||||
For Each Entry As DirectoryInfo In New DirectoryInfo(NewPath).EnumerateDirectories
|
||||
If Not Entry.Name.Contains(OldName) Then Continue For
|
||||
'重命名 jar 文件与 natives 文件夹
|
||||
'不能进行遍历重命名,否则在版本名很短的时候容易误伤其他文件(#6443)
|
||||
If Directory.Exists($"{NewPath}{OldName}-natives") Then
|
||||
If IsCaseChangedOnly Then
|
||||
My.Computer.FileSystem.RenameDirectory(Entry.FullName, Entry.Name & "_temp")
|
||||
My.Computer.FileSystem.RenameDirectory(Entry.FullName & "_temp", Entry.Name.Replace(OldName, NewName))
|
||||
My.Computer.FileSystem.RenameDirectory($"{NewPath}{OldName}-natives", $"{OldName}natives_temp")
|
||||
My.Computer.FileSystem.RenameDirectory($"{NewPath}{OldName}-natives_temp", $"{NewName}-natives")
|
||||
Else
|
||||
DeleteDirectory(NewPath & Entry.Name.Replace(OldName, NewName))
|
||||
My.Computer.FileSystem.RenameDirectory(Entry.FullName, Entry.Name.Replace(OldName, NewName))
|
||||
DeleteDirectory($"{NewPath}{NewName}-natives")
|
||||
My.Computer.FileSystem.RenameDirectory($"{NewPath}{OldName}-natives", $"{NewName}-natives")
|
||||
End If
|
||||
Next
|
||||
For Each Entry As FileInfo In New DirectoryInfo(NewPath).EnumerateFiles
|
||||
If Not Entry.Name.Contains(OldName) Then Continue For
|
||||
End If
|
||||
If File.Exists($"{NewPath}{OldName}.jar") Then
|
||||
If IsCaseChangedOnly Then
|
||||
My.Computer.FileSystem.RenameFile(Entry.FullName, Entry.Name & "_temp")
|
||||
My.Computer.FileSystem.RenameFile(Entry.FullName & "_temp", Entry.Name.Replace(OldName, NewName))
|
||||
My.Computer.FileSystem.RenameFile($"{NewPath}{OldName}.jar", $"{OldName}_temp.jar")
|
||||
My.Computer.FileSystem.RenameFile($"{NewPath}{OldName}_temp.jar", $"{NewName}.jar")
|
||||
Else
|
||||
If File.Exists(NewPath & Entry.Name.Replace(OldName, NewName)) Then File.Delete(NewPath & Entry.Name.Replace(OldName, NewName))
|
||||
My.Computer.FileSystem.RenameFile(Entry.FullName, Entry.Name.Replace(OldName, NewName))
|
||||
File.Delete($"{NewPath}{NewName}.jar")
|
||||
My.Computer.FileSystem.RenameFile($"{NewPath}{OldName}.jar", $"{NewName}.jar")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'替换版本设置文件中的路径
|
||||
If File.Exists(NewPath & "PCL\Setup.ini") Then
|
||||
WriteFile(NewPath & "PCL\Setup.ini", ReadFile(NewPath & "PCL\Setup.ini").Replace(OldPath, NewPath))
|
||||
@@ -158,15 +160,13 @@
|
||||
If ReadIni(PathMcFolder & "PCL.ini", "Version") = OldName Then
|
||||
WriteIni(PathMcFolder & "PCL.ini", "Version", NewName)
|
||||
End If
|
||||
'更改版本 Json
|
||||
If File.Exists(NewPath & NewName & ".json") Then
|
||||
Try
|
||||
JsonObject("id") = NewName
|
||||
WriteFile(NewPath & NewName & ".json", JsonObject.ToString)
|
||||
Catch ex As Exception
|
||||
Log(ex, "重命名版本 json 失败")
|
||||
End Try
|
||||
End If
|
||||
'写入版本 Json
|
||||
Try
|
||||
JsonObject("id") = NewName
|
||||
WriteFile(NewPath & NewName & ".json", JsonObject.ToString)
|
||||
Catch ex As Exception
|
||||
Log(ex, "重命名版本 json 失败")
|
||||
End Try
|
||||
'刷新与提示
|
||||
Hint("重命名成功!", HintType.Finish)
|
||||
PageVersionLeft.Version = New McVersion(NewName).Load()
|
||||
@@ -180,17 +180,15 @@
|
||||
|
||||
'版本图标
|
||||
Private Sub ComboDisplayLogo_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboDisplayLogo.SelectionChanged
|
||||
If Not (IsLoad AndAlso AniControlEnabled = 0) Then Exit Sub
|
||||
If Not (IsLoad AndAlso AniControlEnabled = 0) Then Return
|
||||
'选择 自定义 时修改图片
|
||||
Try
|
||||
If ComboDisplayLogo.SelectedItem Is ItemDisplayLogoCustom Then
|
||||
Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpg;*.gif)|*.png;*.jpg;*.gif", "选择图片")
|
||||
Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpeg;*.jpg;*.gif;*.webp)|*.png;*.jpeg;*.jpg;*.gif;*.webp", "选择图片")
|
||||
If FileName = "" Then
|
||||
Reload() '还原选项
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
File.Delete(PageVersionLeft.Version.Path & "PCL\Logo.png")
|
||||
Directory.CreateDirectory(PageVersionLeft.Version.Path & "PCL") '虽然不知道为啥,有时候真没这文件夹
|
||||
CopyFile(FileName, PageVersionLeft.Version.Path & "PCL\Logo.png")
|
||||
Else
|
||||
File.Delete(PageVersionLeft.Version.Path & "PCL\Logo.png")
|
||||
@@ -261,11 +259,11 @@
|
||||
Try
|
||||
'弹窗要求指定脚本的保存位置
|
||||
Dim SavePath As String = SelectSaveFile("选择脚本保存位置", "启动 " & PageVersionLeft.Version.Name & ".bat", "批处理文件(*.bat)|*.bat")
|
||||
If SavePath = "" Then Exit Sub
|
||||
If SavePath = "" Then Return
|
||||
'检查中断(等玩家选完弹窗指不定任务就结束了呢……)
|
||||
If McLaunchLoader.State = LoadState.Loading Then
|
||||
Hint("请在当前启动任务结束后再试!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'生成脚本
|
||||
If McLaunchStart(New McLaunchOptions With {.SaveBatch = SavePath, .Version = PageVersionLeft.Version}) Then
|
||||
@@ -286,13 +284,13 @@
|
||||
'忽略文件检查提示
|
||||
If ShouldIgnoreFileCheck(PageVersionLeft.Version) Then
|
||||
Hint("请先关闭 [版本设置 → 设置 → 高级启动选项 → 关闭文件校验],然后再尝试补全文件!", HintType.Info)
|
||||
Exit Sub
|
||||
Return
|
||||
End If
|
||||
'重复任务检查
|
||||
For Each OngoingLoader In LoaderTaskbar
|
||||
If OngoingLoader.Name <> PageVersionLeft.Version.Name & " 文件补全" Then Continue For
|
||||
Hint("正在处理中,请稍候!", HintType.Critical)
|
||||
Exit Sub
|
||||
Return
|
||||
Next
|
||||
'启动
|
||||
Dim Loader As New LoaderCombo(Of String)(PageVersionLeft.Version.Name & " 文件补全", DlClientFix(PageVersionLeft.Version, True, AssetsIndexExistsBehaviour.AlwaysDownload))
|
||||
@@ -326,16 +324,17 @@
|
||||
If(IsHintIndie, vbCrLf & "由于该版本开启了版本隔离,删除版本时该版本对应的存档、资源包、Mod 等文件也将被一并删除!", ""),
|
||||
"版本删除确认", , "取消",, IsHintIndie OrElse IsShiftPressed)
|
||||
Case 1
|
||||
IniClearCache(PageVersionLeft.Version.PathIndie & "options.txt")
|
||||
IniClearCache(PageVersionLeft.Version.Path & "PCL\Setup.ini")
|
||||
If IsShiftPressed Then
|
||||
DeleteDirectory(PageVersionLeft.Version.Path)
|
||||
Hint("版本 " & PageVersionLeft.Version.Name & " 已永久删除!", HintType.Finish)
|
||||
Else
|
||||
FileIO.FileSystem.DeleteDirectory(PageVersionLeft.Version.Path, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
FileIO.FileSystem.DeleteDirectory(PageVersionLeft.Version.Path, FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
Hint("版本 " & PageVersionLeft.Version.Name & " 已删除到回收站!", HintType.Finish)
|
||||
End If
|
||||
Case 2
|
||||
Exit Sub
|
||||
Return
|
||||
End Select
|
||||
LoaderFolderRun(McVersionListLoader, PathMcFolder, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\")
|
||||
FrmMain.PageBack()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
PanScroll="{Binding ElementName=PanBack}">
|
||||
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
|
||||
<StackPanel x:Name="PanMain" Margin="25,25,25,25">
|
||||
<local:MyHint Text="这些设置只对该游戏版本生效,不影响其他版本。" IsWarn="False" Margin="0,0,0,15"
|
||||
<local:MyHint Text="这些设置只对该游戏版本生效,不影响其他版本。" Theme="Blue" Margin="0,0,0,15"
|
||||
CanClose="True" RelativeSetup="HintIndieSetup" />
|
||||
<local:MyCard x:Name="CardArgument" Margin="0,0,0,15" Title="启动选项">
|
||||
<StackPanel Margin="25,40,25,21">
|
||||
@@ -58,7 +58,7 @@
|
||||
</local:MyCard>
|
||||
<local:MyCard Margin="0,0,0,15" Title="游戏内存">
|
||||
<StackPanel Margin="25,40,25,15">
|
||||
<local:MyHint x:Name="LabRamWarn" Text="32 位 Java 最多只能分配 1 GB 内存,建议安装 64 位 Java!" IsWarn="True" Margin="0,0,0,12" />
|
||||
<local:MyHint x:Name="LabRamWarn" Text="32 位 Java 只能分配最多 1 GB 的内存。强烈建议换用 64 位的 Java!" Theme="Yellow" Margin="0,0,0,12" />
|
||||
<Grid Margin="0,0,0,3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -192,7 +192,7 @@
|
||||
<local:MyButton x:Name="BtnServerAuthLittle" Height="35" MinWidth="150" Margin="0,12,0,0" Text="设置为 LittleSkin" HorizontalAlignment="Left" ColorType="Highlight" />
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
<local:MyCard x:Name="CardAdvance" Margin="0,0,0,15" Title="高级启动选项" IsSwaped="True" CanSwap="True">
|
||||
<local:MyCard x:Name="CardAdvance" Margin="0,0,0,15" Title="高级启动选项" IsSwapped="True" CanSwap="True">
|
||||
<Grid Margin="25,40,25,15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Name" />
|
||||
@@ -208,11 +208,11 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数头部" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceJvm" Grid.Row="0" Grid.ColumnSpan="2" Tag="VersionAdvanceJvm" Grid.Column="1" MaxLength="4000" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,在没有确定把握的情况下请不要尝试修改。
若留空,则跟随全局设置的值。" HintText="跟随全局设置"
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="Java 虚拟机参数" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceJvm" Grid.Row="0" Grid.ColumnSpan="2" Tag="VersionAdvanceJvm" Grid.Column="1" MaxLength="4000" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,在没有确定把握的情况下请不要尝试修改。
支持 Minecraft 版本 JSON 中的字符串替换标记,例如 ${library_directory}。

若留空,则跟随全局设置的值。" HintText="跟随全局设置"
|
||||
Height="100" AcceptsReturn="True" TextWrapping="Wrap" VerticalContentAlignment="Top" Padding="0,5" VerticalScrollBarVisibility="Auto" />
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="游戏参数尾部" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="VersionAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。
例如输入 --demo 则会以试玩模式启动游戏。
若留空,则跟随全局设置的值。" HintText="跟随全局设置" />
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="游戏参数" Margin="0,0,25,0" />
|
||||
<local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="VersionAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。
例如,输入 --demo 则会以试玩模式启动游戏。
支持 Minecraft 版本 JSON 中的字符串替换标记,例如 ${library_directory}。

若留空,则跟随全局设置的值。" HintText="跟随全局设置" />
|
||||
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="启动前执行命令" Margin="0,0,25,3" />
|
||||
<local:MyTextBox x:Name="TextAdvanceRun" Grid.Row="4" Grid.ColumnSpan="2" Tag="VersionAdvanceRun" Grid.Column="1" HintText="" Margin="0,0,0,3"
|
||||
ToolTip="该项不会覆盖全局设置:启动时会先执行全局设置的命令,再执行版本设置的命令。

在 MC 启动前执行特定命令或程序,语法与 Windows 的命令提示符一致。

可以使用以下替换标记实现相对路径(路径均以 \ 结尾):
 · {path}:PCL 的 exe 文件所在的文件夹
 · {minecraft}:.minecraft 文件夹
 · {verpath}:版本文件夹(.minecraft\versions\版本名\)
 · {verindie}:开启版本隔离时等同版本文件夹,未开启时等同 .minecraft 文件夹
 · {java}:游戏运行时的 Java 文件夹

除此之外,也支持以下替换标记:
 · {user}:玩家名字
 · {login}:玩家的登录方式
 · {uuid}:玩家的 UUID
 · {name}:游戏版本名
 · {date}、{time}:当前的系统时间
 · {version}:游戏对应的原版版本号

例如:
 · "{verpath}test.exe" :运行版本文件夹下的 test.exe 程序
 · "{java}java.exe" -jar "{verpath}test.jar" :用 Java 运行版本文件夹下的 test.jar
 · notepad "{verindie}options.txt" :使用记事本打开该版本的设置文件

涉及路径的操作最好都打上双引号,以避免路径中的空格导致运行失败。
执行命令时,命令行所在的目录是当前的 .minecraft 文件夹。" />
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
AniControlEnabled -= 1
|
||||
|
||||
'非重复加载部分
|
||||
If IsLoaded Then Exit Sub
|
||||
If IsLoaded Then Return
|
||||
IsLoaded = True
|
||||
|
||||
'内存自动刷新
|
||||
@@ -132,7 +132,7 @@
|
||||
#Region "游戏内存"
|
||||
|
||||
Public Sub RamType(Type As Integer)
|
||||
If SliderRamCustom Is Nothing Then Exit Sub
|
||||
If SliderRamCustom Is Nothing Then Return
|
||||
SliderRamCustom.IsEnabled = (Type = 1)
|
||||
End Sub
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
''' 刷新 UI 上的 RAM 显示。
|
||||
''' </summary>
|
||||
Public Sub RefreshRam(ShowAnim As Boolean)
|
||||
If LabRamGame Is Nothing OrElse LabRamUsed Is Nothing OrElse FrmMain.PageCurrent <> FormMain.PageType.VersionSetup OrElse FrmVersionLeft.PageID <> FormMain.PageSubType.VersionSetup Then Exit Sub
|
||||
If LabRamGame Is Nothing OrElse LabRamUsed Is Nothing OrElse FrmMain.PageCurrent <> FormMain.PageType.VersionSetup OrElse FrmVersionLeft.PageID <> FormMain.PageSubType.VersionSetup Then Return
|
||||
'获取内存情况
|
||||
Dim RamGame As Double = Math.Round(GetRam(PageVersionLeft.Version), 5)
|
||||
Dim RamTotal As Double = Math.Round(My.Computer.Info.TotalPhysicalMemory / 1024 / 1024 / 1024, 1)
|
||||
@@ -355,22 +355,31 @@ PreFin:
|
||||
|
||||
#Region "服务器"
|
||||
|
||||
'自动替换标点
|
||||
Private Sub TextServerEnter_Change() Handles TextServerEnter.TextChanged
|
||||
Dim NewText = TextServerEnter.Text.Replace(":", ":").Replace("。", ".")
|
||||
If NewText = TextServerEnter.Text Then Return
|
||||
Dim CurrentPosition = TextServerEnter.SelectionStart '重设焦点
|
||||
TextServerEnter.Text = NewText
|
||||
TextServerEnter.SelectionStart = CurrentPosition
|
||||
End Sub
|
||||
|
||||
'全局
|
||||
Private ComboServerLoginLast As Integer
|
||||
Private Sub ComboServerLogin_Changed() Handles ComboServerLogin.SelectionChanged, TextServerNide.ValidatedTextChanged, TextServerAuthServer.ValidatedTextChanged, TextServerAuthRegister.ValidatedTextChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
ServerLogin(ComboServerLogin.SelectedIndex)
|
||||
'检查是否输入正确,正确才触发设置改变
|
||||
If ComboServerLogin.SelectedIndex = 3 AndAlso Not TextServerNide.IsValidated Then Exit Sub
|
||||
If ComboServerLogin.SelectedIndex = 4 AndAlso Not TextServerAuthServer.IsValidated Then Exit Sub
|
||||
If ComboServerLogin.SelectedIndex = 3 AndAlso Not TextServerNide.IsValidated Then Return
|
||||
If ComboServerLogin.SelectedIndex = 4 AndAlso Not TextServerAuthServer.IsValidated Then Return
|
||||
'检查结果是否发生改变,未改变则不触发设置改变
|
||||
If ComboServerLoginLast = ComboServerLogin.SelectedIndex Then Exit Sub
|
||||
If ComboServerLoginLast = ComboServerLogin.SelectedIndex Then Return
|
||||
'触发
|
||||
ComboServerLoginLast = ComboServerLogin.SelectedIndex
|
||||
ComboChange(ComboServerLogin, Nothing)
|
||||
End Sub
|
||||
Public Sub ServerLogin(Type As Integer)
|
||||
If LabServerNide Is Nothing Then Exit Sub
|
||||
If LabServerNide Is Nothing Then Return
|
||||
LabServerNide.Visibility = If(Type = 3, Visibility.Visible, Visibility.Collapsed)
|
||||
TextServerNide.Visibility = If(Type = 3, Visibility.Visible, Visibility.Collapsed)
|
||||
PanServerNide.Visibility = If(Type = 3, Visibility.Visible, Visibility.Collapsed)
|
||||
@@ -393,7 +402,7 @@ PreFin:
|
||||
Private Sub BtnServerAuthLittle_Click(sender As Object, e As EventArgs) Handles BtnServerAuthLittle.Click
|
||||
If TextServerAuthServer.Text <> "" AndAlso TextServerAuthServer.Text <> "https://littleskin.cn/api/yggdrasil" AndAlso
|
||||
MyMsgBox("即将把第三方登录设置覆盖为 LittleSkin 登录。" & vbCrLf & "除非你是服主,或者服主要求你这样做,否则请不要继续。" & vbCrLf & vbCrLf & "是否确实需要覆盖当前设置?",
|
||||
"设置覆盖确认", "继续", "取消") = 2 Then Exit Sub
|
||||
"设置覆盖确认", "继续", "取消") = 2 Then Return
|
||||
TextServerAuthServer.Text = "https://littleskin.cn/api/yggdrasil"
|
||||
TextServerAuthRegister.Text = "https://littleskin.cn/auth/register"
|
||||
TextServerAuthName.Text = "LittleSkin 登录"
|
||||
@@ -405,7 +414,7 @@ PreFin:
|
||||
|
||||
'刷新 Java 下拉框显示
|
||||
Public Sub RefreshJavaComboBox()
|
||||
If ComboArgumentJava Is Nothing Then Exit Sub
|
||||
If ComboArgumentJava Is Nothing Then Return
|
||||
'初始化列表
|
||||
ComboArgumentJava.Items.Clear()
|
||||
ComboArgumentJava.Items.Add(New MyComboBoxItem With {.Content = "跟随全局设置", .Tag = "使用全局设置"})
|
||||
@@ -451,9 +460,9 @@ PreFin:
|
||||
|
||||
'下拉框选择更改
|
||||
Private Sub JavaSelectionUpdate() Handles ComboArgumentJava.SelectionChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
'Java 不可用时也不清空,会导致刷新时找不到对象
|
||||
If ComboArgumentJava.SelectedItem Is Nothing OrElse ComboArgumentJava.SelectedItem.Tag Is Nothing Then Exit Sub
|
||||
If ComboArgumentJava.SelectedItem Is Nothing OrElse ComboArgumentJava.SelectedItem.Tag Is Nothing Then Return
|
||||
'设置新的 Java
|
||||
Dim SelectedJava = ComboArgumentJava.SelectedItem.Tag
|
||||
If "使用全局设置".Equals(SelectedJava) Then
|
||||
@@ -479,8 +488,8 @@ PreFin:
|
||||
'版本隔离警告
|
||||
Private IsReverting As Boolean = False
|
||||
Private Sub ComboArgumentIndieV2_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboArgumentIndieV2.SelectionChanged
|
||||
If AniControlEnabled <> 0 Then Exit Sub
|
||||
If IsReverting Then Exit Sub
|
||||
If AniControlEnabled <> 0 Then Return
|
||||
If IsReverting Then Return
|
||||
If MyMsgBox("调整版本隔离后,你可能得把游戏存档、Mod 等文件手动迁移到新的游戏文件夹中。" & vbCrLf &
|
||||
"如果修改后发现存档消失,把这项设置改回来就能恢复。" & vbCrLf &
|
||||
"如果你不会迁移存档,不建议修改这项设置!",
|
||||
|
||||
Reference in New Issue
Block a user