This commit is contained in:
龙腾猫跃
2023-10-07 05:29:24 +08:00
parent 5ff7aed46e
commit 037e6b19b4
29 changed files with 252 additions and 221 deletions
@@ -79,7 +79,45 @@
''' 切换至启动中页面。
''' </summary>
Public Sub PageChangeToLaunching()
LaunchingPreload()
'修改登陆方式
Select Case Setup.Get("LoginType")
Case McLoginType.Legacy
If PageLinkHiper.HiperState = LoadState.Finished Then
LabLaunchingMethod.Text = "联机离线登录"
Else
LabLaunchingMethod.Text = "离线登录"
End If
Case McLoginType.Ms
LabLaunchingMethod.Text = "正版登录"
Case McLoginType.Nide
LabLaunchingMethod.Text = "统一通行证"
Case McLoginType.Auth
LabLaunchingMethod.Text = "Authlib-Injector"
End Select
'初始化页面
LabLaunchingName.Text = McVersionCurrent.Name
LabLaunchingStage.Text = "初始化"
LabLaunchingTitle.Text = If(McLaunchLoader.Input Is Nothing OrElse McLaunchLoader.Input.SaveBatch Is Nothing, "正在启动游戏", "正在导出启动脚本")
LabLaunchingProgress.Text = "0.00 %"
LabLaunchingProgress.Opacity = 1
LabLaunchingDownload.Visibility = Visibility.Visible
LabLaunchingProgressLeft.Opacity = 0.6
LabLaunchingDownload.Visibility = Visibility.Visible
LabLaunchingDownload.Text = "0 B/s"
LabLaunchingDownload.Opacity = 0
LabLaunchingDownload.Visibility = Visibility.Collapsed
LabLaunchingDownloadLeft.Opacity = 0
LabLaunchingDownloadLeft.Visibility = Visibility.Collapsed
ProgressLaunchingFinished.Width = New GridLength(0, GridUnitType.Star)
ProgressLaunchingUnfinished.Width = New GridLength(1, GridUnitType.Star)
PanLaunchingHint.Opacity = 0
PanLaunchingHint.Visibility = Visibility.Collapsed
PanLaunchingInfo.Width = Double.NaN '重置宽度改变动画
McLaunchProcess = Nothing
McLaunchWatcher = Nothing
'获取 “你知道吗” 提示
LabLaunchingHint.Text = PageOtherTest.GetRandomHint()
'初始化其他页面
PanInput.IsHitTestVisible = False
PanLaunching.IsHitTestVisible = False
LoadLaunching.State.LoadingState = MyLoading.MyLoadingState.Run
@@ -634,48 +672,6 @@ ExitRefresh:
PageVersionLeft.Version = McVersionCurrent
FrmMain.PageChange(FormMain.PageType.VersionSetup, 0)
End Sub
'刷新 UI
Public Sub LaunchingPreload()
'修改登陆方式
Select Case Setup.Get("LoginType")
Case McLoginType.Legacy
If PageLinkHiper.HiperState = LoadState.Finished Then
LabLaunchingMethod.Text = "联机离线登录"
Else
LabLaunchingMethod.Text = "离线登录"
End If
Case McLoginType.Ms
LabLaunchingMethod.Text = "正版登录"
Case McLoginType.Nide
LabLaunchingMethod.Text = "统一通行证"
Case McLoginType.Auth
LabLaunchingMethod.Text = "Authlib-Injector"
End Select
'初始化页面
LabLaunchingName.Text = McVersionCurrent.Name
LabLaunchingStage.Text = "初始化"
LabLaunchingTitle.Text = If(McLaunchLoader.Input Is Nothing OrElse McLaunchLoader.Input.SaveBatch Is Nothing, "正在启动游戏", "正在导出启动脚本")
LabLaunchingProgress.Text = "0.00 %"
LabLaunchingProgress.Opacity = 1
LabLaunchingDownload.Visibility = Visibility.Visible
LabLaunchingProgressLeft.Opacity = 0.6
LabLaunchingDownload.Visibility = Visibility.Visible
LabLaunchingDownload.Text = "0 B/s"
LabLaunchingDownload.Opacity = 0
LabLaunchingDownload.Visibility = Visibility.Collapsed
LabLaunchingDownloadLeft.Opacity = 0
LabLaunchingDownloadLeft.Visibility = Visibility.Collapsed
ProgressLaunchingFinished.Width = New GridLength(0, GridUnitType.Star)
ProgressLaunchingUnfinished.Width = New GridLength(1, GridUnitType.Star)
PanLaunchingHint.Opacity = 0
PanLaunchingHint.Visibility = Visibility.Collapsed
PanLaunchingInfo.Width = Double.NaN '重置宽度改变动画
McLaunchProcess = Nothing
McLaunchWatcher = Nothing
'获取 “你知道吗” 提示
LabLaunchingHint.Text = PageOtherTest.GetRandomHint()
End Sub
Private ShowProgress As Double = 0
''' <summary>
''' 每 0.2s 执行一次,刷新启动的数据 UI 显示。
''' </summary>
@@ -759,6 +755,7 @@ ExitRefresh:
Log(ex, "刷新启动信息失败", LogLevel.Feedback)
End Try
End Sub
Private ShowProgress As Double = 0
'尺寸改变动画
Private IsWidthAnimating As Boolean = False
Private ActualUsedWidth As Double
@@ -84,9 +84,13 @@ Download:
EventType=""刷新主页"" EventData=""/""
Logo=""M875.52 148.48C783.36 56.32 655.36 0 512 0 291.84 0 107.52 138.24 30.72 332.8l122.88 46.08C204.8 230.4 348.16 128 512 128c107.52 0 199.68 40.96 271.36 112.64L640 384h384V0L875.52 148.48zM512 896c-107.52 0-199.68-40.96-271.36-112.64L384 640H0v384l148.48-148.48C240.64 967.68 368.64 1024 512 1024c220.16 0 404.48-138.24 481.28-332.8L870.4 645.12C819.2 793.6 675.84 896 512 896z"" />
</local:MyCard>"
Case 2 '新闻主页
Case 2 '新闻
Log("[Page] 主页预设:Minecraft 新闻")
Url = "http://pcl2.mc-news.top"
Url = "http://pcl.mcnews.thestack.top"
GoTo Download
Case 3 '简单主页
Log("[Page] 主页预设:简单主页")
Url = "https://cdn.wearclub.online/PCL/Custom.xaml"
GoTo Download
End Select
End Select
@@ -103,9 +103,8 @@
End Sub
'账号迁移入口
Private Sub BtnMigration_Click(sender As Object, e As EventArgs) Handles BtnMigration.Click
MyMsgBox("目前,你可以继续迁移你的账户,但其所属Minecraft游戏信息均已清空。" & vbCrLf & "在迁移过程中,你可能需要设置你的档案信息,此时请注意让年龄大于 18 岁,否则可能导致无法登录!",
"迁移提示", "继续", ForceWait:=True)
OpenWebsite("https://www.minecraft.net/zh-hans/account-security")
MyMsgBox($"请在接下来要打开的页面登录你的 Mojang 账号。{vbCrLf}在迁移时,你可能需要设置档案信息,请注意让年龄大于 18 岁,否则可能会导致无法登录!", "迁移提示", "继续", ForceWait:=True)
OpenWebsite("https://www.minecraft.net/zh-hans/login")
End Sub
End Class