This commit is contained in:
LTCat
2026-10-17 03:39:13 +08:00
parent 9dcb799fb0
commit ade6e04c6e
65 changed files with 6989 additions and 2643 deletions
@@ -65,7 +65,7 @@ Public Class PageLaunchLeft
'确认 Minecraft 版本存在
Dim Selection As String = ReadIni(McFolderSelected & "PCL.ini", "Version")
Dim Instance As McInstance = If(Selection = "", Nothing, New McInstance(Selection))
If Instance Is Nothing OrElse Not Instance.PathVersion.StartsWithF(McFolderSelected) OrElse Not Instance.Check() Then
If Instance Is Nothing OrElse Not PathUtils.IsParentOf(McFolderSelected, Instance.PathVersion) OrElse Not Instance.Check() Then
'无效的版本
Logger.Info($"当前选择的 Minecraft 版本无效:{If(Instance Is Nothing, "null", Instance.PathVersion)}", If(IsNothing(Instance), LogBehavior.None, LogBehavior.ToastIfDebug))
If Not McInstanceListLoader.State = LoadState.Finished Then LoaderFolderRun(McInstanceListLoader, McFolderSelected, LoaderFolderRunType.ForceRun, MaxDepth:=1, ExtraPath:="versions\", WaitForExit:=True)
@@ -691,12 +691,28 @@ ExitRefresh:
End If
End Sub
'取消按钮
Private Sub BtnCancel_Click() Handles BtnCancel.Click
McLaunchCancel()
Public Sub BtnCancel_Click() Handles BtnCancel.Click
If McLaunchLoaderReal IsNot Nothing Then
McLaunchLoaderReal.Cancel()
McLaunchLog("已取消启动")
Try
If McLaunchWatcher IsNot Nothing Then
McLaunchWatcher.Kill()
ElseIf McLaunchProcess IsNot Nothing Then
If Not McLaunchProcess.HasExited Then McLaunchProcess.Kill()
End If
Catch ex As Exception
Logger.Error(ex, "取消启动结束进程失败", LogBehavior.Toast)
End Try
End If
End Sub
'版本设置按钮
Private Sub BtnMore_Click() Handles BtnMore.Click
If McLaunchLoader.State = LoadState.Loading Then Return
If McInstanceLock.IsLocked(McInstanceSelected) Then
Hint("该版本正在被修改,暂时无法进入版本设置!", HintType.Red)
Return
End If
McInstanceSelected.Load()
PageInstanceLeft.Instance = McInstanceSelected
FrmMain.PageChange(FormMain.PageType.InstanceSetup, 0)
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:behaviors="clr-namespace:PCL.Controls.Behaviors"
xmlns:local="clr-namespace:PCL" PanScroll="PanBack">
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
<StackPanel Name="PanMain" Margin="25,25,25,10" Grid.IsSharedSizeScope="True">
@@ -11,8 +12,10 @@
<StackPanel x:Name="PanCustom">
</StackPanel>
<local:MyCard Margin="0,0,0,15" Title="启动日志" x:Name="PanLog">
<TextBlock x:Name="LabLog" Margin="20,38,20,18" TextTrimming="None" TextWrapping="Wrap" />
<local:MyTextBox x:Name="LabLog" Margin="15,34,15,13" Padding="0,4" IsReadOnly="True" IsUndoEnabled="False"
AcceptsReturn="True" TextWrapping="Wrap" BorderThickness="0" HasBackground="False"
VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled" />
</local:MyCard>
</StackPanel>
</local:MyScrollViewer>
</local:MyPageRight>
</local:MyPageRight>
@@ -101,19 +101,34 @@ Public Class PageLaunchRight
Url = "https://pcl.wyc-w.top/index.xaml"
Case 15
Logger.Info("主页预设:Minecraft 芝士站")
Url = "https://www.xxag.top/mkss"
Url = "https://mkss-services.awaeric.xyz"
Case 16
Logger.Info("主页预设:整合包推荐引擎")
Url = "https://qawsedrftgyhujiko.fun/pcl2/Custom.xaml"
Case 17
Logger.Info("Bangumi 番剧主页")
Url = "https://bangumi.p.kaphia.qzz.io"
Logger.Info("主页预设:Bangumi 番剧主页")
Url = "https://bangumi.p.kaphia.top"
Case 18
Logger.Info("Bilibili 热门")
Url = "https://bilibili.p.kaphia.qzz.io"
Logger.Info("主页预设:Bilibili 热门")
Url = "https://bilibili.p.kaphia.top"
Case 19
Logger.Info("Music 云音乐热门")
Url = "https://cloudmusic.p.kaphia.qzz.io"
Logger.Info("主页预设:Music 云音乐热门")
Url = "https://cloudmusic.p.kaphia.top"
Case 20
Logger.Info("主页预设:模组推荐")
Url = "https://g-fish.dpdns.org/download/ModPage.xaml"
Case 21
Logger.Info("主页预设:每日游戏推荐")
Url = "https://pcl.xn--9iq209asnop94b.top/download/GamePage.xaml"
Case 22
Logger.Info("主页预设:Wallpaper 每日壁纸")
Url = "https://wallpaper.p.kaphia.top"
Case 23
Logger.Info("主页预设:Weather 天气预报")
Url = "https://weather-p.kaphia.top/{variable:PCLDailyWeatherPage:choose}.xaml"
Case 24
Logger.Info("主页预设:新一代狗屁王大杂烩主页")
Url = "https://end.g-fish.dpdns.org/Custom.xaml"
End Select
End Select
'联网下载
@@ -45,7 +45,7 @@ Public Class PageLoginLegacy
If LoginData.UserName.Trim = "" Then Return "玩家名不能为空!"
If LoginData.UserName.Contains("""") Then Return "玩家名不能包含英文引号!"
If McInstanceSelected IsNot Nothing AndAlso
McInstanceSelected.Version.Vaild AndAlso McInstanceSelected.Version.Vanilla >= New Version(20, 0, 3) AndAlso
McInstanceSelected.Version.Valid AndAlso McInstanceSelected.Version.Vanilla >= New Version(20, 0, 3) AndAlso
LoginData.UserName.Trim.Length > 16 Then
Return "自 1.20.3 起,玩家名至多只能包含 16 个字符!"
End If