|
@@ -19,7 +19,7 @@
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
|
|
|
|
|
'非重复加载部分
|
|
'非重复加载部分
|
|
|
- If IsLoad Then Exit Sub
|
|
|
|
|
|
|
+ If IsLoad Then Return
|
|
|
IsLoad = True
|
|
IsLoad = True
|
|
|
|
|
|
|
|
McDownloadForgeRecommendedRefresh()
|
|
McDownloadForgeRecommendedRefresh()
|
|
@@ -38,7 +38,7 @@
|
|
|
Public IsInSelectPage As Boolean = False
|
|
Public IsInSelectPage As Boolean = False
|
|
|
Private IsFirstLoaded As Boolean = False
|
|
Private IsFirstLoaded As Boolean = False
|
|
|
Private Sub EnterSelectPage()
|
|
Private Sub EnterSelectPage()
|
|
|
- If IsInSelectPage Then Exit Sub
|
|
|
|
|
|
|
+ If IsInSelectPage Then Return
|
|
|
IsInSelectPage = True
|
|
IsInSelectPage = True
|
|
|
|
|
|
|
|
PanInner.Margin = New Thickness(25, 10, 25, 40)
|
|
PanInner.Margin = New Thickness(25, 10, 25, 40)
|
|
@@ -54,18 +54,13 @@
|
|
|
|
|
|
|
|
DisabledPageAnimControls.Remove(BtnStart)
|
|
DisabledPageAnimControls.Remove(BtnStart)
|
|
|
BtnStart.Show = True
|
|
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)
|
|
For Each Control In GetAllAnimControls(PanSelect)
|
|
@@ -87,8 +82,8 @@
|
|
|
DlOptiFabricLoader.Start()
|
|
DlOptiFabricLoader.Start()
|
|
|
|
|
|
|
|
AniStart({
|
|
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(
|
|
AaCode(
|
|
|
Sub()
|
|
Sub()
|
|
|
PanBack.ScrollToHome()
|
|
PanBack.ScrollToHome()
|
|
@@ -103,13 +98,13 @@
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
PanMinecraft.Visibility = Visibility.Collapsed
|
|
PanMinecraft.Visibility = Visibility.Collapsed
|
|
|
End Sub, After:=True),
|
|
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(
|
|
AaCode(
|
|
|
Sub()
|
|
Sub()
|
|
|
PanBack.IsHitTestVisible = True
|
|
PanBack.IsHitTestVisible = True
|
|
|
'初始化 Binding
|
|
'初始化 Binding
|
|
|
- If IsFirstLoaded Then Exit Sub
|
|
|
|
|
|
|
+ If IsFirstLoaded Then Return
|
|
|
IsFirstLoaded = True
|
|
IsFirstLoaded = True
|
|
|
BtnOptiFineClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardOptiFine.MainTextBlock, .Mode = BindingMode.OneWay})
|
|
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})
|
|
BtnLiteLoaderClearInner.SetBinding(Shapes.Path.FillProperty, New Binding("Foreground") With {.Source = CardLiteLoader.MainTextBlock, .Mode = BindingMode.OneWay})
|
|
@@ -122,7 +117,7 @@
|
|
|
}, "FrmDownloadInstall SelectPageSwitch", True)
|
|
}, "FrmDownloadInstall SelectPageSwitch", True)
|
|
|
End Sub
|
|
End Sub
|
|
|
Public Sub ExitSelectPage() Handles BtnBack.Click
|
|
Public Sub ExitSelectPage() Handles BtnBack.Click
|
|
|
- If Not IsInSelectPage Then Exit Sub
|
|
|
|
|
|
|
+ If Not IsInSelectPage Then Return
|
|
|
IsInSelectPage = False
|
|
IsInSelectPage = False
|
|
|
|
|
|
|
|
PanInner.Margin = New Thickness(25, 10, 25, 25)
|
|
PanInner.Margin = New Thickness(25, 10, 25, 25)
|
|
@@ -137,11 +132,11 @@
|
|
|
PanBack.ScrollToHome()
|
|
PanBack.ScrollToHome()
|
|
|
|
|
|
|
|
AniStart({
|
|
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),
|
|
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(
|
|
AaCode(
|
|
|
Sub()
|
|
Sub()
|
|
|
PanSelect.Visibility = Visibility.Collapsed
|
|
PanSelect.Visibility = Visibility.Collapsed
|
|
@@ -168,19 +163,19 @@
|
|
|
'OptiFine
|
|
'OptiFine
|
|
|
Private SelectedOptiFine As DlOptiFineListEntry = Nothing
|
|
Private SelectedOptiFine As DlOptiFineListEntry = Nothing
|
|
|
Private Sub SetOptiFineInfoShow(IsShow As String)
|
|
Private Sub SetOptiFineInfoShow(IsShow As String)
|
|
|
- If PanOptiFineInfo.Tag = IsShow Then Exit Sub
|
|
|
|
|
|
|
+ If PanOptiFineInfo.Tag = IsShow Then Return
|
|
|
PanOptiFineInfo.Tag = IsShow
|
|
PanOptiFineInfo.Tag = IsShow
|
|
|
If IsShow = "True" Then
|
|
If IsShow = "True" Then
|
|
|
'显示信息栏
|
|
'显示信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetOptiFineInfoShow")
|
|
|
Else
|
|
Else
|
|
|
'隐藏信息栏
|
|
'隐藏信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetOptiFineInfoShow")
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
@@ -188,19 +183,19 @@
|
|
|
'LiteLoader
|
|
'LiteLoader
|
|
|
Private SelectedLiteLoader As DlLiteLoaderListEntry = Nothing
|
|
Private SelectedLiteLoader As DlLiteLoaderListEntry = Nothing
|
|
|
Private Sub SetLiteLoaderInfoShow(IsShow As String)
|
|
Private Sub SetLiteLoaderInfoShow(IsShow As String)
|
|
|
- If PanLiteLoaderInfo.Tag = IsShow Then Exit Sub
|
|
|
|
|
|
|
+ If PanLiteLoaderInfo.Tag = IsShow Then Return
|
|
|
PanLiteLoaderInfo.Tag = IsShow
|
|
PanLiteLoaderInfo.Tag = IsShow
|
|
|
If IsShow = "True" Then
|
|
If IsShow = "True" Then
|
|
|
'显示信息栏
|
|
'显示信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetLiteLoaderInfoShow")
|
|
|
Else
|
|
Else
|
|
|
'隐藏信息栏
|
|
'隐藏信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetLiteLoaderInfoShow")
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
@@ -208,19 +203,19 @@
|
|
|
'Forge
|
|
'Forge
|
|
|
Private SelectedForge As DlForgeVersionEntry = Nothing
|
|
Private SelectedForge As DlForgeVersionEntry = Nothing
|
|
|
Private Sub SetForgeInfoShow(IsShow As String)
|
|
Private Sub SetForgeInfoShow(IsShow As String)
|
|
|
- If PanForgeInfo.Tag = IsShow Then Exit Sub
|
|
|
|
|
|
|
+ If PanForgeInfo.Tag = IsShow Then Return
|
|
|
PanForgeInfo.Tag = IsShow
|
|
PanForgeInfo.Tag = IsShow
|
|
|
If IsShow = "True" Then
|
|
If IsShow = "True" Then
|
|
|
'显示信息栏
|
|
'显示信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetForgeInfoShow")
|
|
|
Else
|
|
Else
|
|
|
'隐藏信息栏
|
|
'隐藏信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetForgeInfoShow")
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
@@ -228,19 +223,19 @@
|
|
|
'NeoForge
|
|
'NeoForge
|
|
|
Private SelectedNeoForge As DlNeoForgeListEntry = Nothing
|
|
Private SelectedNeoForge As DlNeoForgeListEntry = Nothing
|
|
|
Private Sub SetNeoForgeInfoShow(IsShow As String)
|
|
Private Sub SetNeoForgeInfoShow(IsShow As String)
|
|
|
- If PanNeoForgeInfo.Tag = IsShow Then Exit Sub
|
|
|
|
|
|
|
+ If PanNeoForgeInfo.Tag = IsShow Then Return
|
|
|
PanNeoForgeInfo.Tag = IsShow
|
|
PanNeoForgeInfo.Tag = IsShow
|
|
|
If IsShow = "True" Then
|
|
If IsShow = "True" Then
|
|
|
'显示信息栏
|
|
'显示信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetNeoForgeInfoShow")
|
|
|
Else
|
|
Else
|
|
|
'隐藏信息栏
|
|
'隐藏信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetNeoForgeInfoShow")
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
@@ -248,19 +243,19 @@
|
|
|
'Fabric
|
|
'Fabric
|
|
|
Private SelectedFabric As String = Nothing
|
|
Private SelectedFabric As String = Nothing
|
|
|
Private Sub SetFabricInfoShow(IsShow As String)
|
|
Private Sub SetFabricInfoShow(IsShow As String)
|
|
|
- If PanFabricInfo.Tag = IsShow Then Exit Sub
|
|
|
|
|
|
|
+ If PanFabricInfo.Tag = IsShow Then Return
|
|
|
PanFabricInfo.Tag = IsShow
|
|
PanFabricInfo.Tag = IsShow
|
|
|
If IsShow = "True" Then
|
|
If IsShow = "True" Then
|
|
|
'显示信息栏
|
|
'显示信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetFabricInfoShow")
|
|
|
Else
|
|
Else
|
|
|
'隐藏信息栏
|
|
'隐藏信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetFabricInfoShow")
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
@@ -268,19 +263,19 @@
|
|
|
'FabricApi
|
|
'FabricApi
|
|
|
Private SelectedFabricApi As CompFile = Nothing
|
|
Private SelectedFabricApi As CompFile = Nothing
|
|
|
Private Sub SetFabricApiInfoShow(IsShow As String)
|
|
Private Sub SetFabricApiInfoShow(IsShow As String)
|
|
|
- If PanFabricApiInfo.Tag = IsShow Then Exit Sub
|
|
|
|
|
|
|
+ If PanFabricApiInfo.Tag = IsShow Then Return
|
|
|
PanFabricApiInfo.Tag = IsShow
|
|
PanFabricApiInfo.Tag = IsShow
|
|
|
If IsShow = "True" Then
|
|
If IsShow = "True" Then
|
|
|
'显示信息栏
|
|
'显示信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetFabricApiInfoShow")
|
|
|
Else
|
|
Else
|
|
|
'隐藏信息栏
|
|
'隐藏信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetFabricApiInfoShow")
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
@@ -288,19 +283,19 @@
|
|
|
'OptiFabric
|
|
'OptiFabric
|
|
|
Private SelectedOptiFabric As CompFile = Nothing
|
|
Private SelectedOptiFabric As CompFile = Nothing
|
|
|
Private Sub SetOptiFabricInfoShow(IsShow As String)
|
|
Private Sub SetOptiFabricInfoShow(IsShow As String)
|
|
|
- If PanOptiFabricInfo.Tag = IsShow Then Exit Sub
|
|
|
|
|
|
|
+ If PanOptiFabricInfo.Tag = IsShow Then Return
|
|
|
PanOptiFabricInfo.Tag = IsShow
|
|
PanOptiFabricInfo.Tag = IsShow
|
|
|
If IsShow = "True" Then
|
|
If IsShow = "True" Then
|
|
|
'显示信息栏
|
|
'显示信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetOptiFabricInfoShow")
|
|
|
Else
|
|
Else
|
|
|
'隐藏信息栏
|
|
'隐藏信息栏
|
|
|
AniStart({
|
|
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")
|
|
}, "SetOptiFabricInfoShow")
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
@@ -310,7 +305,7 @@
|
|
|
''' 重载已选择的项目的显示。
|
|
''' 重载已选择的项目的显示。
|
|
|
''' </summary>
|
|
''' </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
|
|
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
|
|
IsReloading = True
|
|
|
'主预览
|
|
'主预览
|
|
|
SelectNameUpdate()
|
|
SelectNameUpdate()
|
|
@@ -318,8 +313,8 @@
|
|
|
'OptiFine
|
|
'OptiFine
|
|
|
Dim OptiFineError As String = LoadOptiFineGetError()
|
|
Dim OptiFineError As String = LoadOptiFineGetError()
|
|
|
CardOptiFine.MainSwap.Visibility = If(OptiFineError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
|
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
|
|
If SelectedOptiFine Is Nothing Then
|
|
|
BtnOptiFineClear.Visibility = Visibility.Collapsed
|
|
BtnOptiFineClear.Visibility = Visibility.Collapsed
|
|
|
ImgOptiFine.Visibility = Visibility.Collapsed
|
|
ImgOptiFine.Visibility = Visibility.Collapsed
|
|
@@ -338,8 +333,8 @@
|
|
|
CardLiteLoader.Visibility = Visibility.Visible
|
|
CardLiteLoader.Visibility = Visibility.Visible
|
|
|
Dim LiteLoaderError As String = LoadLiteLoaderGetError()
|
|
Dim LiteLoaderError As String = LoadLiteLoaderGetError()
|
|
|
CardLiteLoader.MainSwap.Visibility = If(LiteLoaderError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
|
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
|
|
If SelectedLiteLoader Is Nothing Then
|
|
|
BtnLiteLoaderClear.Visibility = Visibility.Collapsed
|
|
BtnLiteLoaderClear.Visibility = Visibility.Collapsed
|
|
|
ImgLiteLoader.Visibility = Visibility.Collapsed
|
|
ImgLiteLoader.Visibility = Visibility.Collapsed
|
|
@@ -355,8 +350,8 @@
|
|
|
'Forge
|
|
'Forge
|
|
|
Dim ForgeError As String = LoadForgeGetError()
|
|
Dim ForgeError As String = LoadForgeGetError()
|
|
|
CardForge.MainSwap.Visibility = If(ForgeError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
|
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
|
|
If SelectedForge Is Nothing Then
|
|
|
BtnForgeClear.Visibility = Visibility.Collapsed
|
|
BtnForgeClear.Visibility = Visibility.Collapsed
|
|
|
ImgForge.Visibility = Visibility.Collapsed
|
|
ImgForge.Visibility = Visibility.Collapsed
|
|
@@ -379,10 +374,22 @@
|
|
|
LabNeoForge.Text = If(NeoForgeError, "可以添加")
|
|
LabNeoForge.Text = If(NeoForgeError, "可以添加")
|
|
|
LabNeoForge.Foreground = ColorGray4
|
|
LabNeoForge.Foreground = ColorGray4
|
|
|
Else
|
|
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
|
|
End If
|
|
|
'Fabric
|
|
'Fabric
|
|
|
If SelectedMinecraftId.Contains("1.") AndAlso Val(SelectedMinecraftId.Split(".")(1)) <= 13 Then
|
|
If SelectedMinecraftId.Contains("1.") AndAlso Val(SelectedMinecraftId.Split(".")(1)) <= 13 Then
|
|
@@ -391,8 +398,8 @@
|
|
|
CardFabric.Visibility = Visibility.Visible
|
|
CardFabric.Visibility = Visibility.Visible
|
|
|
Dim FabricError As String = LoadFabricGetError()
|
|
Dim FabricError As String = LoadFabricGetError()
|
|
|
CardFabric.MainSwap.Visibility = If(FabricError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
|
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
|
|
If SelectedFabric Is Nothing Then
|
|
|
BtnFabricClear.Visibility = Visibility.Collapsed
|
|
BtnFabricClear.Visibility = Visibility.Collapsed
|
|
|
ImgFabric.Visibility = Visibility.Collapsed
|
|
ImgFabric.Visibility = Visibility.Collapsed
|
|
@@ -412,8 +419,8 @@
|
|
|
CardFabricApi.Visibility = Visibility.Visible
|
|
CardFabricApi.Visibility = Visibility.Visible
|
|
|
Dim FabricApiError As String = LoadFabricApiGetError()
|
|
Dim FabricApiError As String = LoadFabricApiGetError()
|
|
|
CardFabricApi.MainSwap.Visibility = If(FabricApiError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
|
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
|
|
If SelectedFabricApi Is Nothing Then
|
|
|
BtnFabricApiClear.Visibility = Visibility.Collapsed
|
|
BtnFabricApiClear.Visibility = Visibility.Collapsed
|
|
|
ImgFabricApi.Visibility = Visibility.Collapsed
|
|
ImgFabricApi.Visibility = Visibility.Collapsed
|
|
@@ -433,8 +440,8 @@
|
|
|
CardOptiFabric.Visibility = Visibility.Visible
|
|
CardOptiFabric.Visibility = Visibility.Visible
|
|
|
Dim OptiFabricError As String = LoadOptiFabricGetError()
|
|
Dim OptiFabricError As String = LoadOptiFabricGetError()
|
|
|
CardOptiFabric.MainSwap.Visibility = If(OptiFabricError Is Nothing, Visibility.Visible, Visibility.Collapsed)
|
|
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
|
|
If SelectedOptiFabric Is Nothing Then
|
|
|
BtnOptiFabricClear.Visibility = Visibility.Collapsed
|
|
BtnOptiFabricClear.Visibility = Visibility.Collapsed
|
|
|
ImgOptiFabric.Visibility = Visibility.Collapsed
|
|
ImgOptiFabric.Visibility = Visibility.Collapsed
|
|
@@ -535,13 +542,13 @@
|
|
|
Private IsSelectNameEdited As Boolean = False
|
|
Private IsSelectNameEdited As Boolean = False
|
|
|
Private IsSelectNameChanging As Boolean = False
|
|
Private IsSelectNameChanging As Boolean = False
|
|
|
Private Sub SelectNameUpdate()
|
|
Private Sub SelectNameUpdate()
|
|
|
- If IsSelectNameEdited OrElse IsSelectNameChanging Then Exit Sub
|
|
|
|
|
|
|
+ If IsSelectNameEdited OrElse IsSelectNameChanging Then Return
|
|
|
IsSelectNameChanging = True
|
|
IsSelectNameChanging = True
|
|
|
TextSelectName.Text = GetSelectName()
|
|
TextSelectName.Text = GetSelectName()
|
|
|
IsSelectNameChanging = False
|
|
IsSelectNameChanging = False
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub TextSelectName_TextChanged(sender As Object, e As TextChangedEventArgs) Handles TextSelectName.TextChanged
|
|
Private Sub TextSelectName_TextChanged(sender As Object, e As TextChangedEventArgs) Handles TextSelectName.TextChanged
|
|
|
- If IsSelectNameChanging Then Exit Sub
|
|
|
|
|
|
|
+ If IsSelectNameChanging Then Return
|
|
|
IsSelectNameEdited = True
|
|
IsSelectNameEdited = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
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}
|
|
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.Children.Add(NewStack)
|
|
|
NewCard.SwapControl = NewStack
|
|
NewCard.SwapControl = NewStack
|
|
|
- NewCard.IsSwaped = True
|
|
|
|
|
|
|
+ NewCard.IsSwapped = True
|
|
|
PanMinecraft.Children.Add(NewCard)
|
|
PanMinecraft.Children.Add(NewCard)
|
|
|
Next
|
|
Next
|
|
|
'自动选择版本
|
|
'自动选择版本
|
|
@@ -671,6 +678,11 @@
|
|
|
VersionSortInteger(SelectedMinecraftId, "1.13") >= 0 AndAlso VersionSortInteger("1.14.3", SelectedMinecraftId) >= 0 Then
|
|
VersionSortInteger(SelectedMinecraftId, "1.13") >= 0 AndAlso VersionSortInteger("1.14.3", SelectedMinecraftId) >= 0 Then
|
|
|
Return "与 Forge 不兼容"
|
|
Return "与 Forge 不兼容"
|
|
|
End If
|
|
End If
|
|
|
|
|
+ '检查 Fabric 1.20.5+:全部不兼容
|
|
|
|
|
+ If SelectedFabric IsNot Nothing AndAlso
|
|
|
|
|
+ VersionSortInteger(SelectedMinecraftId, "1.20.4") > 0 Then
|
|
|
|
|
+ Return "与 Fabric 不兼容"
|
|
|
|
|
+ End If
|
|
|
'检查 Forge 版本
|
|
'检查 Forge 版本
|
|
|
Dim HasAny As Boolean = False
|
|
Dim HasAny As Boolean = False
|
|
|
Dim HasRequiredVersion As Boolean = False
|
|
Dim HasRequiredVersion As Boolean = False
|
|
@@ -712,7 +724,7 @@
|
|
|
''' </summary>
|
|
''' </summary>
|
|
|
Private Sub OptiFine_Loaded() Handles LoadOptiFine.StateChanged
|
|
Private Sub OptiFine_Loaded() Handles LoadOptiFine.StateChanged
|
|
|
Try
|
|
Try
|
|
|
- If DlOptiFineListLoader.State <> LoadState.Finished Then Exit Sub
|
|
|
|
|
|
|
+ If DlOptiFineListLoader.State <> LoadState.Finished Then Return
|
|
|
|
|
|
|
|
'获取版本列表
|
|
'获取版本列表
|
|
|
Dim Versions As New List(Of DlOptiFineListEntry)
|
|
Dim Versions As New List(Of DlOptiFineListEntry)
|
|
@@ -720,7 +732,7 @@
|
|
|
If SelectedForge IsNot Nothing AndAlso Not IsOptiFineSuitForForge(Version, SelectedForge) Then Continue For
|
|
If SelectedForge IsNot Nothing AndAlso Not IsOptiFineSuitForForge(Version, SelectedForge) Then Continue For
|
|
|
If Version.NameDisplay.StartsWith(SelectedMinecraftId & " ") Then Versions.Add(Version)
|
|
If Version.NameDisplay.StartsWith(SelectedMinecraftId & " ") Then Versions.Add(Version)
|
|
|
Next
|
|
Next
|
|
|
- If Not Versions.Any() Then Exit Sub
|
|
|
|
|
|
|
+ If Not Versions.Any() Then Return
|
|
|
'排序
|
|
'排序
|
|
|
Versions = Versions.Sort(
|
|
Versions = Versions.Sort(
|
|
|
Function(Left As DlOptiFineListEntry, Right As DlOptiFineListEntry) As Boolean
|
|
Function(Left As DlOptiFineListEntry, Right As DlOptiFineListEntry) As Boolean
|
|
@@ -745,14 +757,14 @@
|
|
|
OptiFabric_Loaded()
|
|
OptiFabric_Loaded()
|
|
|
Forge_Loaded()
|
|
Forge_Loaded()
|
|
|
NeoForge_Loaded()
|
|
NeoForge_Loaded()
|
|
|
- CardOptiFine.IsSwaped = True
|
|
|
|
|
|
|
+ CardOptiFine.IsSwapped = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub OptiFine_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnOptiFineClear.MouseLeftButtonUp
|
|
Private Sub OptiFine_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnOptiFineClear.MouseLeftButtonUp
|
|
|
SelectedOptiFine = Nothing
|
|
SelectedOptiFine = Nothing
|
|
|
SelectedOptiFabric = Nothing
|
|
SelectedOptiFabric = Nothing
|
|
|
AutoSelectedOptiFabric = False
|
|
AutoSelectedOptiFabric = False
|
|
|
- CardOptiFine.IsSwaped = True
|
|
|
|
|
|
|
+ CardOptiFine.IsSwapped = True
|
|
|
e.Handled = True
|
|
e.Handled = True
|
|
|
Forge_Loaded()
|
|
Forge_Loaded()
|
|
|
NeoForge_Loaded()
|
|
NeoForge_Loaded()
|
|
@@ -786,13 +798,13 @@
|
|
|
''' </summary>
|
|
''' </summary>
|
|
|
Private Sub LiteLoader_Loaded() Handles LoadLiteLoader.StateChanged
|
|
Private Sub LiteLoader_Loaded() Handles LoadLiteLoader.StateChanged
|
|
|
Try
|
|
Try
|
|
|
- If DlLiteLoaderListLoader.State <> LoadState.Finished Then Exit Sub
|
|
|
|
|
|
|
+ If DlLiteLoaderListLoader.State <> LoadState.Finished Then Return
|
|
|
'获取版本列表
|
|
'获取版本列表
|
|
|
Dim Versions As New List(Of DlLiteLoaderListEntry)
|
|
Dim Versions As New List(Of DlLiteLoaderListEntry)
|
|
|
For Each Version As DlLiteLoaderListEntry In DlLiteLoaderListLoader.Output.Value
|
|
For Each Version As DlLiteLoaderListEntry In DlLiteLoaderListLoader.Output.Value
|
|
|
If Version.Inherit = SelectedMinecraftId Then Versions.Add(Version)
|
|
If Version.Inherit = SelectedMinecraftId Then Versions.Add(Version)
|
|
|
Next
|
|
Next
|
|
|
- If Not Versions.Any() Then Exit Sub
|
|
|
|
|
|
|
+ If Not Versions.Any() Then Return
|
|
|
'可视化
|
|
'可视化
|
|
|
PanLiteLoader.Children.Clear()
|
|
PanLiteLoader.Children.Clear()
|
|
|
For Each Version In Versions
|
|
For Each Version In Versions
|
|
@@ -806,12 +818,12 @@
|
|
|
'选择与清除
|
|
'选择与清除
|
|
|
Private Sub LiteLoader_Selected(sender As MyListItem, e As EventArgs)
|
|
Private Sub LiteLoader_Selected(sender As MyListItem, e As EventArgs)
|
|
|
SelectedLiteLoader = sender.Tag
|
|
SelectedLiteLoader = sender.Tag
|
|
|
- CardLiteLoader.IsSwaped = True
|
|
|
|
|
|
|
+ CardLiteLoader.IsSwapped = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub LiteLoader_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnLiteLoaderClear.MouseLeftButtonUp
|
|
Private Sub LiteLoader_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnLiteLoaderClear.MouseLeftButtonUp
|
|
|
SelectedLiteLoader = Nothing
|
|
SelectedLiteLoader = Nothing
|
|
|
- CardLiteLoader.IsSwaped = True
|
|
|
|
|
|
|
+ CardLiteLoader.IsSwapped = True
|
|
|
e.Handled = True
|
|
e.Handled = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
@@ -866,13 +878,13 @@
|
|
|
''' </summary>
|
|
''' </summary>
|
|
|
Private Sub Forge_Loaded() Handles LoadForge.StateChanged
|
|
Private Sub Forge_Loaded() Handles LoadForge.StateChanged
|
|
|
Try
|
|
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
|
|
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 在实例化后变空
|
|
Dim Versions = Loader.Output.ToList '复制数组,以免 Output 在实例化后变空
|
|
|
- If Not Loader.Output.Any() Then Exit Sub
|
|
|
|
|
|
|
+ If Not Loader.Output.Any() Then Return
|
|
|
PanForge.Children.Clear()
|
|
PanForge.Children.Clear()
|
|
|
Versions = Versions.Where(
|
|
Versions = Versions.Where(
|
|
|
Function(v)
|
|
Function(v)
|
|
@@ -892,14 +904,14 @@
|
|
|
'选择与清除
|
|
'选择与清除
|
|
|
Private Sub Forge_Selected(sender As MyListItem, e As EventArgs)
|
|
Private Sub Forge_Selected(sender As MyListItem, e As EventArgs)
|
|
|
SelectedForge = sender.Tag
|
|
SelectedForge = sender.Tag
|
|
|
- CardForge.IsSwaped = True
|
|
|
|
|
|
|
+ CardForge.IsSwapped = True
|
|
|
If SelectedOptiFine IsNot Nothing AndAlso Not IsOptiFineSuitForForge(SelectedOptiFine, SelectedForge) Then SelectedOptiFine = Nothing
|
|
If SelectedOptiFine IsNot Nothing AndAlso Not IsOptiFineSuitForForge(SelectedOptiFine, SelectedForge) Then SelectedOptiFine = Nothing
|
|
|
OptiFine_Loaded()
|
|
OptiFine_Loaded()
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub Forge_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnForgeClear.MouseLeftButtonUp
|
|
Private Sub Forge_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnForgeClear.MouseLeftButtonUp
|
|
|
SelectedForge = Nothing
|
|
SelectedForge = Nothing
|
|
|
- CardForge.IsSwaped = True
|
|
|
|
|
|
|
+ CardForge.IsSwapped = True
|
|
|
e.Handled = True
|
|
e.Handled = True
|
|
|
OptiFine_Loaded()
|
|
OptiFine_Loaded()
|
|
|
SelectReload()
|
|
SelectReload()
|
|
@@ -936,9 +948,9 @@
|
|
|
Private Sub NeoForge_Loaded() Handles LoadNeoForge.StateChanged
|
|
Private Sub NeoForge_Loaded() Handles LoadNeoForge.StateChanged
|
|
|
Try
|
|
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
|
|
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()
|
|
PanNeoForge.Children.Clear()
|
|
|
NeoForgeDownloadListItemPreload(PanNeoForge, Versions, AddressOf NeoForge_Selected, False)
|
|
NeoForgeDownloadListItemPreload(PanNeoForge, Versions, AddressOf NeoForge_Selected, False)
|
|
@@ -953,13 +965,13 @@
|
|
|
'选择与清除
|
|
'选择与清除
|
|
|
Private Sub NeoForge_Selected(sender As MyListItem, e As EventArgs)
|
|
Private Sub NeoForge_Selected(sender As MyListItem, e As EventArgs)
|
|
|
SelectedNeoForge = sender.Tag
|
|
SelectedNeoForge = sender.Tag
|
|
|
- CardNeoForge.IsSwaped = True
|
|
|
|
|
|
|
+ CardNeoForge.IsSwapped = True
|
|
|
OptiFine_Loaded()
|
|
OptiFine_Loaded()
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub NeoForge_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnNeoForgeClear.MouseLeftButtonUp
|
|
Private Sub NeoForge_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnNeoForgeClear.MouseLeftButtonUp
|
|
|
SelectedNeoForge = Nothing
|
|
SelectedNeoForge = Nothing
|
|
|
- CardNeoForge.IsSwaped = True
|
|
|
|
|
|
|
+ CardNeoForge.IsSwapped = True
|
|
|
e.Handled = True
|
|
e.Handled = True
|
|
|
OptiFine_Loaded()
|
|
OptiFine_Loaded()
|
|
|
SelectReload()
|
|
SelectReload()
|
|
@@ -975,6 +987,11 @@
|
|
|
Private Function LoadFabricGetError() As String
|
|
Private Function LoadFabricGetError() As String
|
|
|
If LoadFabric Is Nothing OrElse LoadFabric.State.LoadingState = MyLoading.MyLoadingState.Run Then Return "加载中……"
|
|
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
|
|
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")
|
|
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 Version("version").ToString = SelectedMinecraftId.Replace("∞", "infinite").Replace("Combat Test 7c", "1.16_combat-3") Then
|
|
|
If SelectedForge IsNot Nothing Then Return "与 Forge 不兼容"
|
|
If SelectedForge IsNot Nothing Then Return "与 Forge 不兼容"
|
|
@@ -995,10 +1012,10 @@
|
|
|
''' </summary>
|
|
''' </summary>
|
|
|
Private Sub Fabric_Loaded() Handles LoadFabric.StateChanged
|
|
Private Sub Fabric_Loaded() Handles LoadFabric.StateChanged
|
|
|
Try
|
|
Try
|
|
|
- If DlFabricListLoader.State <> LoadState.Finished Then Exit Sub
|
|
|
|
|
|
|
+ If DlFabricListLoader.State <> LoadState.Finished Then Return
|
|
|
'获取版本列表
|
|
'获取版本列表
|
|
|
Dim Versions As JArray = DlFabricListLoader.Output.Value("loader")
|
|
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.Children.Clear()
|
|
|
PanFabric.Tag = Versions
|
|
PanFabric.Tag = Versions
|
|
@@ -1014,7 +1031,7 @@
|
|
|
SelectedFabric = sender.Tag("version").ToString
|
|
SelectedFabric = sender.Tag("version").ToString
|
|
|
FabricApi_Loaded()
|
|
FabricApi_Loaded()
|
|
|
OptiFabric_Loaded()
|
|
OptiFabric_Loaded()
|
|
|
- CardFabric.IsSwaped = True
|
|
|
|
|
|
|
+ CardFabric.IsSwapped = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub Fabric_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnFabricClear.MouseLeftButtonUp
|
|
Private Sub Fabric_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnFabricClear.MouseLeftButtonUp
|
|
@@ -1023,7 +1040,7 @@
|
|
|
AutoSelectedFabricApi = False
|
|
AutoSelectedFabricApi = False
|
|
|
SelectedOptiFabric = Nothing
|
|
SelectedOptiFabric = Nothing
|
|
|
AutoSelectedOptiFabric = False
|
|
AutoSelectedOptiFabric = False
|
|
|
- CardFabric.IsSwaped = True
|
|
|
|
|
|
|
+ CardFabric.IsSwapped = True
|
|
|
e.Handled = True
|
|
e.Handled = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
@@ -1100,8 +1117,8 @@
|
|
|
''' </summary>
|
|
''' </summary>
|
|
|
Private Sub FabricApi_Loaded() Handles LoadFabricApi.StateChanged
|
|
Private Sub FabricApi_Loaded() Handles LoadFabricApi.StateChanged
|
|
|
Try
|
|
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)
|
|
Dim Versions As New List(Of CompFile)
|
|
|
For Each Version In DlFabricApiLoader.Output
|
|
For Each Version In DlFabricApiLoader.Output
|
|
@@ -1113,7 +1130,7 @@
|
|
|
Versions.Add(Version)
|
|
Versions.Add(Version)
|
|
|
End If
|
|
End If
|
|
|
Next
|
|
Next
|
|
|
- If Not Versions.Any() Then Exit Sub
|
|
|
|
|
|
|
+ If Not Versions.Any() Then Return
|
|
|
Versions = Versions.OrderByDescending(Function(v) v.ReleaseDate).ToList
|
|
Versions = Versions.OrderByDescending(Function(v) v.ReleaseDate).ToList
|
|
|
'可视化
|
|
'可视化
|
|
|
PanFabricApi.Children.Clear()
|
|
PanFabricApi.Children.Clear()
|
|
@@ -1135,12 +1152,12 @@
|
|
|
'选择与清除
|
|
'选择与清除
|
|
|
Private Sub FabricApi_Selected(sender As MyListItem, e As EventArgs)
|
|
Private Sub FabricApi_Selected(sender As MyListItem, e As EventArgs)
|
|
|
SelectedFabricApi = sender.Tag
|
|
SelectedFabricApi = sender.Tag
|
|
|
- CardFabricApi.IsSwaped = True
|
|
|
|
|
|
|
+ CardFabricApi.IsSwapped = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub FabricApi_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnFabricApiClear.MouseLeftButtonUp
|
|
Private Sub FabricApi_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnFabricApiClear.MouseLeftButtonUp
|
|
|
SelectedFabricApi = Nothing
|
|
SelectedFabricApi = Nothing
|
|
|
- CardFabricApi.IsSwaped = True
|
|
|
|
|
|
|
+ CardFabricApi.IsSwapped = True
|
|
|
e.Handled = True
|
|
e.Handled = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
@@ -1196,14 +1213,14 @@
|
|
|
''' </summary>
|
|
''' </summary>
|
|
|
Private Sub OptiFabric_Loaded() Handles LoadOptiFabric.StateChanged
|
|
Private Sub OptiFabric_Loaded() Handles LoadOptiFabric.StateChanged
|
|
|
Try
|
|
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)
|
|
Dim Versions As New List(Of CompFile)
|
|
|
For Each Version In DlOptiFabricLoader.Output
|
|
For Each Version In DlOptiFabricLoader.Output
|
|
|
If IsSuitableOptiFabric(Version, SelectedMinecraftId) Then Versions.Add(Version)
|
|
If IsSuitableOptiFabric(Version, SelectedMinecraftId) Then Versions.Add(Version)
|
|
|
Next
|
|
Next
|
|
|
- If Not Versions.Any() Then Exit Sub
|
|
|
|
|
|
|
+ If Not Versions.Any() Then Return
|
|
|
'排序
|
|
'排序
|
|
|
Versions = Versions.OrderByDescending(Function(v) v.ReleaseDate).ToList
|
|
Versions = Versions.OrderByDescending(Function(v) v.ReleaseDate).ToList
|
|
|
'可视化
|
|
'可视化
|
|
@@ -1227,12 +1244,12 @@
|
|
|
'选择与清除
|
|
'选择与清除
|
|
|
Private Sub OptiFabric_Selected(sender As MyListItem, e As EventArgs)
|
|
Private Sub OptiFabric_Selected(sender As MyListItem, e As EventArgs)
|
|
|
SelectedOptiFabric = sender.Tag
|
|
SelectedOptiFabric = sender.Tag
|
|
|
- CardOptiFabric.IsSwaped = True
|
|
|
|
|
|
|
+ CardOptiFabric.IsSwapped = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub OptiFabric_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnOptiFabricClear.MouseLeftButtonUp
|
|
Private Sub OptiFabric_Clear(sender As Object, e As MouseButtonEventArgs) Handles BtnOptiFabricClear.MouseLeftButtonUp
|
|
|
SelectedOptiFabric = Nothing
|
|
SelectedOptiFabric = Nothing
|
|
|
- CardOptiFabric.IsSwaped = True
|
|
|
|
|
|
|
+ CardOptiFabric.IsSwapped = True
|
|
|
e.Handled = True
|
|
e.Handled = True
|
|
|
SelectReload()
|
|
SelectReload()
|
|
|
End Sub
|
|
End Sub
|
|
@@ -1251,7 +1268,7 @@
|
|
|
If MyMsgBox("你尚未开启版本隔离,多个 MC 版本会共用同一个 Mod 文件夹。" & vbCrLf &
|
|
If MyMsgBox("你尚未开启版本隔离,多个 MC 版本会共用同一个 Mod 文件夹。" & vbCrLf &
|
|
|
"因此,游戏可能会因为读取到与当前版本不符的 Mod 而崩溃。" & vbCrLf &
|
|
"因此,游戏可能会因为读取到与当前版本不符的 Mod 而崩溃。" & vbCrLf &
|
|
|
"推荐先在 设置 → 启动选项 → 默认版本隔离 中开启版本隔离!", "版本隔离提示", "取消下载", "继续") = 1 Then
|
|
"推荐先在 设置 → 启动选项 → 默认版本隔离 中开启版本隔离!", "版本隔离提示", "取消下载", "继续") = 1 Then
|
|
|
- Exit Sub
|
|
|
|
|
|
|
+ Return
|
|
|
End If
|
|
End If
|
|
|
End If
|
|
End If
|
|
|
'提交安装申请
|
|
'提交安装申请
|
|
@@ -1269,7 +1286,7 @@
|
|
|
.OptiFabric = SelectedOptiFabric,
|
|
.OptiFabric = SelectedOptiFabric,
|
|
|
.LiteLoaderEntry = SelectedLiteLoader
|
|
.LiteLoaderEntry = SelectedLiteLoader
|
|
|
}
|
|
}
|
|
|
- If Not McInstall(Request) Then Exit Sub
|
|
|
|
|
|
|
+ If Not McInstall(Request) Then Return
|
|
|
'返回,这样在再次进入安装页面时这个版本就会显示文件夹已重复
|
|
'返回,这样在再次进入安装页面时这个版本就会显示文件夹已重复
|
|
|
ExitSelectPage()
|
|
ExitSelectPage()
|
|
|
End Sub
|
|
End Sub
|