feat: 数据包下载 (WIP)
This commit is contained in:
@@ -1062,6 +1062,7 @@ Install:
|
|||||||
DownloadLiteLoader = 9
|
DownloadLiteLoader = 9
|
||||||
DownloadMod = 11
|
DownloadMod = 11
|
||||||
DownloadPack = 12
|
DownloadPack = 12
|
||||||
|
DownloadDataPack = 15
|
||||||
SetupLaunch = 0
|
SetupLaunch = 0
|
||||||
SetupUI = 1
|
SetupUI = 1
|
||||||
SetupSystem = 2
|
SetupSystem = 2
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
''' 资源包。
|
''' 资源包。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
ResourcePack = 2
|
ResourcePack = 2
|
||||||
|
''' <summary>
|
||||||
|
''' 数据包。
|
||||||
|
''' </summary>
|
||||||
|
DataPack = 4
|
||||||
End Enum
|
End Enum
|
||||||
Public Enum CompModLoaderType
|
Public Enum CompModLoaderType
|
||||||
'https://docs.curseforge.com/?http#tocS_ModLoaderType
|
'https://docs.curseforge.com/?http#tocS_ModLoaderType
|
||||||
@@ -748,8 +752,8 @@ NoSubtitle:
|
|||||||
Address += "&classId=6"
|
Address += "&classId=6"
|
||||||
Case CompType.ModPack
|
Case CompType.ModPack
|
||||||
Address += "&classId=4471"
|
Address += "&classId=4471"
|
||||||
Case CompType.ResourcePack
|
Case CompType.DataPack
|
||||||
'FUTURE: Res
|
Address += "&classId=6945"
|
||||||
End Select
|
End Select
|
||||||
Address += "&categoryId=" & If(Tag = "", "0", Tag.Before("/"))
|
Address += "&categoryId=" & If(Tag = "", "0", Tag.Before("/"))
|
||||||
If ModLoader <> CompModLoaderType.Any Then Address += "&modLoaderType=" & CType(ModLoader, Integer)
|
If ModLoader <> CompModLoaderType.Any Then Address += "&modLoaderType=" & CType(ModLoader, Integer)
|
||||||
|
|||||||
@@ -398,6 +398,7 @@ EndHint:
|
|||||||
Public FrmDownloadFabric As PageDownloadFabric
|
Public FrmDownloadFabric As PageDownloadFabric
|
||||||
Public FrmDownloadMod As PageDownloadMod
|
Public FrmDownloadMod As PageDownloadMod
|
||||||
Public FrmDownloadPack As PageDownloadPack
|
Public FrmDownloadPack As PageDownloadPack
|
||||||
|
Public FrmDownloadDataPack As PageDownloadDataPack
|
||||||
|
|
||||||
'设置页面声明
|
'设置页面声明
|
||||||
Public FrmSetupLeft As PageSetupLeft
|
Public FrmSetupLeft As PageSetupLeft
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
<local:MyPageRight
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:PCL" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" x:Class="PageDownloadDataPack"
|
||||||
|
PanScroll="{Binding ElementName=PanBack}">
|
||||||
|
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
|
||||||
|
<StackPanel Orientation="Vertical" Margin="25">
|
||||||
|
<local:MyCard Title="搜索数据包" Margin="0,0,0,15" x:Name="PanAlways">
|
||||||
|
<StackPanel Margin="25,40,25,15">
|
||||||
|
<Grid Margin="0,0,0,11" HorizontalAlignment="Stretch">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="2.5*" />
|
||||||
|
<ColumnDefinition Width="50" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="9" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="名称" Margin="0,0,18,0" />
|
||||||
|
<local:MyTextBox x:Name="TextSearchName" Grid.Column="1" />
|
||||||
|
<TextBlock VerticalAlignment="Center" Grid.Column="3" HorizontalAlignment="Left" Text="来源" Margin="0,0,18,0" />
|
||||||
|
<local:MyComboBox x:Name="ComboSearchSource" Grid.Column="4">
|
||||||
|
<local:MyComboBoxItem Content="全部" Tag="3" IsSelected="True" />
|
||||||
|
<local:MyComboBoxItem Content="CurseForge" Tag="1" />
|
||||||
|
<local:MyComboBoxItem Content="Modrinth" Tag="2" />
|
||||||
|
</local:MyComboBox>
|
||||||
|
<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" IsEditable="True" MaxDropDownHeight="320">
|
||||||
|
<local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" />
|
||||||
|
<local:MyComboBoxItem Content="1.20.6" />
|
||||||
|
<local:MyComboBoxItem Content="1.20.4" />
|
||||||
|
<local:MyComboBoxItem Content="1.20.1" />
|
||||||
|
<local:MyComboBoxItem Content="1.19.4" />
|
||||||
|
<local:MyComboBoxItem Content="1.19.2" />
|
||||||
|
<local:MyComboBoxItem Content="1.18.2" />
|
||||||
|
<local:MyComboBoxItem Content="1.17.1" />
|
||||||
|
<local:MyComboBoxItem Content="1.16.5" />
|
||||||
|
<local:MyComboBoxItem Content="1.15.2" />
|
||||||
|
<local:MyComboBoxItem Content="1.14.4" />
|
||||||
|
<local:MyComboBoxItem Content="1.12.2" />
|
||||||
|
<local:MyComboBoxItem Content="1.11.2" />
|
||||||
|
<local:MyComboBoxItem Content="1.10.2" />
|
||||||
|
<local:MyComboBoxItem Content="1.8.9" />
|
||||||
|
<local:MyComboBoxItem Content="1.7.10" />
|
||||||
|
</local:MyComboBox>
|
||||||
|
<TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="3" HorizontalAlignment="Left" Text="类型" Margin="0,0,18,0" />
|
||||||
|
<local:MyComboBox x:Name="ComboSearchTag" Grid.Column="4" Grid.Row="2" MaxDropDownHeight="320">
|
||||||
|
<local:MyComboBoxItem Tag="" Content="全部" IsSelected="True" />
|
||||||
|
<local:MyComboBoxItem Content="卡通" Tag="/cartoon" />
|
||||||
|
<local:MyComboBoxItem Content="Cursed" Tag="/cursed" />
|
||||||
|
<local:MyComboBoxItem Content="幻想" Tag="6554/fantasy" />
|
||||||
|
<local:MyComboBoxItem Content="写实" Tag="6553/realistic" />
|
||||||
|
<local:MyComboBoxItem Content="半写实" Tag="/semi-realistic" />
|
||||||
|
<local:MyComboBoxItem Content="原版风" Tag="6555/vanilla-like" />
|
||||||
|
|
||||||
|
<local:MyComboBoxItem Content="大气环境" Tag="/atmosphere" />
|
||||||
|
<local:MyComboBoxItem Content="植被" Tag="/bloom" />
|
||||||
|
<local:MyComboBoxItem Content="光源着色" Tag="/colored-lighting" />
|
||||||
|
<local:MyComboBoxItem Content="树叶" Tag="/foliage" />
|
||||||
|
<local:MyComboBoxItem Content="路径追踪" Tag="/path-tracing" />
|
||||||
|
<local:MyComboBoxItem Content="PBR" Tag="/pbr" />
|
||||||
|
<local:MyComboBoxItem Content="反射" Tag="/reflections" />
|
||||||
|
<local:MyComboBoxItem Content="阴影" Tag="/shadows" />
|
||||||
|
|
||||||
|
<local:MyComboBoxItem Content="土豆画质" Tag="/potato" />
|
||||||
|
<local:MyComboBoxItem Content="低性能影响" Tag="/low" />
|
||||||
|
<local:MyComboBoxItem Content="中性能影响" Tag="/medium" />
|
||||||
|
<local:MyComboBoxItem Content="高性能影响" Tag="/high" />
|
||||||
|
<local:MyComboBoxItem Content="极致画质" Tag="/screenshot" />
|
||||||
|
|
||||||
|
<local:MyComboBoxItem Content="Canvas" Tag="/canvas" />
|
||||||
|
<local:MyComboBoxItem Content="Iris" Tag="/iris" />
|
||||||
|
<local:MyComboBoxItem Content="OptiFine" Tag="/optifine" />
|
||||||
|
<local:MyComboBoxItem Content="原版光影" Tag="/vanilla-shader" />
|
||||||
|
</local:MyComboBox>
|
||||||
|
</Grid>
|
||||||
|
<Grid Margin="0,4,0,6" Height="35">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Button" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<local:MyButton x:Name="BtnSearchRun" Text="搜索" MinWidth="140" Padding="13,0" Margin="0,0,20,0" ColorType="Highlight" />
|
||||||
|
<local:MyButton x:Name="BtnSearchReset" Text="重置条件" MinWidth="140" Padding="13,0" Margin="0,0,20,0" Grid.Column="1" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</local:MyCard>
|
||||||
|
<StackPanel x:Name="PanContent">
|
||||||
|
<local:MyHint x:Name="HintError" Text="无法连接到 Modrinth,所以目前仅显示了来自 CurseForge 的内容,结果可能不全。
请尝试使用 VPN 或加速器以改善网络。" IsWarn="True" Margin="0,0,0,15" />
|
||||||
|
<local:MyCard x:Name="CardProjects" UseAnimation="False">
|
||||||
|
<StackPanel x:Name="PanProjects" Margin="12" />
|
||||||
|
</local:MyCard>
|
||||||
|
<local:MyCard Margin="0,15,0,0" x:Name="CardPages" HorizontalAlignment="Center">
|
||||||
|
<StackPanel Orientation="Horizontal" Height="23" Margin="10,7">
|
||||||
|
<local:MyIconButton x:Name="BtnPageFirst" IsEnabled="False" Opacity="0.2" Margin="0,0.5,5,0.5"
|
||||||
|
Logo="M496.213333 329.856L315.306667 510.848l180.992 181.077333a42.666667 42.666667 0 1 1-60.330667 60.330667l-211.2-211.2a42.453333 42.453333 0 0 1-11.818667-22.613333l-0.597333-5.034667v-5.034667a42.496 42.496 0 0 1 12.373333-27.648l211.2-211.2a42.666667 42.666667 0 0 1 60.373334 60.330667z m298.666667 0l-180.949333 180.992 180.992 181.077333a42.666667 42.666667 0 1 1-60.330667 60.330667l-211.2-211.2a42.453333 42.453333 0 0 1-11.818667-22.613333l-0.597333-5.034667v-5.034667a42.496 42.496 0 0 1 12.373333-27.648l211.2-211.2a42.666667 42.666667 0 0 1 60.373334 60.330667z" />
|
||||||
|
<local:MyIconButton x:Name="BtnPageLeft" IsEnabled="False" Opacity="0.2" Margin="0,0,5,0"
|
||||||
|
Logo="M650.752 278.357333l-241.322667 241.365334 241.322667 241.365333a42.666667 42.666667 0 1 1-60.330667 60.330667l-271.530666-271.530667a42.453333 42.453333 0 0 1-11.818667-22.613333l-0.597333-5.034667v-5.034667a42.496 42.496 0 0 1 12.416-27.648l271.530666-271.530666a42.666667 42.666667 0 0 1 60.330667 60.330666z" />
|
||||||
|
<TextBlock x:Name="LabPage" Text="1"
|
||||||
|
Margin="8,0,13,0" FontSize="15" VerticalAlignment="Center" Foreground="{DynamicResource ColorBrush3}" />
|
||||||
|
<local:MyIconButton x:Name="BtnPageRight" Margin="0,0,30,0"
|
||||||
|
Logo="M404.309333 278.357333l241.322667 241.365334-241.322667 241.365333a42.666667 42.666667 0 1 0 60.330667 60.330667l271.530667-271.530667a42.453333 42.453333 0 0 0 11.818666-22.613333l0.597334-5.034667v-5.034667a42.496 42.496 0 0 0-12.416-27.648L464.64 218.026667a42.666667 42.666667 0 0 0-60.330667 60.330666z" />
|
||||||
|
</StackPanel>
|
||||||
|
</local:MyCard>
|
||||||
|
</StackPanel>
|
||||||
|
<local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True" x:Name="PanLoad" UseAnimation="False" Margin="40,50">
|
||||||
|
<local:MyLoading Text="正在获取资源包列表" Margin="20,20,20,17" x:Name="Load" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
|
</local:MyCard>
|
||||||
|
</StackPanel>
|
||||||
|
</local:MyScrollViewer>
|
||||||
|
</local:MyPageRight>
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
Public Class PageDownloadDataPack
|
||||||
|
|
||||||
|
Public Const PageSize = 40
|
||||||
|
|
||||||
|
'加载器信息
|
||||||
|
Public Shared Loader As New LoaderTask(Of CompProjectRequest, Integer)("CompProject Shader", AddressOf CompProjectsGet, AddressOf LoaderInput) With {.ReloadTimeout = 60 * 1000}
|
||||||
|
Public Shared Storage As New CompProjectStorage
|
||||||
|
Public Shared Page As Integer = 0
|
||||||
|
Private Sub PageDownloadShader_Inited(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
PageLoaderInit(Load, PanLoad, PanContent, PanAlways, Loader, AddressOf Load_OnFinish, AddressOf LoaderInput)
|
||||||
|
If McVersionHighest = -1 Then McVersionHighest = Math.Max(McVersionHighest, Integer.Parse(CType(TextSearchVersion.Items(1), MyComboBoxItem).Content.ToString.Split(".")(1)))
|
||||||
|
End Sub
|
||||||
|
Private Shared Function LoaderInput() As CompProjectRequest
|
||||||
|
Dim Request As New CompProjectRequest(CompType.DataPack, Storage, (Page + 1) * PageSize)
|
||||||
|
If FrmDownloadDataPack IsNot Nothing Then
|
||||||
|
With Request
|
||||||
|
.SearchText = FrmDownloadDataPack.TextSearchName.Text
|
||||||
|
.GameVersion = If(FrmDownloadDataPack.TextSearchVersion.Text = "全部 (也可自行输入)", Nothing,
|
||||||
|
If(FrmDownloadDataPack.TextSearchVersion.Text.Contains(".") OrElse FrmDownloadDataPack.TextSearchVersion.Text.Contains("w"), FrmDownloadDataPack.TextSearchVersion.Text, Nothing))
|
||||||
|
.Tag = FrmDownloadDataPack.ComboSearchTag.SelectedItem.Tag
|
||||||
|
.Source = CType(Val(FrmDownloadDataPack.ComboSearchSource.SelectedItem.Tag), CompSourceType)
|
||||||
|
End With
|
||||||
|
End If
|
||||||
|
Return Request
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'结果 UI 化
|
||||||
|
Private Sub Load_OnFinish()
|
||||||
|
Try
|
||||||
|
Log($"[Comp] 开始可视化数据包列表,已储藏 {Storage.Results.Count} 个结果,当前在第 {Page + 1} 页")
|
||||||
|
'列表项
|
||||||
|
PanProjects.Children.Clear()
|
||||||
|
For i = Math.Min(Page * PageSize, Storage.Results.Count - 1) To Math.Min((Page + 1) * PageSize - 1, Storage.Results.Count - 1)
|
||||||
|
PanProjects.Children.Add(Storage.Results(i).ToCompItem(Loader.Input.GameVersion Is Nothing, False))
|
||||||
|
Next
|
||||||
|
'页码
|
||||||
|
CardPages.Visibility = If(Storage.Results.Count > 40 OrElse
|
||||||
|
Storage.CurseForgeOffset < Storage.CurseForgeTotal OrElse Storage.ModrinthOffset < Storage.ModrinthTotal,
|
||||||
|
Visibility.Visible, Visibility.Collapsed)
|
||||||
|
LabPage.Text = Page + 1
|
||||||
|
BtnPageFirst.IsEnabled = Page > 1
|
||||||
|
BtnPageFirst.Opacity = If(BtnPageFirst.IsEnabled, 1, 0.2)
|
||||||
|
BtnPageLeft.IsEnabled = Page > 0
|
||||||
|
BtnPageLeft.Opacity = If(BtnPageLeft.IsEnabled, 1, 0.2)
|
||||||
|
BtnPageRight.IsEnabled = Storage.Results.Count > PageSize * (Page + 1) OrElse
|
||||||
|
Storage.CurseForgeOffset < Storage.CurseForgeTotal OrElse Storage.ModrinthOffset < Storage.ModrinthTotal
|
||||||
|
BtnPageRight.Opacity = If(BtnPageRight.IsEnabled, 1, 0.2)
|
||||||
|
'错误信息
|
||||||
|
If Storage.ErrorMessage Is Nothing Then
|
||||||
|
HintError.Visibility = Visibility.Collapsed
|
||||||
|
Else
|
||||||
|
HintError.Visibility = Visibility.Visible
|
||||||
|
HintError.Text = Storage.ErrorMessage
|
||||||
|
End If
|
||||||
|
'强制返回顶部
|
||||||
|
PanBack.ScrollToTop()
|
||||||
|
Catch ex As Exception
|
||||||
|
Log(ex, "可视化数据包列表出错", LogLevel.Feedback)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'自动重试
|
||||||
|
Private Sub Load_State(sender As Object, state As MyLoading.MyLoadingState, oldState As MyLoading.MyLoadingState) Handles Load.StateChanged
|
||||||
|
Select Case Loader.State
|
||||||
|
Case LoadState.Failed
|
||||||
|
Dim ErrorMessage As String = ""
|
||||||
|
If Loader.Error IsNot Nothing Then ErrorMessage = Loader.Error.Message
|
||||||
|
If ErrorMessage.Contains("不是有效的 JSON 文件") Then
|
||||||
|
Log("[Download] 下载的数据包列表 JSON 文件损坏,已自动重试", LogLevel.Debug)
|
||||||
|
PageLoaderRestart()
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'切换页码
|
||||||
|
|
||||||
|
Private Sub BtnPageFirst_Click(sender As Object, e As RoutedEventArgs) Handles BtnPageFirst.Click
|
||||||
|
ChangePage(0)
|
||||||
|
End Sub
|
||||||
|
Private Sub BtnPageLeft_Click(sender As Object, e As RoutedEventArgs) Handles BtnPageLeft.Click
|
||||||
|
ChangePage(Page - 1)
|
||||||
|
End Sub
|
||||||
|
Private Sub BtnPageRight_Click(sender As Object, e As RoutedEventArgs) Handles BtnPageRight.Click
|
||||||
|
ChangePage(Page + 1)
|
||||||
|
End Sub
|
||||||
|
Private Sub ChangePage(NewPage As Integer)
|
||||||
|
CardPages.IsEnabled = False
|
||||||
|
Page = NewPage
|
||||||
|
FrmMain.BackToTop()
|
||||||
|
Log($"[Download] 数据包切换到第 {Page + 1} 页")
|
||||||
|
RunInThread(Sub()
|
||||||
|
Thread.Sleep(100) '等待向上滚的动画结束
|
||||||
|
RunInUi(Sub() CardPages.IsEnabled = True)
|
||||||
|
Loader.Start()
|
||||||
|
End Sub)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "搜索"
|
||||||
|
|
||||||
|
'搜索按钮
|
||||||
|
Private Sub StartNewSearch() Handles BtnSearchRun.Click
|
||||||
|
Page = 0
|
||||||
|
If Loader.ShouldStart(LoaderInput()) Then Storage = New CompProjectStorage '避免连续搜索两次使得 CompProjectStorage 引用丢失(#1311)
|
||||||
|
Loader.Start()
|
||||||
|
End Sub
|
||||||
|
Private Sub EnterTrigger(sender As Object, e As KeyEventArgs) Handles TextSearchName.KeyDown, TextSearchVersion.KeyDown
|
||||||
|
If e.Key = Key.Enter Then StartNewSearch()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'重置按钮
|
||||||
|
Private Sub BtnSearchReset_Click(sender As Object, e As EventArgs) Handles BtnSearchReset.Click
|
||||||
|
TextSearchName.Text = ""
|
||||||
|
TextSearchVersion.Text = "全部 (也可自行输入)"
|
||||||
|
TextSearchVersion.SelectedIndex = 0
|
||||||
|
ComboSearchSource.SelectedIndex = 0
|
||||||
|
ComboSearchTag.SelectedIndex = 0
|
||||||
|
Loader.LastFinishedTime = 0 '要求强制重新开始
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -84,6 +84,14 @@
|
|||||||
</x:Array>
|
</x:Array>
|
||||||
</local:MyListItem.Buttons>
|
</local:MyListItem.Buttons>
|
||||||
</local:MyListItem>
|
</local:MyListItem>
|
||||||
|
<local:MyListItem x:Name="ItemDataPack" Type="RadioBox" IsScaleAnimationEnabled="False" Tag="15" MinPaddingRight="35" Height="36" VerticalAlignment="Top" Title="数据包"
|
||||||
|
LogoScale="0.98" Logo="M511.488 995.328a128.654222 128.654222 0 0 1-57.116444-13.112889L70.769778 791.808a126.833778 126.833778 0 0 1-70.769778-113.777778V311.608889a126.179556 126.179556 0 0 1 15.36-60.103111V248.604444c1.479111-2.901333 3.356444-5.603556 5.518222-8.021333a127.630222 127.630222 0 0 1 49.891556-42.325333L454.371556 13.368889a128.739556 128.739556 0 0 1 112.981333 0l383.601778 190.407111a126.862222 126.862222 0 0 1 72.049777 113.379556v360.874666a126.805333 126.805333 0 0 1-70.769777 115.939556L568.604444 984.32c-17.92 7.964444-37.461333 11.747556-57.116444 11.008z m42.638222-470.897778v370.204445l360.192-178.545778c14.449778-7.253333 23.552-21.987556 23.438222-38.087111v-335.928889L554.097778 524.430222zM85.248 330.666667v347.335111a42.268444 42.268444 0 0 0 23.438222 38.087111l360.192 178.545778V523.576889L85.248 330.666667zM135.537778 260.835556l375.950222 189.952 137.671111-65.564445L286.435556 188.074667 135.537778 260.864z m245.105778-118.471112l363.576888 197.973334 150.897778-71.480889-365.283555-180.224a42.922667 42.922667 0 0 0-37.518223 0l-111.672888 53.731555z">
|
||||||
|
<local:MyListItem.Buttons>
|
||||||
|
<x:Array Type="{x:Type local:MyIconButton}">
|
||||||
|
<local:MyIconButton Tag="15" ToolTip="刷新" ToolTipService.Placement="Right" ToolTipService.InitialShowDelay="200" ToolTipService.VerticalOffset="-1" LogoScale="0.85" Click="Refresh" 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" />
|
||||||
|
</x:Array>
|
||||||
|
</local:MyListItem.Buttons>
|
||||||
|
</local:MyListItem>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</local:MyPageLeft>
|
</local:MyPageLeft>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 勾选事件改变页面。
|
''' 勾选事件改变页面。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Private Sub PageCheck(sender As MyListItem, e As RouteEventArgs) Handles ItemInstall.Check, ItemClient.Check, ItemOptiFine.Check, ItemForge.Check, ItemNeoForge.Check, ItemLiteLoader.Check, ItemMod.Check, ItemFabric.Check, ItemPack.Check
|
Private Sub PageCheck(sender As MyListItem, e As RouteEventArgs) Handles ItemInstall.Check, ItemClient.Check, ItemOptiFine.Check, ItemForge.Check, ItemNeoForge.Check, ItemLiteLoader.Check, ItemMod.Check, ItemFabric.Check, ItemPack.Check, ItemDataPack.Check
|
||||||
'尚未初始化控件属性时,sender.Tag 为 Nothing,会导致切换到页面 0
|
'尚未初始化控件属性时,sender.Tag 为 Nothing,会导致切换到页面 0
|
||||||
'若使用 IsLoaded,则会导致模拟点击不被执行(模拟点击切换页面时,控件的 IsLoaded 为 False)
|
'若使用 IsLoaded,则会导致模拟点击不被执行(模拟点击切换页面时,控件的 IsLoaded 为 False)
|
||||||
If sender.Tag IsNot Nothing Then PageChange(Val(sender.Tag))
|
If sender.Tag IsNot Nothing Then PageChange(Val(sender.Tag))
|
||||||
@@ -46,6 +46,9 @@
|
|||||||
Case FormMain.PageSubType.DownloadPack
|
Case FormMain.PageSubType.DownloadPack
|
||||||
If FrmDownloadPack Is Nothing Then FrmDownloadPack = New PageDownloadPack
|
If FrmDownloadPack Is Nothing Then FrmDownloadPack = New PageDownloadPack
|
||||||
Return FrmDownloadPack
|
Return FrmDownloadPack
|
||||||
|
Case FormMain.PageSubType.DownloadDataPack
|
||||||
|
If FrmDownloadDataPack Is Nothing Then FrmDownloadDataPack = New PageDownloadDataPack
|
||||||
|
Return FrmDownloadDataPack
|
||||||
Case Else
|
Case Else
|
||||||
Throw New Exception("未知的下载子页面种类:" & ID)
|
Throw New Exception("未知的下载子页面种类:" & ID)
|
||||||
End Select
|
End Select
|
||||||
@@ -114,6 +117,12 @@
|
|||||||
CompProjectCache.Clear()
|
CompProjectCache.Clear()
|
||||||
If FrmDownloadPack IsNot Nothing Then FrmDownloadPack.PageLoaderRestart()
|
If FrmDownloadPack IsNot Nothing Then FrmDownloadPack.PageLoaderRestart()
|
||||||
ItemPack.Checked = True
|
ItemPack.Checked = True
|
||||||
|
Case FormMain.PageSubType.DownloadDataPack
|
||||||
|
PageDownloadDataPack.Storage = New CompProjectStorage
|
||||||
|
PageDownloadDataPack.Page = 0
|
||||||
|
CompProjectCache.Clear()
|
||||||
|
If FrmDownloadDataPack IsNot Nothing Then FrmDownloadDataPack.PageLoaderRestart()
|
||||||
|
ItemDataPack.Checked = True
|
||||||
Case FormMain.PageSubType.DownloadClient
|
Case FormMain.PageSubType.DownloadClient
|
||||||
DlClientListLoader.Start(IsForceRestart:=True)
|
DlClientListLoader.Start(IsForceRestart:=True)
|
||||||
ItemClient.Checked = True
|
ItemClient.Checked = True
|
||||||
|
|||||||
@@ -185,9 +185,6 @@
|
|||||||
<Compile Include="Controls\MyIconTextButton.xaml.vb">
|
<Compile Include="Controls\MyIconTextButton.xaml.vb">
|
||||||
<DependentUpon>MyIconTextButton.xaml</DependentUpon>
|
<DependentUpon>MyIconTextButton.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Compile Include="Modules\Minecraft\ModComp.vb" />
|
<Compile Include="Modules\Minecraft\ModComp.vb" />
|
||||||
<Compile Include="Modules\Minecraft\ModJava.vb" />
|
<Compile Include="Modules\Minecraft\ModJava.vb" />
|
||||||
<Compile Include="Modules\Minecraft\ModMod.vb" />
|
<Compile Include="Modules\Minecraft\ModMod.vb" />
|
||||||
@@ -232,6 +229,9 @@
|
|||||||
<Compile Include="Modules\Minecraft\MyCompItem.xaml.vb">
|
<Compile Include="Modules\Minecraft\MyCompItem.xaml.vb">
|
||||||
<DependentUpon>MyCompItem.xaml</DependentUpon>
|
<DependentUpon>MyCompItem.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Pages\PageDownload\PageDownloadDataPack.xaml.vb">
|
||||||
|
<DependentUpon>PageDownloadDataPack.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Pages\PageDownload\PageDownloadMod.xaml.vb">
|
<Compile Include="Pages\PageDownload\PageDownloadMod.xaml.vb">
|
||||||
<DependentUpon>PageDownloadMod.xaml</DependentUpon>
|
<DependentUpon>PageDownloadMod.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -472,7 +472,6 @@
|
|||||||
<DependentUpon>FormMain.xaml</DependentUpon>
|
<DependentUpon>FormMain.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
||||||
<Page Include="Modules\Minecraft\MyLocalModItem.xaml">
|
<Page Include="Modules\Minecraft\MyLocalModItem.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -481,6 +480,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Pages\PageDownload\PageDownloadDataPack.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="Pages\PageDownload\PageDownloadMod.xaml">
|
<Page Include="Pages\PageDownload\PageDownloadMod.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -928,7 +931,6 @@
|
|||||||
<Resource Include="Images\Heads\MCBBS.png" />
|
<Resource Include="Images\Heads\MCBBS.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Images\Blocks\NeoForge.png" />
|
<Resource Include="Images\Blocks\NeoForge.png" />
|
||||||
|
|||||||
Reference in New Issue
Block a user