Merge branch 'main' into fix#6230
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user